Jump to content

Controlsettext Help


Recommended Posts

ControlSetText("Telnet", "", "Edit1", "login pass" )

I need some help with the code above, i wanted to use the ControlSetText to automatically login to my telnet account, but for some reason it wont send the text. Since Send() function interupts with other instances of windows i attempted to use this method. Any help would be appreciated. Thanks

Link to comment
Share on other sites

I have recently tried ControlSend as well:

ControlSend("Telnet", "", "Edit1", "login pass")

The window "Telnet" is correct, but im not sure about the Class "Edit1" , although it still doesn't work. Any further suggestions? Thanks.

Link to comment
Share on other sites

The window spy should tell you the control. Put your cursor over the box you put your password in and hit Ctrl+Alt+F to freeze the Window Spy, then you can copy the name of the "last control under mouse" into your script. I just wrote a script 5 minutes ago to automate my login to our tech support software here and I used "ControlSend" to do it.

Link to comment
Share on other sites

test this for dos windows:

Run("cmd")
ProcessWait ("cmd.exe") 
winactivate("C:\")
send("dir{enter}")

Control don't work so good, but if you have active windows, send works fine.

this seems to work on XP well enough

ControlSend("C:\","","","dir{enter}")

edit, or more specifially

Run("cmd")
ProcessWait ("cmd.exe") 
winactivate("C:\")
ControlSend("C:\","","","dir{enter}")
Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

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...