lugi Posted November 28, 2007 Share Posted November 28, 2007 Hi all, I'm trying to run an autoscript in MS terminal server console, the following script run ok when the console is not minimized(you will get an OK dialog), but if you startup the script then minimize the terminal server console, you will get an "Failed-not found" dialog. Does anybody knows why? and how can I active a window in terminal server console? ;;-------------------------- Run("calc.exe") ; here you minimize the terminal server console window Local $title = "Calculator" Sleep(5000) If WinActivate($title) == 0 Then MsgBox(0, "", "Failed-not found") Else If WinWaitActive($title, "", 5) == 0 Then MsgBox(0, "", "wait failed") Else MsgBox(0, "", "OK") EndIf EndIf Link to comment Share on other sites More sharing options...
herewasplato Posted November 28, 2007 Share Posted November 28, 2007 You might look here:http://www.autoitscript.com/forum/index.ph...st&p=415240which points to here:http://www.autoitscript.com/forum/index.ph...st&p=337824 [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
lugi Posted November 28, 2007 Author Share Posted November 28, 2007 You might look here:http://www.autoitscript.com/forum/index.ph...st&p=415240which points to here:http://www.autoitscript.com/forum/index.ph...st&p=337824Thank you, but the ControlClick document says that we should use WinActivate before using ControlClick.I will try your suggestion first "ControlClick:RemarksSome controls will resist clicking unless they are the active window. Use the WinActivate() function to force the control's window to the top before using ControlClick()." 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