Jarrett Posted October 2, 2020 Share Posted October 2, 2020 (edited) I have a script that opens a program and navigates through it, but there can be errors sometimes so I tried updating my last version to correct a new error. I was changing a line of my script to be better suited to closing the program. I tested the new command using this script: While ProcessClose ("T.exe") WEnd That worked so i tried adding it. My original script runs with no issue: Opt("WinTitleMatchMode", 2) While 1 If WinExists ("", "w.dsp") Then WinActivate ("[CLASS:MRWF]") Sleep(60000) Else WinKill ("[CLASS:MRWF]") MsgBox(0, "STARTING TRACKER - PLEASE DONT INTERFERE", "This tracker script will restart until it completes successfully. Please dont touch or click anything! ", 9) Run('C:\Program Files (x86)\MEDITECH\Workstation4.x\T.exe') Sleep (5000) WinActivate ("[CLASS:MRWF]") Send("{ENTER}") Sleep (5000) Send("{ENTER}") Sleep (5000) Send("D.ED{ENTER}") Sleep (5000) Send("1TRACKR{ENTER}") Sleep (5000) Send("{ENTER}") Sleep (5000) Send("JPUB.PT3{ENTER}") Sleep (5000) EndIf WEnd I changed the WinKill line to ProcessClose ("T.exe") and now the script wont launch. It says Unable to open the script file Any ideas how i messed up? Edited October 2, 2020 by Jarrett Link to comment Share on other sites More sharing options...
Jarrett Posted October 2, 2020 Author Share Posted October 2, 2020 I got it to work by compiling the script x64. I can try to make sure anyone else who uses my script to make their own knows this, but is there a better way? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now