Jump to content
Sign in to follow this  
sarcasteak

ControlSend types of controls

Recommended Posts

sarcasteak

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.

Share this post


Link to post
Share on other sites
sarcasteak

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 by sarcasteak

Share this post


Link to post
Share on other sites
sarcasteak

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?

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.