Sign in to follow this  
Followers 0
PKSJ

Problem with the WinWait Function

4 posts in this topic

Hi guys,

I'm pretty new to using AutoIt. I created a simple script that launches a program and logs in for me. I am using the WinWait function to wait for the login window before entering the info. It was working fine.

However, now I want to create a simple GUI to enter other info to be used later by the script and for some reason it's not entering my login info in the right text boxes. I have to re-run the script to get it to enter the text.

When I remove the #include <GUIConstants.au3> line it works... I don't get it...

Help?

Thanks,

PK

; Jeff's Table Hopper automation script
; ver. 0.1
; Last updated : 2007-09-07

; Includes

#include <GUIConstants.au3>

; Variables (change with the quotes " ")
; Login Info
Global Const $ftlogin = "XXXX"
Global Const $ftpassword = "XXXX"
; FTP Path
Global Const $ftppath = "c:\green\FTP\FTP.exe"


;----------------- DO NOT EDIT BEYOND THIS POINT ------------------;
; Run FT
RunWait( $ftppath )

; Waits for Login screen to appear
; Enters Login Info
; Clicks "Login" button
WinWait ("Login")
ControlSetText ("Login", "", 256, $ftlogin)
ControlSetText ("Login", "", 257, $ftpassword)
ControlClick ( "Login", "Login", 1)

Share this post


Link to post
Share on other sites



Not sure how you can possibly automate FTP.exe when you are using RunWait() instead of Run(). :)

Share this post


Link to post
Share on other sites

Not sure how you can possibly automate FTP.exe when you are using RunWait() instead of Run(). :)

good catch MHz, I looked right at that and didn't really see it!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

oops! I got mixed up with using WinWait and put RunWait too... thanks alot!

good catch MHz, I looked right at that and didn't really see it!

8)

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