Jump to content
Sign in to follow this  
Yirrlaar

BlueStacks ADB HELP, please & TY

Recommended Posts

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

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

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.


"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Share this post


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

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...