Error in substring command...??

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
funknugget
Newbie
Posts: 5
Joined: Fri Oct 17, 2003 11:27 am

Error in substring command...??

Post by funknugget » Sat Oct 18, 2003 7:17 am

Hi. I get an error that says "Error in SubString Command" when I run my macro. Can anyone tell me what this means exactly?

The macro keeps running even though there is an error and it only happens on the first time I have run the macro after restarting my computer. Then everything works fine. Any ideas?

funknugget
Newbie
Posts: 5
Joined: Fri Oct 17, 2003 11:27 am

more info

Post by funknugget » Sat Oct 18, 2003 7:26 am

Ok, I guess the error is coming on a MidStr command, but I can't understand why. Here is the section leading up to the error. Anybody see anything wrong with my code?

GetClipboard>Clipboarda
Length>Clipboarda,New
If>New=9,Glump,Glimp
Label>Glump
MidStr>Clipboarda,3,3,ClipboardB

Lumumba

Post by Lumumba » Sat Oct 18, 2003 3:25 pm

Maybe it's old fashioned Macro Scheduler dev style:

GetClipboard>Clipboarda
Length>%Clipboarda%,New
If>New=9,Glump,Glimp
Label>Glump
MidStr>%Clipboarda%,3,3,ClipboardB

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Oct 18, 2003 5:54 pm

I was able to step through original sample with no problem if the clipboard had a length of 9. When the length is less than 9 I got an error. The error is "Error - Subroutine/Label Glimp not found. But the error is because there was no Label>Glimp. When I add Glimp it all runs fine.
Result: Code looks fine to me. (MS 7.2.040 with 98SE)

Suggest looking for extra space characters aroung Glimp, Glump, New, Clipboarda, ClipboardB. Label names are also Case Sensitive so be careful in the IF> commands.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts