Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Run a program, wait for exit, run again ...
#1
I am trying to decide which to use regarding the RUN command. According to your examples on the help file, both are dependable. What is you suggestion? I am a transcriptionist and edits files in Notepad. I run many different macros and functions and as a practice, closes Notepad and reopens it for the next file. What I would like to have is to automate this procedure, to open Notepad automatically, but making sure it was closed properly in the first place before it opens it again. And also, to have it timeout for like 10 seconds if its not up yet, so that the macro can decide what to do next. In this case, run it again.

The following is what I have so far. I appreciate any comments you may have.

Code:
Copy      Help
;Run program and max. 10 seconds wait until it will fully loads
run "notepad.exe"; wait 10 P


;or
; Run notepad and wait until it exits:
int hProcess=run("notepad.exe")
wait 0 H hProcess; CloseHandle hProcess


Could you also explain what "CloseHandle" means?

Thank you


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)