Fenix Posted November 26, 2007 Share Posted November 26, 2007 What i am trying to do is open a game launcher(2moons). Then click the Start button to enter the game. The problem i am having is the launcher has no Title to grab with WinGetHandle() so to get around this i tried to get it by the class and thats were the real problem begins.Also i know i can just do it with-out a handle but the it wouldn't be hard; mousemove and/or mouseClick.Can anyone Help me Fix my problem? dim $handle dim $FileName1 = "S:\Acclaim\2Moons\minilauncher.exe" dim $Enter = @CR Func TwoMoonsStart() run($FileName1) AutoItSetOption("WinTitleMatchMode", 4) $handler = WinGetHandle("[CLASS:#32770]","") AutoItSetOption("WinTitleMatchMode", 1) WinWaitActive($handle) ;WinWaitClose($handle);I was tring to test this out if FileExists($handle) then ControlClick($handle, "" ,1005);trys to click the start button ;MouseClick("Left",500,550);not the coords for the button Else MsgBox(0,"!!!","$halder does not exist"); this is poping up always endif GUISetState(@SW_HIDE) EndProgram() EndFunc Link to comment Share on other sites More sharing options...
Zedna Posted November 26, 2007 Share Posted November 26, 2007 AutoItSetOption("WinTitleMatchMode", 4) dim $handle dim $FileName1 = "S:\Acclaim\2Moons\minilauncher.exe" dim $Enter = @CR ;~ Func TwoMoonsStart() run($FileName1) WinWaitActive("[CLASS:#32770]") $handle = WinGetHandle("[CLASS:#32770]") ;WinWaitClose($handle);I was tring to test this out if WinExists($handle) then ControlClick($handle, "" ,1005);trys to click the start button ;MouseClick("Left",500,550);not the coords for the button Else MsgBox(0,"!!!","$halder does not exist"); this is poping up always endif ;~ GUISetState(@SW_HIDE) ;~ EndProgram() ;~ EndFunc Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
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