Jump to content
Sign in to follow this  

error when mixing commands

Recommended Posts


can the send command be used in conjunction with other commands like controlfocus, controlclick, etc..... ????

Share this post

Link to post
Share on other sites

Sure. You can trade them off with each other.

This example opens the "Add Port" dialog in the Windows Firewall control panel, sets the focus to the second Edit box (the port number) and then uses Send to add the port number. I included but commented out the ControlSetText command that you could also use in this situation.

Run("RunDll32.exe shell32.dll,Control_RunDLL firewall.cpl")
WinWait("Windows Firewall")
WinWaitActive("Windows Firewall")
ControlClick("Windows Firewall", "Windows Firewall", "Add P&ort...")
WinWait("Add a Port")
;~ ControlSetText ( "Add a Port", "Windows Firewall", "Edit2", "1234" )
ControlFocus("Add a Port", "Windows Firewall", "Edit2")

BlueBearrOddly enough, this is what I do for fun.

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.