drquochoai Posted January 8, 2013 Share Posted January 8, 2013 (edited) >>>> Window <<<< Title: BlueStacks App Player for Windows (beta-1) Class: WindowsForms10.window.8.app.0.33c0d9d Position: 101, 38 Size: 1030, 652 Style: 0x16CA0000 ExStyle: 0x00050100 Handle: 0x0000000000060894 >>>> Control <<<< Class: BlueStacksApp Instance: 1 ClassnameNN: BlueStacksApp1 Name: Advanced (Class): [CLASS:BlueStacksApp; INSTANCE:1] ID: Text: _ctl.Window Position: 0, 0 Size: 1024, 576 ControlClick Coords: 529, 104 Style: 0x58000000 ExStyle: 0x00000000 Handle: 0x0000000000050864 And i write a ControlSend like this: ControlSend("BlueStacks App Player for Windows (beta-1)","","[CLASS:BlueStacksApp; INSTANCE:1]","{BACKSPACE}") But he is not working. When i delete the title of above code, he work well. I think the problem is in the title with string "(beta-1)", i dont know how to fix it. I have tried to change the title match mode by this code Opt("WinTitleMatchMode", 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase but the same, nothing work. Please help me!! Edited January 9, 2013 by drquochoai Link to comment Share on other sites More sharing options...
Blue_Drache Posted January 9, 2013 Share Posted January 9, 2013 (edited) From what I believe, WinTitleMatchMode is deprecated and makes no difference anymore, in any event, you should use mode 4 for the advanced. That being said, can you activate the window with WinActivate()? If you can, use this structure: $hwnd_Blue = WinActivate("BlueStacks App Player") if not $hwnd_Blue then ConsoleWrite("Something bombed with activating the window." & @CRLF) Exit endif ControlSend($hwnd_Blue,"","[CLASS:BlueStacksApp; INSTANCE:1]","{BACKSPACE}") If you're not wishing to activate the window, then get the window handle with $hwnd_Blue = WinGetHandle("BlueStacks App Player") if @error then ConsoleWrite("Something bombed with grabbing the handle." & @CRLF) Exit endif ControlSend($hwnd_Blue,"","[CLASS:BlueStacksApp; INSTANCE:1]","{BACKSPACE}") Edit: Sheesh ... there's an inconsistency in return values between WinGetHandle and WinActivate. :/ WinActivate doesn't set @error. *facepalm* Fixed. Edited January 9, 2013 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
JohnOne Posted January 9, 2013 Share Posted January 9, 2013 From what I believe, WinTitleMatchMode is deprecated and makes no difference anymoreWhere did you see that? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Blue_Drache Posted January 9, 2013 Share Posted January 9, 2013 Where did you see that?Mode 4 (Kept for backward compatibility) Apparently it's only Mode 4 that was deprecated. My bad. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache 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