acecase Posted December 19, 2003 Posted December 19, 2003 (edited) Hey, I am haveing some problem useing vareables as parameters for AutoIt functions. I have had the problem in some functions and not in others so I wander if its a syntax problem I'm haveing or if these functions just don't support it. This works fine.. $vAwayMsg = IniRead("chatbt.ini", "Messages", "awayMsg", "I'm away.") Send("/away ") ClipPut($vAwayMsg) Send("^v") However this doesn't seem to be working.. $vWinTitle = IniRead("chatbt.ini", "Options", "windowTitle", "Klient") $vFailed = 0 Do $vFailed = $vFailed + 1 Sleep(1000) If $vFailed = 7 loadKlient() EndIf Until WinActive($vWinTitle) ;have tried this with and without quotes ("$vWinTitle") $vFailed = 0 Sleep(1000) WinMove($vWinTitle, "", 0, 0) ;this one too I have tried this with WinMove useing the actual window title instead of the var and the program just opens and sets there for 7 seconds untill the $vFailed var reaches its exit point so I am assumeing it isn't seeing the rite window title wich i have double checked and it is stored correctly in $vWinTitle. I dunno, Im sure its something i have looked over. Thanks for any help offerd Edited December 19, 2003 by acecase
Developers Jos Posted December 19, 2003 Developers Posted December 19, 2003 acecase, I tried below script and that works fine for me... Could it be that you need to specify: AutoItSetOption("WinTitleMatchMode", 1) to match anysubstrinfg in the title ? jos $vWinTitle = IniRead("chatbt.ini", "Options", "windowTitle", "Untitled - Notepad") $vFailed = 0 Do $vFailed = $vFailed + 1 Sleep(1000) If $vFailed = 7 loadKlient() EndIf Until WinActive($vWinTitle) sleep(1000) WinMove($vWinTitle, "", 0, 0) ;this one too Exit(0) func loadklient() run("notepad.exe") return endif SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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