steve Posted February 22, 2005 Share Posted February 22, 2005 I'm running jobs on accounts using Terminal Services. The idea is that the job can continue to run, or kick into action to do something, while the account is disconnected. When the account is connected, the job works as intended. When an account is disconnected, all windows appear as inactive and a window does not seem to be able to be made active. Some windows require me to send {Enter}. I have read about ControlSetText, but some of the windows have no visible controls (as reported by WinGetClassList) Is there a way to send input to the window rather than a control? Any suggestions gratefully received. Steve Link to comment Share on other sites More sharing options...
buzz44 Posted February 22, 2005 Share Posted February 22, 2005 ControlSend -------------------------------------------------------------------------------- Sends a string of characters to a control. ControlSend ( "title", "text", controlID, "string" [, flag] this can send to a minimized window . or even if a window has focud qq Link to comment Share on other sites More sharing options...
steve Posted February 22, 2005 Author Share Posted February 22, 2005 ControlSend -------------------------------------------------------------------------------- Sends a string of characters to a control. ControlSend ( "title", "text", controlID, "string" [, flag]this can send to a minimized window . or even if a window has focud<{POST_SNAPBACK}>Thanks, but the window is not minimized. The account is still logged on, but disconnected. Also, there are no controls in the window. No, I don't know how it was programmed - there's a couple of option buttons and a couple of active command buttons - I want to "select" the default command button. Link to comment Share on other sites More sharing options...
MHz Posted February 22, 2005 Share Posted February 22, 2005 (edited) Welcome,I think the command buttons you are mentioning, are controls?ControlClick should be able to click the buttons. But if Au3Info cannot see them, then maybe not. Edit: AutoitMacroGenerator can help with installers. Edited February 22, 2005 by MHz Link to comment Share on other sites More sharing options...
jdickens Posted February 22, 2005 Share Posted February 22, 2005 Is the script running on the terminal server itself, or on the remote machine? I assume the server. I would be a little surprised if you could access those windows in that case. And if the user is disconnected, in that case, there would be no access either. Am I getting it? I might be able to duplicate the issue here. J If I am too verbose, just say so. You don't need to run on and on. Link to comment Share on other sites More sharing options...
steve Posted February 22, 2005 Author Share Posted February 22, 2005 Yes, the script is running on the server. I use cmdow (http://www.commandline.co.uk/cmdow/ - not mine) to show info about windows. It shows all inactive when disconnected. I've just tried clicking on the window using MouseClick. Thanks for the clicking suggestion, but the button controls are not visible. It gave me the idea. The click is absolute - I've run cmdow from the AutoIt script to get the window on top and to a particular position. It looks like the clicking action (of proceeding to the next screen) occurs when I reconnect - I saw the fisrt screen change to the second screen when I reconnected, but I know it should have happened a couple of minutes earlier. Hmm. Previously, it didn't work as I wanted, but the script job finished. $cmd = 'cmdow "XX" /top /mov 100 100' RunWait(@ComSpec & " /c " & $cmd, "", @SW_HIDE) Is this correct to run inline? Link to comment Share on other sites More sharing options...
Blue_Drache Posted February 22, 2005 Share Posted February 22, 2005 (edited) $cmd = 'cmdow "XX" /top /mov 100 100' RunWait(@ComSpec & " /c " & $cmd, "", @SW_HIDE)Is this correct to run inline?<{POST_SNAPBACK}>The syntax looks correct to me, since you have the commands quoted correctly, but the single quotes will not be passed to RunWait. Most times it's better to just write it in there than use a variable, or use the variable for the "XX" section if thats what truly changes.RunWait(@ComSpec & ' /c ' & 'cmdow "' & $xx & '" /top /mov 100 100',"",@sw_hide) Edited February 22, 2005 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache 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