Sign in to follow this  
Followers 0
ss18

Telnet Windows & ControlSend

7 posts in this topic

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)")

Share this post


Link to post
Share on other sites



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.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Try ControlSend ( "Telnet 127.0.0.1", "", "", "{ENTER}")

or Send ("{ENTER}") ...Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

that fixed it, i had the ( and not the { for the enter... ;) i knew it would be something simple!!!

Share this post


Link to post
Share on other sites

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 ! Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Take a minute for Read the helpfile more carefully ! Posted Image

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

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  
Followers 0