Get CPR certified in 30 minutes at CPR Test Center.
Echo & Alexa Forums

Using Alexa to make my laptop take a screenshot and save it in a specific folder

0 Members and 1 Guest are viewing this topic.

remotemass

Sometimes I leave one of my laptops playing online radio, and I sleep with it playing it.
And sometimes, I am sleeping but there is a song playing that I would like to keep in my records so would be really nice if I could just tell Alexa to take a screenshot of the radioplayer on my laptop and save it in a specific folder that I may analyse in the next day.
Maybe I could have different folders, for instance five general folders for rating a song from one to five stars and maybe even other folders like one for songs that I think would be nice in specific playlists... I think you get the idea.

I am looking for something like:
When I say "Alexa Screensave Fivestars" it makes my laptop take a screenshot and save it in folder named "Fivestars"
But if I say "Alexa Screensave Fourstars" it saves the screenshot in folder named "Fourstars"
Or if I say "Alexa Screensave NiceForMyFriend" it saves the screenshot in folder named "NiceForMyFriend".

I think you get the idea.
Can anyone help me? I am very new to making Alexa (Amazon Echo) have new skills.

mike27oct

This task is above and beyond the call of duty for Alexa, unless I am totally wrong and someone corrects me.

Offline jwlv

  • *
  • 1487
Alexa can't do that yet. And probably not in the near future. But the next best thing you can do is say, Alexa add [whatever song] to my todo list.

At least Alexa will keep a record of what you said so that you can review it later.

remotemass

As it seems Alexa can not do it yet I thought of exploring a bit Windows 10 Cortana and Speech Recognition capabilities.
Since the laptop I am using to listen to online radio at night is running Windows 10, it turns out the solution was really quite simple.

1) Installed an app called "Windows speech recognition macros 12.0"
2) Created a "New Speech Macro..." to -> "Run a Program"
3) Just set the speech command desired and the path of the program to run: a batch file I created in notepad.
4) My batch file, created with notepad, just executes the free software app that you can download from: http://www.ducklink.com/CmdCapture.exe (Description and Notes/Tutorial at: http://www.ducklink.com/p/command-line-screen-capture)
5) I will certainly be able to customize it a lot. As I use to say: "Skype is the limit!..."

It works! I am a happy man now ;-)
« Last Edit: March 17, 2017, 11:00:21 pm by remotemass »

mike27oct

Clever. Have fun with your creation.

remotemass

Actually, having it working as I mentioned in the previous post was great because eventually doing my research on the web I found out that I can trigger batch files on my PC using Alexa.
So now, I am totally free to use Alexa to command my PC as I want!

This is what is needed.
1) https://ifttt.com (If you are not used to it make sure you don't get lost looking in the ready made recepies. Instead, once you create an account and log in, go straight to the top right corner and click the arrow next to your username and choose "New Applet"). Then click in the "+ this" of the big blue "if+this_then_that" and search for Amazon/Alexa and add it. Pretty easy to find it, as their is just one that will show up when you search for Alexa!

2) Then choose the first box: that says, "Say a specific phrase(...)" and choose the words/expression you want for Alexa to trigger an event.

3) Now click on the big blue "+_that" of the big blue text "if[ALEXA]_[then_+_that]"
Search for Pushbullet. You will need to create an account with facebook/or/google and also, make sure you download the desktop app of Pushbullet that you will need to play around with a bit, I suppose, to configure the settings and get to know it a bit better. You will need to set it to give you an API key and set an encryption password. You will later have to use the two things when you configure the "Plugin: PushBullet" in EventGhost itself, when you add it to the Autoplay. Then you just need to right-click on "Plugin: PushBullet" and choose "Configure item" from the context menu. I will explain it again, later on when we reach 5).

Anyway, we are still in www.ifttt.com, right? And so, now choose the action that says "Push a link (...)". The way I used it, you can give any Title and URL that you want. It doesn't matter, since you only want to use the trigger feature, without caring about the title and URL themselves.
Then just review and click FINISH at the end of the page.

[Quite simple, right? It took me a lot of time, though. Because I couldn't find much documentation or step-by-step tutorials out there. So just had to find my way, trying it out. You are lucky, to have it here all step-by-step!]

4) Now this part may be a bit more difficult but as I am explaining it all here, may be easy as well.
First, you'll want to install the latest build of Eventghost. Once installed you'll also want to download the Pushbullet Plugin for Eventghost. Extract the archived "Pushbullet" folder and place it in the Eventghost/plugins directory where you installed Eventghost.

Basically follow these 4 steps (as quoted from: http://www.eventghost.net/forum/viewtopic.php?f=9&t=5709)
A) Complete installation (for new users)
A.1) You have to download the file PushBulletPluginFolder.zip [http://www.eventghost.net/forum/download/file.php?id=4010]
A.2) Unzip it and the folder PushBullet (including content) move to the folder ...\EventGhost\plugins.
A.3) Download the file __init__.py (at the bottom of the post: http://www.eventghost.net/forum/download/file.php?id=5032) and move it to new folder ...\EventGhost\plugins\PushBullet.
A.4) Restart EventGhost and add the plugin PushBullet to your configuration [Menu->Configuration->Add Plugin (Find it in the last folder_OTHER)].

5) Once you have done this, open Eventghost, click New (CTRL-N) and you will see a blank page with a "Autostart" in the right pane. All your macros/actions will fall under this. To load Pushbullet, you will need to add a plugin to Autoplay.
This will load the plugin and allow you to begin pushing links to Eventghost.

Then, add a folder to the Configuration Tree, and call it as you wish. I called it 'MyMacro'.
Right-click it and choose 'Add event' giving it the name of the link name you gave in PushBullet.
Then, Right-click again your 'MyMacro' folder and choosing 'Add action' and then System-> Start Application and in the "Executable: " textfield you may put the path of an executable or of a batch file.

Should be all clear by now. I hope I am not missing anything important. Just make sure you set up the encryption password and API key in PushBullet and then set it in the EventGhost "PushBullet" event you will have to create.

And that's pretty much. Now you have the power of batch files and executables of your PCs in the hands of Alexa, at the commands of your voice. Great stuff, indeed!

>>> >>> >>>   >>> >>> >>>   >>> >>> >>>   >>> >>> >>>   >>> >>> >>>
Last, but not least, according to <<tetraecho>>, as he says (in this thread http://www.echotalk.org/index.php?topic=612.0): "You don't need IFTTT, or Pushbullet Look at: http://www.eventghost.net/forum/viewtopic.php?f=2&t=7429 to let Alexa talk to EventGhost without them".
That is if node.js and Lambda Functions do not scare you... I will certainly leave it for another time, as my solution is working fine.

It is even easier with HA-Bridge though your limited to on/off/dim trigger commands.