Jump to content

error when mixing commands


TDMIS
 Share

Recommended Posts

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")
Send("^{TAB}")
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")
Send("1234")
BlueBearrOddly enough, this is what I do for fun.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...