General Macro Scheduler discussion
Moderators: JRL, Dorian (MJT support)
-
ksimmons
- Newbie
- Posts: 6
- Joined: Wed Aug 06, 2003 9:37 pm
- Location: Lockheed Martin
Post
by ksimmons » Wed Aug 06, 2003 9:47 pm
I am writing a script that has 2 subroutines. Only one of the subrountines was executed and I got an error message saying "cannot find label subrountine SetupConn" when trying to execute the second subroutine. What is wrong with my code?
Gosub>FindSvr
Gosub>SetupConn
SRT>FindSvr
// labels and code statements are here ...
END>FindSvr
SRT>SetupConn
// labels and code statements are here ...
END>SetupConn
Thanks,
Kina

-
support
- Automation Wizard
- Posts: 1450
- Joined: Sat Oct 19, 2002 4:38 pm
- Location: London
-
Contact:
Post
by support » Wed Aug 06, 2003 10:19 pm
Hi,
There is nothing wrong with the code you posted. I just copied and pasted it into a new script and it worked without error.
There must be something not quite right with your actual script, because the script you posted is fine. Check for trailing spaces or some other chars in the subroutine name compared with the name being called. There must be a difference.
-
ksimmons
- Newbie
- Posts: 6
- Joined: Wed Aug 06, 2003 9:37 pm
- Location: Lockheed Martin
Post
by ksimmons » Thu Aug 07, 2003 7:31 pm
Here is my entire program. I am still getting the same error message, "Error - Subrountine/Label SetupConn Not Found!"
Can you tell me what I am doing wrong.
// Variables
Let>logFileName=c:\dms\logs\TSIU.log
// get each part of the date separately
Day>the_day
Month>the_month
Year>the_year
// get each part of the time
Sec>Seconds
Min>Minutes
Hour>Hour
// This code was created to open a log file and log messages throughtout the install
// example) 01-15-2003 12:53:20 3000 Macro completed successfully
// The log file format for date and time append to each line entry
Let>the_time=%Hour%:%Minutes%:%Seconds%
Let>logFileDate=%the_month%-%the_day%-%the_year% %the_time%
// Write a message
WriteLn>%logFileName%,result,%logFileDate% 4000 Entering the script to create X.400 connectors
// Display the variables' value
// MessageModal>%logFileName%
// MessageModal>%WIN_DIR%
// MessageModal>%SYS_DIR%
Gosub>FindExchSrvr
Gosub>SetupConn
//////////// Subroutines //////////
SRT>FindExchSrvr
// Locate the exchange server's
RegistryReadKey>HKEY_LOCAL_MACHINE,Software\Microsoft\Exchange\Setup,Services,exchsrvrLoc
MessageModal>Enter FindExchSrvr ....
//MessageModal>%exchsrvrLoc%
IfFileExists>%exchsrvrLoc%\Admin.exe,StartExchange
// if file does not exists ask user to start up exchange server and maximize the windows
Label>StartExchange
Let>svrFileName=%exchsrvrLoc%\Admin.exe
//ExecuteFile>%svrFileName%
END>FindExchSrvr
SRT>SetupConn
MessageModal>Enter SetupConn ....
END>SetupConn
-
support
- Automation Wizard
- Posts: 1450
- Joined: Sat Oct 19, 2002 4:38 pm
- Location: London
-
Contact:
Post
by support » Thu Aug 07, 2003 8:48 pm
I just copied your code, pasted it into a new macro, removed trailing spaces (Edit menu) and it worked perfectly. Perhaps you have an erroneous space or some other control char in there, but it worked fine for me. No errors at all.
-
ksimmons
- Newbie
- Posts: 6
- Joined: Wed Aug 06, 2003 9:37 pm
- Location: Lockheed Martin
Post
by ksimmons » Fri Aug 08, 2003 8:38 pm
The removing trailing white space worked perfectly.
