EXACT FOR DOS SOMETIMES FAILS TO STARTUP

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
JERRYVANHENGEL
Newbie
Posts: 1
Joined: Fri Nov 19, 2004 1:59 pm

EXACT FOR DOS SOMETIMES FAILS TO STARTUP

Post by JERRYVANHENGEL » Fri Nov 19, 2004 2:10 pm

Hello there,

I try to startup Exact for dos at night (processing mutations). Sometimes it runs well but sometimes Exact doesn't startup. I turned off screensavers and keepin the energie saving off. So that cant be the problem. We are running Exact on a server. First I tried to open Exact with record and than open program Exact, but this failed lots of times, so I am opening Exact now form desktop, with double mouseclick.
Any known problems opening dos applications,
please help.....
I am using Windows XP (script didn't work at Windows 98)
and macro scheduler 7.2

Here is the Macro,

// C:\Program Files\MJT Net Ltd\Macro Scheduler\test2.scp
// Recorded on donderdag, november 4, 2004, at 02:44 PM

//Recorded Events
Let>WW_TIMEOUT=5
CapsOff
MouseMove>40,256
Wait>1.52
LClick
Wait>0.2
LDown
WaitWindowOpen>ntvdm-734.620.a40002
MoveWindow>ntvdm-734.620.a40002,-32000,-32000
ResizeWindow>ntvdm-734.620.a40002,160,31
Wait>0.03
LUp
Wait>6
Press Backspace
Wait>10
Send>jerry
Wait>1.38
Press Enter
Wait>1.73
Send>tom
Wait>1.64
Press Tab
Wait>1.34
Press Enter
Wait>3.19
Send>100
Wait>0.89
Press Enter * 2
Wait>4.34
Send>fww
Wait>60.00
Send>j
Wait>25
Press Enter
Wait>10.22
Send>11
Wait>5.25
Press Enter
Wait>10.81
Send>10
Wait>10.78
Press Enter * 4
Wait>100.00
Press Esc
Wait>80.00
Press Shift * 31
Send>J
Wait>120.58
Press Esc
Wait>120.00
Press Esc
Wait>120.00
Press Esc
Press Esc
Press Esc
Press Esc

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

Post by support » Fri Nov 19, 2004 2:30 pm

Seems an odd way of starting a program.

Have a look in the properties of the Exact desktop shortcut. Right click on the shortcut and select Properties.

You will see two important entries. One called 'Target', the second is 'Start in'. If your version of Windows is not English these are the first two fields on the dialog.

Now do this in your script to open the application:

Change Directory>StartIn
Run Program>Target

Where StartIn is whatever it says in the Start in (2nd) field on the desktop shortcut properties dialog, and Target is whatever it says in the first.

This should do exactly what the shortcut does and start the app.

Another way to do it is to execute the shortcut itself. Shortcuts are .lnk files. E.g.:

ExecuteFile>c:\documents and settings\Username\Desktop\MyShortcut.lnk

This will execute the shortcut which will in turn start the app. This is easier and more reliable than issuing a mouse click on the shortcut itself (what if there is another app in the foreground).

Don't forget to now wait for the app's window to appear before trying to focus it and send keystrokes to it:

WaitWindowOpen>App's Title
SetFocus>App's Title

Your script could be failing because you are sending a mouse click to a specific place on the screen but what if a) there is another application active covering the desktop and the shortcut, or b) the shortcut moves. You should do:

SetFocus>Program Manager

To focus the desktop to avoid scenario a.

However, I would avoid the sending of mouse clicks and instead use one of my first two suggestions.
MJT Net Support
[email protected]

Lumumba

Post by Lumumba » Fri Nov 19, 2004 2:48 pm

If it's plain DOS you could create a *.bat(ch) file and run it without any need to work with MSched on the shell/frontend of the DOS-box.

BTW: Any script which uses varying timmings (Wait>) includes the risk not being very reliable.

Hope you are aware that some keys triggered via MSched needs to be released. Check MSched's help.

e.g.
Press ALT
Send>FN
Release ALT
Good luck.

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