Jump to content
Yirrlaar

BlueStacks ADB HELP, please & TY

Recommended Posts

Yirrlaar
local $results, $h, $PID

$BlueStacks_Path = @ProgramFilesDir & "\BlueStacks\"
$BlueStacks_Path = StringReplace($BlueStacks_Path, "\\", "\")
$h = Run($BlueStacks_Path & "hd-Adb connect localhost","","",$STDIO_INHERIT_PARENT)
sleep(1000)
$PID = run($BlueStacks_Path & "HD-Frontend.exe Android")
WinGetProcess($PID)
sleep(1000)
Do
    $result = run($BlueStacks_Path & "HD-Adb shell getprop sys.boot_completed", "", "", BitOR($STDIN_CHILD, $STDERR_MERGED))
    ConsoleWrite("$result: " & $result & @CRLF)
    sleep(1000)
until $result = 1

Hi ALL, I am really knew at this and I am trying to figure out why I get an infinite loop when I am checking to see if BlueStacks is open.

If I do everything command line based, everything WORKS as above, but when I put it in AutoIT it just LOOPS & LOOPS & LOOPS. When I do the consolewrite, it's like it is giving me a PID# rather than return 1.

 

What am I doing wrong?

Share this post


Link to post
Share on other sites
Moonscarlet

Because the return of Run() is the PID of what you launched not 1 (if it succeeds):

Quote

Return Value

Success: the PID of the process that was launched.

 

Edited by Moonscarlet

Share this post


Link to post
Share on other sites
Moonscarlet

I guess you should see if it's not 0 or not @error for your check.

Share this post


Link to post
Share on other sites
JLogan3o13

As Bluestacks markets itself specifically as an "Android Gaming Platform", discussions on automating it run afoul of our forum rules. Please read them now, especially the part on game automation, before you post again.

  • Like 1

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×