patrik2991 Posted May 19, 2010 Posted May 19, 2010 (edited) ... Options() Global $prog = "Notepad" Func Options() ... GUICtrlCreateLabel("Program Name:", 10, 10) $client = GUICtrlCreateInput("Notepad", 80, 7, 200, 20) $Start = GUICtrlCreateButton("Start", 10, 300,100) $Exit = GUICtrlCreateButton("Quit", 290, 300,100) ... While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Exit Exit Case $msg = $Start Go() EndSelect WEnd EndFunc Func Go() While 1 Winactivate($prog) ... The Error: Variable used without being declared.: Winactivate($prog) Winactivate(^ ERROR Can someone help me what is the problem, and how can i solve it plz? Edited May 19, 2010 by patrik2991
JohnOne Posted May 19, 2010 Posted May 19, 2010 You are running your function before declaring the variable Try Global $prog = "Notepad" Options() Also you might want to use wintitlematchmode AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now