Hi
Firstly - great product - I bought it years ago and have just rediscovered and upgraded...I'm hooked!
Probably a newbie problem...
My script has a long list of subroutines to be executed one after the other:
gosub>get-it
gosub>paste-it
GetClipBoard>End_text
Gosub>search
gosub>select_all
gosub>paste_to_tp
gosub>how_many_matches
gosub>user_choose_link
gosub>select_all
gosub>paste_to_tp
gosub>strip_out_text
It runs perfectly until it gets to the end of the subroutine how_many_matches, at which point is simply ignores the end>how_many_matches and runs straight on to the end of the program (skipping over everything below since everything else begins srt>
Is there a limit to the number of consecutive subroutines I can run?
The problem subroutine begins and ends like this:
srt>how_many_matches
Press CTRL
Wait>0.1
Press Home
Wait>0.1
Release CTRL
...
wait>%shortwait%
press alt
wait>%shortwait%
send>f
wait>%shortwait%
release alt
send>c
wait>%shortwait%
end>how_many_matches
goto>oy_dh
I have put the goto in as a debugger and it definitely jumps straight to the goto - ie it skips straight over the end> statement instead of jumping back to the next gosub> statement.
Any thoughts?
Thanks
Robert
Ignoring the end of my subroutines
Moderators: JRL, Dorian (MJT support)
A common cause for some oddities like this are spaces at the end of the line. For example, the SRT may be called "how_many_matches " with a space a the end, or the "End>" may have a space at the end.
This could mean the SRT and End don't have the same label and aren't paired up.
In the editor, there is a drop down menu "Edit -> Remove trailing spaces"... very handy.
Note that the extra space may be and your "End>paste_to_tp " too. (or instead of)
This could mean the SRT and End don't have the same label and aren't paired up.
In the editor, there is a drop down menu "Edit -> Remove trailing spaces"... very handy.
Note that the extra space may be and your "End>paste_to_tp " too. (or instead of)
Thanks for the quick response!
I tried the trailing spaces and it didn't change anything - I'll keep tinkering - but thanks anyway.
By the way I do have a trailing space elsewhere in the script (sending a search expression to a "find" dialog box). That works fine, but could the existence of a trailing space in a different subroutine be a problem? (ie are trailing spaces a no-no even when you actually want a trailing space?)
I tried the trailing spaces and it didn't change anything - I'll keep tinkering - but thanks anyway.
By the way I do have a trailing space elsewhere in the script (sending a search expression to a "find" dialog box). That works fine, but could the existence of a trailing space in a different subroutine be a problem? (ie are trailing spaces a no-no even when you actually want a trailing space?)
The limitation on number of subroutine allowed per .scp file isn't documented, but I would imagine it should support hundreds of subroutines.
Are you sure the control has reached wait>%shortwait% in your srt>>how_many_matches?
For testing purpose, please try:
srt>how_many_matches
Press CTRL
Wait>0.1
Press Home
Wait>0.1
Release CTRL
...
wait>%shortwait%
press alt
wait>%shortwait%
send>f
wait>%shortwait%
release alt
send>c
wait>%shortwait%
end>how_many_matches
Msg>Abnormal Exit
Wait>5
Do you see the "Abnormal Exit" message?
Are you sure the control has reached wait>%shortwait% in your srt>>how_many_matches?
For testing purpose, please try:
srt>how_many_matches
Press CTRL
Wait>0.1
Press Home
Wait>0.1
Release CTRL
...
wait>%shortwait%
press alt
wait>%shortwait%
send>f
wait>%shortwait%
release alt
send>c
wait>%shortwait%
end>how_many_matches
Msg>Abnormal Exit
Wait>5
Do you see the "Abnormal Exit" message?
Robert,
In order to determine what is causing this problem we would need to see the entire script. Can you send it to [email protected] as a file attachment (.scp file) and we will check it out.
There is no limit to the number of subroutines.
In order to determine what is causing this problem we would need to see the entire script. Can you send it to [email protected] as a file attachment (.scp file) and we will check it out.
There is no limit to the number of subroutines.
MJT Net Support
[email protected]
[email protected]