Error after compiling into .EXE , what happened?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
ct976
Newbie
Posts: 7
Joined: Wed Dec 08, 2004 8:08 pm

Error after compiling into .EXE , what happened?

Post by ct976 » Fri Feb 18, 2005 6:26 pm

shouldn't the script work exactly the same, with the same timing after compilation?

in my script,

i open a Dialog box and show some instructions, and then asks for some input for user name and password.

here is the code:


// instruction message
Dialog>Instructions
Caption=Instructions
Top=247
Width=473
Left=217
Height=160
Label=** Instructions **,185,8
Label=1. Save today's list of CIC and WTN's in 'C:\RESULTS\514.csv',30,36
Label=2. Close all programs,30,56
Label=3. Stop the process anytime by pressing "SHIFT + ESC",30,76
EndDialog>Instructions
show>Instructions
MoveWindow>Instructions,1,1

// open siebel
Input>login,Enter Your Oracle Siebel Reporting Server login:
If>login=,end
Input>password,Enter Your password:
If>password=,end

CloseWindow>Instructions

// run SQL plus in DOS
Press LWinKey
Send Character/Text>r
release LWinKey
wait>0.5
Send Character/Text>cmd
press enter
wait>1.5
Send Character/Text>sqlplus %login%/%password%@siebrpt
press enter
wait>4



this works normally like its supposed to when i run the .SCP file in macroscheduler, but after compiling,
it wont pop up the Dialog box anymore. and i get the "Instructions box not present error" with the option of Abort/Ignore


whats going on?!?

:evil:

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Fri Feb 18, 2005 6:37 pm

I get the error when running your script uncompiled. The problem is caused by the CloseWindow command which in my case attempted to close the window after the dialog was closed - hence it complained that the window you wanted to close does not exist.

I have a number of points

1. Why use MoveWindow when you can just set the X,Y coordinates of the dialog in the dialog block?

2. Why use CloseWindow to close a dialog - just use the CloseDialog command.

3. At several points you try to jump to a non-existant label called end. This causes an error.

If you change CloseWindow for CloseDialog and put the non-existant label in you shouldn't get any errors.
MJT Net Support
[email protected]

ct976
Newbie
Posts: 7
Joined: Wed Dec 08, 2004 8:08 pm

Post by ct976 » Fri Feb 18, 2005 6:49 pm

hmmm for some reason i am getting no errors when i run it uncompiled...
i changed the script using your suggestions and it works the same when uncompiled.

originally, where does it close the dialog before i use the CloseWindow> command (cause of the error)?

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Fri Feb 18, 2005 7:04 pm

When I closed it.

This is what your script should look like:


// instruction message

Dialog>Instructions
Caption=Instructions
Top=1
Width=473
Left=1
Height=160
Label=** Instructions **,185,8
Label=1. Save today's list of CIC and WTN's in 'C:\RESULTS\514.csv',30,36
Label=2. Close all programs,30,56
Label=3. Stop the process anytime by pressing "SHIFT + ESC",30,76
EndDialog>Instructions
show>Instructions

// open siebel
Input>login,Enter Your Oracle Siebel Reporting Server login:
If>login=,end
Input>password,Enter Your password:
If>password=,end

CloseDialog>Instructions

// run SQL plus in DOS
Press LWinKey
Send Character/Text>r
release LWinKey
wait>0.5
Send Character/Text>cmd
press enter
wait>1.5
Send Character/Text>sqlplus %login%/%password%@siebrpt
press enter
wait>4
Label>end
MJT Net Support
[email protected]

ct976
Newbie
Posts: 7
Joined: Wed Dec 08, 2004 8:08 pm

Post by ct976 » Fri Feb 18, 2005 8:32 pm

thanks

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