I am making a script to work in BlueStacks but I've run into a problem and would appreciate some help! When I am in an app, clicks happen where I ask them to and it works great. But my script involves switching accounts, which boots from the app onto the home screen where I need to reopen the app. The problem is that when I use ControlClick on the app icon, it does not open the app. (It does briefly light up the icon indicating the mouse was there but a click wasn't received.) My first instinct was perhaps the click happened too fast so I made it hold down click before releasing. Again it would light up the icon but it wouldn't open the app.
Code: Select all
#SingleInstance, Force
Coordmode, Mouse, Window
SetMouseDelay, 80
WinGet, WinList, List, BlueStacks ; get the instance ids
winID1 = ahk_id %WinList1%
F7::
{
ControlClick, X1257 Y637, ahk_id %WinList1% ; Clicks a button in an app, WORKS! :)
Sleep, 100
Return
}
F8::
{
ControlClick, X430 Y180, ahk_id %WinList1%, , , , d
Sleep, 2000 ; Clicks the app icon on the home screen, DOESN'T WORK :(
ControlClick, X430 Y180, ahk_id %WinList1%, , , , u
Return
}
Home::ExitApp
I used Window Spy to see if there was a control on the home screen but there none (opened app does have a control).
I really need to just deliver that one click to open the app and my script will work but I've hit this impasse. I'd appreciate any ideas.
PS Opening the app from a desktop shortcut won't work because I need to use multi instance and there's no support for multi instance app shortcuts.
https://www.bluestacks.com