How do I use imported subroutines in sequencer?
Posted: Tue May 23, 2023 3:26 am
How do I use imported subroutines in the sequence editor? I am missing something, I am sure. Here goes the problem:
Here is the script:
SEQUENCE
IMPORT SUBS FROM "\\Mac\Home\Desktop\SharpCap Captures\__Sharpcap Sequences\test2.scs"
GOSUB ""
END SEQUENCE
and here is "test2.scs":
SEQUENCE
DEF SUB WaitAMoment
COUNTDOWN FOR 10 SHOWING "Please Wait..."
END SUB
END SEQUENCE
When I test the import step, or run it in the sequence editor, it appears to do the import without a problem (but gets an error when it hits GOSUB). However, the pull-down menu for GOSUB in the sequence editor is never populated with anything I can select in the sequence editor. I have tried everything I can think of to get the sequence editor to "import" the subroutines so I can select them in the pull-down, but nothing works. Docs aren't illuminating on this issue either.
To make sure the subroutines are callable I saved the script and then edited it in a text editor to be:
SEQUENCE
IMPORT SUBS FROM "\\Mac\Home\Desktop\SharpCap Captures\__Sharpcap Sequences\test2.scs"
GOSUB WaitAMoment
END SEQUENCE
I loaded this into the sequence editor, and it executed as expected, calling the subroutine and displaying the countdown.
Here is the script:
SEQUENCE
IMPORT SUBS FROM "\\Mac\Home\Desktop\SharpCap Captures\__Sharpcap Sequences\test2.scs"
GOSUB ""
END SEQUENCE
and here is "test2.scs":
SEQUENCE
DEF SUB WaitAMoment
COUNTDOWN FOR 10 SHOWING "Please Wait..."
END SUB
END SEQUENCE
When I test the import step, or run it in the sequence editor, it appears to do the import without a problem (but gets an error when it hits GOSUB). However, the pull-down menu for GOSUB in the sequence editor is never populated with anything I can select in the sequence editor. I have tried everything I can think of to get the sequence editor to "import" the subroutines so I can select them in the pull-down, but nothing works. Docs aren't illuminating on this issue either.
To make sure the subroutines are callable I saved the script and then edited it in a text editor to be:
SEQUENCE
IMPORT SUBS FROM "\\Mac\Home\Desktop\SharpCap Captures\__Sharpcap Sequences\test2.scs"
GOSUB WaitAMoment
END SEQUENCE
I loaded this into the sequence editor, and it executed as expected, calling the subroutine and displaying the countdown.