|
Post by Alyce Watson on Apr 8, 2018 7:11:50 GMT -5
I've long wished for the ability to trap mouse and keyboard events for all user-interactive controls, like listviews, radiobuttons, etc. As it is, we must poll on a timer or other workaround. In a similar way, it would be great to have a usable hook to the window messages so that we can trap events in API-created controls. (That may be a lot to ask for!)
|
|
|
Post by Alyce Watson on Apr 8, 2018 10:30:25 GMT -5
To be clear, we do have the ability to hook windows messages, but LB gets overwhelmed by the volume of messages and doesn't work well for this. That's why I specified "usable hook" in my first message.
|
|
|
Post by Brandon Parker on Apr 8, 2018 19:50:18 GMT -5
I big PLUS ONE this one.... It would be a huge improvement! Either way, I still love LB and it is my favorite language... {:0) Brandon Parker
|
|
|
Post by bluatigro on Apr 9, 2018 7:26:41 GMT -5
i think a joystick.move + joystick.button[up,down] whit al axes get and al button get and more than 2 joystick's [ i dont know how many that has to be ] and a com.mesage.in event wood be nice too
|
|
|
Post by msteffes on Sept 7, 2018 19:22:12 GMT -5
Please integrate mouse events for all window types and controls. That would be a great enhancement.
|
|
hap2u
New Member
Posts: 17
|
Post by hap2u on Mar 1, 2020 11:47:10 GMT -5
In the process of switching over from Power Basic I found the following works: TRY/CATCH/END TRY
[TRY1START] on error goto [TRY1CATCH1] open ?? [TRY1CATCH1] on error goto [TRY1CATCH2] close ?? here creates errors so ignore creating close in error redirect [TRY1CATCH2] on error goto [TRY1END] Message [TRY1END] on error goto [ERROR.HANDLE]
|
|
|
Post by sarossell on Mar 1, 2020 18:26:19 GMT -5
In the process of switching over from Power Basic I found the following works: TRY/CATCH/END TRY [TRY1START] on error goto [TRY1CATCH1] open ?? [TRY1CATCH1] on error goto [TRY1CATCH2] close ?? here creates errors so ignore creating close in error redirect [TRY1CATCH2] on error goto [TRY1END] Message [TRY1END] on error goto [ERROR.HANDLE] Intriguing. Do you have any sample working code? (Sorry, I'm not that bright.)
{%@\
|
|
hap2u
New Member
Posts: 17
|
Post by hap2u on Mar 1, 2020 19:44:16 GMT -5
Warning I am new to LB this I have only tested it once and it worked provided you do not try to close the offending Open #f command.
if Found<>1 then 'corrupt or empty file '________________________________________________________ do'/Get File Name or Loop until [enter] pressed \ cls: print Err$="<ERROR>Corrupt [Load Last Translation.TXT] File!<ERROR>" print tab(Ln+4);Err$ print "Files Found=(";Found;") <> 1" print "<Last file found: ";X$;">" print tab(Ln+4); input "Name of [PowerBasic.BAS] File to be Converted to JB?: ";X$ if ASC(X$)=0 then print "Execution ended with press of [ENTER]": END if upper$(right$(X$,4))<>".BAS" then X$=X$+".BAS" LOOP until instr(UPPER$(X$),".BAS")>4 '\________________________________________________________/ open "Load Last Translation.TXT" for output as #f3 print #f3,X$ close #f3 Err$="File Name: [";X$;"] Placed in Translation Text File!" print tab(Ln+4);Err$ Err$=" {{ RUN JB Program Again! }}" goto [ErrorHandler] else [try1START] on error goto [try1CATCH1] open CONVERT$+"AA."+InFile$ for input as #f3: close #f3 goto [try1END] 'file exists! [try1CATCH1] on error goto [try1CATCH2] open InFile$ for input as #f4 open CONVERT$+"AA."+InFile$ for output as #f5 do until eof(#f4) line input #f4,Record$ print #f5, Record$ loop close #f4 close #f5 on error goto [ErrorHandler] Err$="SET File: ["+InFile$+"] Loaded into Folder CONVERT!" print Err$ Err$=" { File Error Corrected { RUN JB Program Again! }}" goto [ErrorHandler] [try1CATCH2] on error goto [ErrorHandler] print "< DELETE [LOAD LAST TRANSLATION.TXT] AS >" Err$="<ERROR> PB File Not Found in Root Folder! <ERROR>" goto [ErrorHandler] [try1END] on error goto [ErrorHandler] '!CONVERT Power Basic Program exist end if
|
|