 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
Michael Rozenbaum
Joined: 18 Dec 2000 Posts: 6
|
|
dos commands |
|
1) Hi, below is my skript, which executes .bat file. when dos window is up and running, i am trying to execute dos commands to stop the execution. the command prompt does not respond, even when i am entering commands my self. the title of the window does not red: c:\winnt\system32\cmd.exe. instead i found that scheduler runs it in it own dos environment some kind. title of the window reads 24x7..... what am i doing wrong? script below. 2) secondly i could not get to work windowclickbutton. i did try it on a different windows, never got it to click a button. please help. the script: Dim(w_handle,number) dim(title,string,"24x7 -> P:\LAUNCHENGINE.BAT") dim(p_id,number) dim(w_handle_1,number) windowfind(title,w_handle) windowgetprocess(w_handle,p_id) processkill(p_id) //sendkeys("{CTRL}C") //wait(2) //sendkeys("{y}") //wait(2) //sendkeys("{ENTER}") windowclose(w_handle) wait(1) windowgetactive(w_handle_1) windowclickbutton(w_handle_1,"End Task")
|
|
Mon Dec 18, 2000 11:53 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
Re: dos commands |
|
0) SendKeys does not work with DOS box on NT. This is not supported by Windows NT. 1) Turn off the tracing and then it will work as normal 2) "End Task" button does not belong to the DOS window, it belongs to the Message box window. That's why the WindowClickButton statement does not work in this case as the specified window handle is not good. : 1) Hi, below is my skript, which executes .bat file. : when dos window is up and running, i am trying to execute dos commands : to stop the execution. : the command prompt does not respond, even when i am entering commands my : self. : the title of the window does not red: c:\winnt\system32\cmd.exe. : instead i found that scheduler runs it in it own dos environment some kind. : title of the window reads 24x7..... : what am i doing wrong? script below. : 2) secondly i could not get to work windowclickbutton. i did try it on a : different windows, never got it to click a button. please help. : the script: Dim(w_handle,number) : dim(title,string,"24x7 -> P:\LAUNCHENGINE.BAT") : dim(p_id,number) : dim(w_handle_1,number) : windowfind(title,w_handle) : windowgetprocess(w_handle,p_id) : processkill(p_id) : //sendkeys("{CTRL}C") : //wait(2) : //sendkeys("{y}") : //wait(2) : //sendkeys("{ENTER}") : windowclose(w_handle) : wait(1) : windowgetactive(w_handle_1) : windowclickbutton(w_handle_1,"End Task")
|
|
Tue Dec 19, 2000 12:13 am |
|
 |
Michael Rozenbaum
Joined: 18 Dec 2000 Posts: 6
|
|
Re: dos commands |
|
: 0) SendKeys does not work with DOS box on NT. This is not supported by : Windows NT. : 1) Turn off the tracing and then it will work as normal : 2) "End Task" button does not belong to the DOS window, it belongs : to the Message box window. That's why the WindowClickButton statement does : not work in this case as the specified window handle is not good. thanks, but could you tell me where do i turn the traicing off, please. and you are right. "end task was a button of the message box window, which usually appears when you try to end the task, that is why i did that, as you could see, script was closing the dos window. so windowclickbutton still did not work. please help.
|
|
Tue Dec 19, 2000 12:45 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
Re: dos commands |
|
Tracing is controlled in the options, Click Tools/Options menu then go to Log tab page of the options dialog. Use WindowFind to find the handle of the message box, and then try your windowclickbutton By the way, if instead of killing the DOS box you kill the instance of the DOS virtual machine, which is running your DOS box, you don't need to deal with all these "End process" messages. If you start the DOS program yourself using plain JAL Run or other Run.. statement you have the process id returned as a result. You can use it to kill the process. Here is an example: // Run the DOS command interpreter Dim process_id, number Run "cmd.exe", "", process_id // Let's wait 3 seconds so you have a chance to see the DOS box Wait 3 // Kill it ProcessKill process_id Is that simple? : thanks, but could you tell me where do i turn the traicing off, please. : and you are right. "end task was a button of the message box window, : which usually appears when you try to end the task, that is why i did : that, as you could see, script was closing the dos window. so : windowclickbutton still did not work. : please help.
|
|
Tue Dec 19, 2000 1:07 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|