Jump to content

Unable to open the script file / I changed one line


Recommended Posts

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 by Jarrett
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...