Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Windows Command Line
-
tominator007
- Posts: 5
- Joined: Fri Dec 19, 2014 9:31 pm
Windows Command Line
Would be cool to have a plugin that can pass windows command line. For example, I use Evernote and would like to pass info directly to it from triggered events using EventGhost. An example would be "evernote.exe /Task:PasteClipboard /Task:SyncDatabase". This .bat file passes the clipboard contents to Evernote and automatically syncs with the cloud service upon an EG trigger.
I have a bunch of simple .bat files that trigger upon an EG event.
Just thought it would be nice to be able to this directly within EG instead of having a bunch of .bat files to keep track of. I know this sounds contradictory to py but is this possible?
thanks
Dave
I have a bunch of simple .bat files that trigger upon an EG event.
Just thought it would be nice to be able to this directly within EG instead of having a bunch of .bat files to keep track of. I know this sounds contradictory to py but is this possible?
thanks
Dave
Re: Windows Command Line
I must be missing something. You are running .bat files based on events in EventGhost, why can't you run evernote instead of the .bat files?tominator007 wrote:Just thought it would be nice to be able to this directly within EG instead of having a bunch of .bat files to keep track of. I know this sounds contradictory to py but is this possible?
I assume you are using the "Start application/program" action?
jonib
-
tominator007
- Posts: 5
- Joined: Fri Dec 19, 2014 9:31 pm
Re: Windows Command Line
Sometimes when I'm working on a job (freelance), I have to do a lot of repetitive actions, like copying/pasting or creating notes in Evernote. Right now, I'm working a job that I have to do 100s of copying/pasting operations. It's just easier to use EG to speed up the process.
And yes, I'm using the "Start application/program" action to start the .bat files and clipboard content change as a trigger.
It's definitely not something that I can't live without, but I just thought it would be cool to run windows command line from within EG and not to have so many .bat files to keep track of.
I got the idea from a Vuze plugin called Command Runner, which basically just runs a command line when something's finished downloading. I thought that maybe something similar could be implemented in EG.
Btw, love this program, EG. Pretty cool.
thanks
Dave
And yes, I'm using the "Start application/program" action to start the .bat files and clipboard content change as a trigger.
It's definitely not something that I can't live without, but I just thought it would be cool to run windows command line from within EG and not to have so many .bat files to keep track of.
I got the idea from a Vuze plugin called Command Runner, which basically just runs a command line when something's finished downloading. I thought that maybe something similar could be implemented in EG.
Btw, love this program, EG. Pretty cool.
thanks
Dave
Re: Windows Command Line
So why cant you run Evernote instead of the bat file with the "Start application/program" action?tominator007 wrote:And yes, I'm using the "Start application/program" action to start the .bat files and clipboard content change as a trigger.
jonib
-
tominator007
- Posts: 5
- Joined: Fri Dec 19, 2014 9:31 pm
Re: Windows Command Line
I prefer to use Evernote as a background process and automated with EG instead of going thru the motions (manually opening EN and creating a new note) for repetitive tasks.
But using Evernote via EG and a .bat file was just one example.
No biggie.
Thanks
But using Evernote via EG and a .bat file was just one example.
No biggie.
Thanks
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Windows Command Line
Can you explain in other words, what you actually need?
Can you give us any other examples?
At this moment I do not understand what you want.
Pako
Can you give us any other examples?
At this moment I do not understand what you want.
Pako
-
tominator007
- Posts: 5
- Joined: Fri Dec 19, 2014 9:31 pm
Re: Windows Command Line
In EG you can add an action, Python Command -- Executes a single Python statement.
Was just wondering if a Windows Command action could be added. It would look something like this:
https://www.dropbox.com/s/wkkj7onr6clo4 ... e.png?dl=0
I modified a Python Command action dialog box.
-Dave
Was just wondering if a Windows Command action could be added. It would look something like this:
https://www.dropbox.com/s/wkkj7onr6clo4 ... e.png?dl=0
I modified a Python Command action dialog box.
-Dave
Re: Windows Command Line
Using "Start application/program" action you can use any Windows command, that's where my confusion is, and why I repeatedly asked why you can't use it to run Evernote directly. If you can run it through a .bat file you should be able to run it via "Start application/program" action.tominator007 wrote:Was just wondering if a Windows Command action could be added. It would look something like this:
edit: You can attach images directly in the post.
jonib
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Windows Command Line
Now I understand.
You can still use the action "Start Application" as follows:But even so, it would be advantageous if there will be also a new action "Windows Command".
It can also return any results (in contrast to the action "Start Application"). I will add this new action to the next EventGhost build.
However, for launching executables will still preferred the action "Start Application".
Pako
You can still use the action "Start Application" as follows:But even so, it would be advantageous if there will be also a new action "Windows Command".
It can also return any results (in contrast to the action "Start Application"). I will add this new action to the next EventGhost build.
However, for launching executables will still preferred the action "Start Application".
Pako
-
tominator007
- Posts: 5
- Joined: Fri Dec 19, 2014 9:31 pm
Re: Windows Command Line
Oh, crap. I didn't see that.
Thanks for all the replies and sorry for taking up your time.
-Dave
Thanks for all the replies and sorry for taking up your time.
-Dave
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Windows Command Line
I've added a new action Windows Command to new EventGhost release.
This is a bit different, than the action Start Application:
This is a bit different, than the action Start Application:
- Here you can also start internal windows commands (such as Dir, Del, Move, Set ...)
- This action returns the results
Re: Windows Command Line
Nice, this makes working with the command line much more convenient!Pako wrote:I've added a new action Windows Command to new EventGhost release.
...If it works
I'm getting the following ERROR: OS: German Win 8.1 Pro (x64)
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Windows Command Line
I assure you that for me it works.Sem;colon wrote:...If it works
Even if I change line 77 as follows: data = data.decode ("cp850"),
it works also well (but incorrectly decoded).
Can you please do the following test:
Code: Select all
s850 = '\x84\x81\x8e\x9a'
print s850.decode("cp850")Re: Windows Command Line
Hi Pako,
.decode("cp850") works.
I did a bit more debugging and it seems that the variable cp is "cp850." on my system.
If I remove the "." with
in line 73 it works.
I think the same needs to be done in line 105.
.decode("cp850") works.
I did a bit more debugging and it seems that the variable cp is "cp850." on my system.
If I remove the "." with
Code: Select all
cp = "cp" + data.split()[-1].replace(".","")I think the same needs to be done in line 105.
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Windows Command Line
Yes, that's clear. Once again surprise from MS$.
In my case, it looks different - no dot:Your solution with the replace, it is correct in this case.
But I am afraid that it may not be correct in all cases ...
If any other user will not report another case, I can use your solution.
Pako
In my case, it looks different - no dot:Your solution with the replace, it is correct in this case.
But I am afraid that it may not be correct in all cases ...
If any other user will not report another case, I can use your solution.
Pako

