Jump to content

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

Batch, there is no box to type the password, it just types the password through dos. Like typing netstat in cmd.exe, I don't get any Last Control Under Mouse when i place my cursor there.

Posted

Control functions don't work with DOS windows. And, if you see no control in any window (Meaning, not just DOS), then a control function can't be used.

Posted

Ah, Valik thanks. I was thinking of that but wasn't sure. Are there any other ways to send text to a dos window without interference such as the ones caused by Send ( ) ?

Posted (edited)

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.

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
  • Recently Browsing   0 members

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