ss18 Posted October 5, 2010 Posted October 5, 2010 I've searched a lot and can't seem to find what i am doing wrong (i'm sure it's simple). Just to get a grasp on what i'm doing and make my scripts better i want to make sure the window is in focus so it doesn't spew the commands to another window (which happens sometimes). So i'm just testing local for now. Al i am trying to do is open a telnet window, run the command "get". the window opens, the title is correct, but nothing happens, it's gotta be sometime simple! Run ( 'telnet.exe 127.0.0.1 80' ) Sleep ( 300 ) WinWaitActive ("Telnet 127.0.0.1") ControlSend ("Telnet 127.0.0.1", "", "get", "get(ENTER)")
wakillon Posted October 5, 2010 Posted October 5, 2010 Run ( 'telnet.exe 127.0.0.1 80' ) WinWait ("Telnet 127.0.0.1") WinActivate ("Telnet 127.0.0.1") WinWaitActive ("Telnet 127.0.0.1") ControlSend ("Telnet 127.0.0.1", "", "get", "get(ENTER)") Can you give the content of your Autoit windo info ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
ss18 Posted October 5, 2010 Author Posted October 5, 2010 Run ( 'telnet.exe 127.0.0.1 80' ) WinWait ("Telnet 127.0.0.1") WinActivate ("Telnet 127.0.0.1") WinWaitActive ("Telnet 127.0.0.1") ControlSend ("Telnet 127.0.0.1", "", "get", "get(ENTER)") Can you give the content of your Autoit windo info ? of the open telnet window? >>>> Window <<<< Title: Telnet 127.0.0.1 Class: ConsoleWindowClass Position: 64, 162 Size: 677, 342 Style: 0x14EF0000 ExStyle: 0x00040310 Handle: 0x00560BD0 >>>> Control <<<< Class: Instance: ClassnameNN: Name: Advanced (Class): ID: Text: Position: Size: ControlClick Coords: Style: ExStyle: Handle: >>>> Mouse <<<< Position: 298, 303 Cursor ID: 0 Color: 0x000000 >>>> StatusBar <<<< >>>> ToolsBar <<<< >>>> Visible Text <<<< >>>> Hidden Text <<<<
wakillon Posted October 5, 2010 Posted October 5, 2010 Try ControlSend ( "Telnet 127.0.0.1", "", "", "{ENTER}")or Send ("{ENTER}") ... AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
ss18 Posted October 5, 2010 Author Posted October 5, 2010 that fixed it, i had the ( and not the { for the enter... i knew it would be something simple!!!
wakillon Posted October 5, 2010 Posted October 5, 2010 that fixed it, i had the ( and not the { for the enter... i knew it would be something simple!!!Take a minute for Read the helpfile more carefully ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
ss18 Posted October 5, 2010 Author Posted October 5, 2010 Take a minute for Read the helpfile more carefully ! it's retarded cause i have the same script written without the ControlSend's, but when i typed the ENTER command i just messed up!!thanks again for your help!!!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now