Jump to content
Sign in to follow this  
Syntaxe

Newbie Problem

Recommended Posts

Syntaxe

I just started to learn AutoIt.

And know I am tring to make a script, that opens IE, types in a url,

starting PuTTY, auto puts in the choosen info.

Well, my problem is that the first Send("!r") dont work as it should.

Because when I come to the "Start - Save - Close" its just standing still.

And yes I know that the Send($IP & "{tab}" & $PORT & "{tab}" & "{left}{left}" & "{enter}") is kinda absurd line xD - but it works :P

Someone see the problem?

; Here is our variables
$IP = "ip"
$PORT = "port"

; Here starts our script
Run(@ComSpec & " " & "/c start IEXPLORE.EXE")
WinWaitActive("Microsoft Internet Explorer")
Send("{F6}")
Send("http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe{enter}")
WinWaitActive("File Download")
Send("!r")
WinWaitActive("Security Warning","")
Send("!r")
WinWaitActive("PuTTY Configuration")
Send($IP & "{tab}" & $PORT & "{tab}" & "{left}{left}" & "{enter}")
WinWaitActive($IP & " - PuTTY")
MsgBox(0, "Success!")
Edited by Syntaxe

Share this post


Link to post
Share on other sites
Zedna

Welcome to AutoIt comunity.

It's good first attempt.

Here is some improvement:

; Here is our variables
$IP = "ip"
$PORT = "port"

; Here starts our script
InetGet("http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe", "C:\putty.exe")
Run("C:\putty.exe")
WinWaitActive("PuTTY Configuration")
Send($IP & "{tab}" & $PORT & "{tab}" & "{left 2}" & "{enter}")
WinWaitActive($IP & " - PuTTY")
MsgBox(0, "Success!")

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  

×