Hopefully, this is nothing more than my forgetfulness...
I want to set up a hotkey to execute an SBASIC program. Obviously I can do something like this with HOT_CMD to send a command to SBASIC to issue an EX win1_sbasicprogname_bas command to BASIC.
ERT HOT_CMD("s","EX sbasicprogname_bas")
Which works OK, but I couldn't get program starting commands like HOT_LOAD to do this - ERT HOT_LOAD("s","win1_sbasicprogname_bas") just grunts and fails to start the program when I try to use it.
Am I missing something obvious here, or is this not possible? Maybe it has to do with who owns the SBASIC job - that it has to be started from the main SBASIC?
Executing SBASIC programs from hotkeys
Re: Executing SBASIC programs from hotkeys
Dilwyn,dilwyn wrote: ↑Thu Jun 15, 2023 1:59 pm Hopefully, this is nothing more than my forgetfulness...
I want to set up a hotkey to execute an SBASIC program. Obviously I can do something like this with HOT_CMD to send a command to SBASIC to issue an EX win1_sbasicprogname_bas command to BASIC.
ERT HOT_CMD("s","EX sbasicprogname_bas")
Which works OK, but I couldn't get program starting commands like HOT_LOAD to do this - ERT HOT_LOAD("s","win1_sbasicprogname_bas") just grunts and fails to start the program when I try to use it.
Am I missing something obvious here, or is this not possible? Maybe it has to do with who owns the SBASIC job - that it has to be started from the main SBASIC?
even if the command name may suggest HOT_LOAD has anything to do with "LOAD" - It hasn't. HOT_LOAD belongs into the league of HOT_CHP and can only load and start executable programs. And, even if you can EXEC them, SBASIC programs just aren't.....
You can start SBASIC programs using HOT_CMD, but that simply pushes your command string to the current SBASIC input line - If that SBASIC interpreter is not idle atm, it won't work..
Thankfully, there is the SBASIC thing that can be employed:
Code: Select all
ERT HOT_THING ("<key>","SBASIC";"<command string>", "<job name")
Last edited by tofro on Thu Jun 15, 2023 3:27 pm, edited 2 times in total.
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
-
- Font of All Knowledge
- Posts: 4005
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Executing SBASIC programs from hotkeys
Hi Dilwyn,
Try:
ERT HOT_THING('s',"SBASIC";"LRUN 'sbasicprogname_bas"")
Should load SBASIC and put the LRUN statement into the SBASIC channel #0
But, too late... Torfro beat me
Try:
ERT HOT_THING('s',"SBASIC";"LRUN 'sbasicprogname_bas"")
Should load SBASIC and put the LRUN statement into the SBASIC channel #0
But, too late... Torfro beat me
Last edited by Derek_Stewart on Thu Jun 15, 2023 3:41 pm, edited 2 times in total.
Regards,
Derek
Derek
Re: Executing SBASIC programs from hotkeys
Great, thanks guys. I'd forgotten about the sbasic thing. Will give it a go shortly.
--
All things QL - https://dilwyn.qlforum.co.uk/index.html
All things QL - https://dilwyn.qlforum.co.uk/index.html