Author |
|
smarty Super User
Joined: May 21 2006 Location: United States
Online Status: Offline Posts: 728
|
Posted: July 11 2020 at 16:55 | IP Logged
|
|
|
So happy to see a new ph_run1() function
that should allow for hiding pop up windows when
running commands from within PH.
Because the new FireTV plugin that comes with PH
doesn't provide any feedback for triggers, I am
looking into developing my own solutions (having ADB
write to a text file and having PH file monitor
trigger off that)...Anyway...that is another story.
What I am trying to accomplish presently is to run
ADB commands from PH without a pop up window.
Home Command:
ph_run("c:\adb\adb.exe shell input keyevent 3")
Launch Netflix:
ph_run("adb shell monkey -p com.netflix.ninja 1")
Launch HDHomeRun:
ph_run("c:\adb\adb.exe shell monkey -p
com.silicondust.view 1")
Ect, Etc,...
Without a command window flashing on the screen as the
command executes.
Dave - I think I have tried almost every variation on
the ph_run1() command. Any insight you could provide
here?
One last one...this is how I see which application is
on screen:
ph_run("adb shell dumpsys window windows
>c:\powerhome\ADB-Control\ADB_windows1.txt")
The above command (which outputs a text file for the
file monitor) works in a CMD window, but not from
within PH.
Edited by smarty - July 11 2020 at 17:58
__________________ Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: July 11 2020 at 22:10 | IP Logged
|
|
|
Steve,
You've got a couple of options listed below. Both will run ADB without opening a window.
Without Shell Execute:
ph_run1('c:\android_sdk\adb.exe','kill-server','',0,8)
With Shell Execute:
ph_run1('c:\android_sdk\adb.exe','kill-server','',0,20)
The following worked for me to run ADB without a window and redirect output to a file:
ph_run1('cmd.exe','/c "adb shell dumpsys window windows>ADB_windows1.txt"','c:\android_sdk',10000,72)
and:
ph_run1('cmd.exe','/c "adb shell dumpsys window windows>ADB_windows1.txt"','c:\android_sdk',10000,84)
and another where I redirect the file output to a different directory:
ph_run1('cmd.exe','/c "c:\android_sdk\adb.exe shell dumpsys window windows>adb_windows1.txt"','c:\users\hello there\desktop',10000,84)
Out of curiosity, what kind of triggers would you like to be fired for the FireTV plugin? It might be simple enough for me to add.
Hope this helps,
Dave.
|
Back to Top |
|
|
|
|