Jump to content

Problem with the WinWait Function


PKSJ
 Share

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

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)
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...