Jump to content
Sign in to follow this  

Problem with the WinWait Function

Recommended Posts

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




; 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

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!


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  

  • Create New...