Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open and close external program

Status
Not open for further replies.

joda124

Technical User
Jan 17, 2008
9
IT
Hi,

How can i open and close external program (i.e. notepad)?
What aspect commands can i use ? With "run" command open notepad but i don't known close command for it.

Thank you !!!
 
Like this maby?
Code:
proc main
integer TaskId
run "notepad.exe" TaskId   ;start notepad

taskexit TaskId      ;end notepad
endproc
The ProComm help/reference gives some examples
on start, control and termination of Win-tasks.

HTH
 
Dear Geirendre,

thank you for your reply, i known this script, open notepad with - run "notepad.exe" taskid - but is not possible to close notepad windows with taskexit command.
Have you some idea about this problem ?

Thank you!!
 
Dear knob

Thank you for your attention!!

I can use "alt-F4" in order to close "notepad.exe", but i don't known how can insert it in aspect script (sendvkey or others).
Just another last question, in the aspect example i can open notepad with taskactivate command but taskexit don't work, notepad.exe is always open !!

Thank you for your patience, i will waiting your replay !!
 
To be honest no, it's working fine here.

Code:
sendkey ALT 0x73
Should send the ALT-F4 combination.

You find the key codes under "Virtual Key Codes" in ProComm-help.

HTH
 
There are a whole set of capabilities available in windows xp.. one of them is TASKKIL.EXE available in your windows/system32 directory. TASKKILL /im notepad.exe will kill the notepad propgram in its tracks.

By the way - there are a ton of WINDOWS commands available as DOS programs in XP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top