sarcasteak Posted December 22, 2009 Share Posted December 22, 2009 What options are available for the different types of controls? I see in the help it says you can use "standard MS controls" but it only lists edit and button. How can I get access to save exclusively through controlsend/controlclick? Is there a specific way to call File > Save as > etc? And do I have to call the submenu different than "[CLASS:Notepad]"? For example, this is my guesswork on how it could be done: Run("notepad.exe") ControlSend("[CLASS:Notepad]", "", "Edit1", "This is a line of text in the notepad window") sleep(1000) ControlClick("[CLASS:Notepad]", "", "[CLASS:Button; TEXT:File; INSTANCE:1]") sleep(1000) ControlClick("[CLASS:Notepad]", "", "[CLASS:Button; TEXT:Save as; INSTANCE:1]") sleep(1000) ControlSend("[CLASS:Notepad]", "", "Edit1", "c:\test1231.txt") sleep(1000) ControlClick("[CLASS:Notepad]", "", "[CLASS:Button; TEXT:Save; INSTANCE:1]") The reason I want to use controlclicks is because this script will be called remotely without being logged into the system via normal means. Link to comment Share on other sites More sharing options...
Bert Posted December 22, 2009 Share Posted December 22, 2009 Look at the AutoItWindowInfo tool. It can give you the ID of the window in question and usually the ID of the control you need to work with. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
sarcasteak Posted December 22, 2009 Author Share Posted December 22, 2009 (edited) Cool, thanks. That helps a lot. Unfortunately no information is returned when I hover over or click "file". Any idea how I can simulate the opening of the file menu and clicking "save as" through the control methods? Edited December 22, 2009 by sarcasteak Link to comment Share on other sites More sharing options...
sarcasteak Posted December 26, 2009 Author Share Posted December 26, 2009 Hi Guys, sorry, still having issues with this. Any idea how to emulate mouse clicks so they work when ran with pstools? I assume using control sends would work based on advice I earlier received, but it isn't easy figuring out exactly which commands to send. Any advice? 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