This is an example macro for EventGhost that will enable you to retrieve your current window from your PC and get the info on it on your phone. Simply copy the following text to your EventGhost tree and a new Macro will be created: Code (XML): <?xml version="1.0" encoding="UTF-8" ?> <EventGhost Version="1688"> <Macro Name="Send Current Window" Expanded="True"> <Event Name="AutoRemote.Message.window" /> <Action> EventGhost.PythonScript(u"from eg.WinApi.Dynamic import (GetForegroundWindow)\nfrom eg.WinApi import (GetWindowText)\nfrom eg.WinApi.Utils import (GetWindowProcessName)\nwindow = GetForegroundWindow()\neg.CurrentWindowText = GetWindowText(window)\neg.CurrentWindowProcess = GetWindowProcessName(window)\nimport ImageGrab, datetime, os\nim = ImageGrab.grab()\ndirectory = r'C:/AutoRemote1/'\neg.CurrentScreenshot = directory + 'screenshot.png'\nif not os.path.exists(directory):\n os.makedirs(directory)\nim.save(eg.CurrentScreenshot)") </Action> <Action> AutoRemote.SendMessage('Sender', '', '', u'window=:={eg.CurrentWindowProcess}=:={eg.CurrentWindowText}', u'', u'', u'', '', u'{eg.CurrentScreenshot}', u'{eg.event.payload.sender.name}') </Action> </Macro> </EventGhost> Then send the message "window" from your phone (no quotes) and EventGhost will reply back with a message like Code (Text): window=:=PROCESS_NAME=:=WINDOW_TITLE In AutoRemote on your phone you can react to this message in Tasker with a "window=:=" command filter then access the process name with %arcomm1 and the window title with %arcomm2 in the task. You can even see the screen from your PC on your Android device by opening the file in %arfiles1 using either the "Open File" action in Tasker or the Open Image intent in AutoShare (open the link on your device).
Nifty tool. Although may I recommend posting with [code=xml][/code] tags when posting xml? Makes it easier to read at a glance.
yap. working great. now we can push the task every 30 seconds and collect logs for "whats goin on when you are not at home, even in the incognito mode and when the history and cookies are cleared"... the next step is aumatically make a screenshot and send it to phone...
Wow. That was fast. I wish i had this information in august when i wrote the article about EventGhost and Auto* plugins =) Now i can spy on my wife upd. worked for the first time. then after pushing the widget always shows the first pic. used "open file - %arfiles1 upd.2 When uploading to AutoRemote folder from EG, it makes screenshot (1), screenshot (2) etc as it doesnt delete the old one. but the %arfiles1 gets the screenshot.png so you have to delete the old file in Google Drive every time before the upload, or add timestamp for the name of the file in the pyton script "eg.CurrentScreenshot = directory + 'screenshot.png'" is you want to keep all the files
ok, the problem was in CyanogenGallery stock G+ photo app works perfect. anyway i'll add the timestamp to keep all the screenshots on the device
so in case someone interesded i modified the script to keep all the screenshots on device (originally they are overwritten each time). you need to change the pyhton script in the macro (double tap to edit). just change the lines with following: Code (Python): from eg.WinApi.Dynamic import (GetForegroundWindow) from eg.WinApi import (GetWindowText) from eg.WinApi.Utils import (GetWindowProcessName) window = GetForegroundWindow() eg.CurrentWindowText = GetWindowText(window) eg.CurrentWindowProcess = GetWindowProcessName(window) import ImageGrab, datetime, os, time im = ImageGrab.grab() directory = r'C:/AutoRemote1/' now_time = datetime.datetime.now() date = now_time.strftime("%Y-%m-%d-%I-%M-%S") eg.CurrentScreenshot = directory + 'screenshot-' + date + '.png' if not os.path.exists(directory): os.makedirs(directory) im.save(eg.CurrentScreenshot)