Shortcut to Macros/Actions on desktop please?

Got a good idea? You can suggest new features here.
Post Reply
farbox
Experienced User
Posts: 51
Joined: Fri Jul 18, 2008 1:44 am

Shortcut to Macros/Actions on desktop please?

Post by farbox » Fri Jan 12, 2018 2:22 am

As per the discussion in this thread viewtopic.php?f=2&t=9535, it would be great if we could just have a function (drag/drop, or a right-click menu item) to create a shortcut to be placed on desktop/quick launch etc that when double clicked would simply execute that macro or action.
I'm having lots of difficulties and errors (_init.py_ etc ) using bat files, which seems a bit of a pain for something that would be so simple to implement.

Something even better would be to be able to create a desktop file/shortcut from within EG, which when clicked would act as a trigger event (just like a IR receiver event. And you could add this event as the initiator for any macro that you wish....
Perhaps a " Create desktop Event/Trigger" plugin, or add to existing EG plugins?

Would go something like this..
1- Add the "Create desktop Event/Trigger"plugin to EG
2- Double click plugin
3- In the plugin screen, enter a file name, optionally select a different icon (if you want to persoonalise it), the file location desired, and an event identifier name(which is what will show up in the EG log window)
4-A file is saved with the above characteristics (might need a new .extension???), which when clicked registers that event in EG.


Im not a coder, but I would imagine the above functions wouldn't need more than a few lines of code? The only problem I can foresee of is linking the .ext of the new file to the plugin within EG. If there is a way to do it without needing alternate file extensions, all the above would be easily achievable.

Or thinking out loud and coming back full circle, what if the plugin would just automate the creation of the .bat file (with the added facilities above?). :D :D

User avatar
kgschlosser
Site Admin
Posts: 4179
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Shortcut to Macros/Actions on desktop please?

Post by kgschlosser » Sat Jan 13, 2018 4:24 am

"c:\program files (x86)\eventghost\eventghost" -event Some.Event

that will work if you create a shortcut
If you like the work I have been doing then feel free to Image

farbox
Experienced User
Posts: 51
Joined: Fri Jul 18, 2008 1:44 am

Re: Shortcut to Macros/Actions on desktop please?

Post by farbox » Sat Jan 13, 2018 5:56 am

Thanks for your reply!
I keep getting syntax errors.
This is my shortcut line
"C:\Program Files (x86)\EventGhost\EventGhost.exe" -event Start Winamp

And this is the error:

Traceback (most recent call last):
File "EventGhost.pyw", line 53, in <module>
File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 31, in <module>
import Cli
File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 172, in <module>
'eg.TriggerEvent, %s' % str(args.startupEvent)
File "C:\Program Files (x86)\EventGhost\eg\NamedPipe.py", line 253, in send_message
return eval(data)
File "<string>", line 1
<eg.Classes.EventGhostEvent.EventGhostEvent object at 0x04F4AAD0>
^
SyntaxError: invalid syntax

User avatar
kgschlosser
Site Admin
Posts: 4179
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Shortcut to Macros/Actions on desktop please?

Post by kgschlosser » Sat Jan 13, 2018 9:22 am

You are missing something...

Some.Event


see the "." it has to be a single string with no spaces.
If you like the work I have been doing then feel free to Image

farbox
Experienced User
Posts: 51
Joined: Fri Jul 18, 2008 1:44 am

Re: Shortcut to Macros/Actions on desktop please?

Post by farbox » Sat Jan 13, 2018 10:17 am

Tried it with the "." also, and I get this error:

Traceback (most recent call last):
File "EventGhost.pyw", line 53, in <module>
File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 31, in <module>
import Cli
File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 172, in <module>
'eg.TriggerEvent, %s' % str(args.startupEvent)
File "C:\Program Files (x86)\EventGhost\eg\NamedPipe.py", line 253, in send_message
return eval(data)
File "<string>", line 1
<eg.Classes.EventGhostEvent.EventGhostEvent object at 0x04F4AAD0>
^
SyntaxError: invalid syntax
Traceback (most recent call last):
File "EventGhost.pyw", line 53, in <module>
File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 31, in <module>
import Cli
File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 172, in <module>
'eg.TriggerEvent, %s' % str(args.startupEvent)
File "C:\Program Files (x86)\EventGhost\eg\NamedPipe.py", line 253, in send_message
return eval(data)
File "<string>", line 1
<eg.Classes.EventGhostEvent.EventGhostEvent object at 0x04F4A250>
^
SyntaxError: invalid syntax
Traceback (most recent call last):
File "EventGhost.pyw", line 53, in <module>
File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 31, in <module>
import Cli
File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 172, in <module>
'eg.TriggerEvent, %s' % str(args.startupEvent)
File "C:\Program Files (x86)\EventGhost\eg\NamedPipe.py", line 253, in send_message
return eval(data)
File "<string>", line 1
<eg.Classes.EventGhostEvent.EventGhostEvent object at 0x04DE79D0>
^
SyntaxError: invalid syntax
Traceback (most recent call last):
File "EventGhost.pyw", line 53, in <module>
File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 31, in <module>
import Cli
File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 172, in <module>
'eg.TriggerEvent, %s' % str(args.startupEvent)
File "C:\Program Files (x86)\EventGhost\eg\NamedPipe.py", line 253, in send_message
return eval(data)
File "<string>", line 1
<eg.Classes.EventGhostEvent.EventGhostEvent object at 0x04B76B10>
^
SyntaxError: invalid syntax
Traceback (most recent call last):
File "EventGhost.pyw", line 53, in <module>
File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 31, in <module>
import Cli
File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 172, in <module>
'eg.TriggerEvent, %s' % str(args.startupEvent)
File "C:\Program Files (x86)\EventGhost\eg\NamedPipe.py", line 253, in send_message
return eval(data)
File "<string>", line 1
<eg.Classes.EventGhostEvent.EventGhostEvent object at 0x04959AB0>
^
SyntaxError: invalid syntax
Traceback (most recent call last):
File "EventGhost.pyw", line 53, in <module>
File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 31, in <module>
import Cli
File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 172, in <module>
'eg.TriggerEvent, %s' % str(args.startupEvent)
File "C:\Program Files (x86)\EventGhost\eg\NamedPipe.py", line 253, in send_message
return eval(data)
File "<string>", line 1
<eg.Classes.EventGhostEvent.EventGhostEvent object at 0x04DDABB0>
^
SyntaxError: invalid syntax
Traceback (most recent call last):
File "EventGhost.pyw", line 53, in <module>
File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 31, in <module>
import Cli
File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 172, in <module>
'eg.TriggerEvent, %s' % str(args.startupEvent)
File "C:\Program Files (x86)\EventGhost\eg\NamedPipe.py", line 253, in send_message
return eval(data)
File "<string>", line 1
<eg.Classes.EventGhostEvent.EventGhostEvent object at 0x04DDABB0>
^
SyntaxError: invalid syntax
Traceback (most recent call last):
File "EventGhost.pyw", line 53, in <module>
File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 31, in <module>
import Cli
File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 172, in <module>
'eg.TriggerEvent, %s' % str(args.startupEvent)
File "C:\Program Files (x86)\EventGhost\eg\NamedPipe.py", line 253, in send_message
return eval(data)
File "<string>", line 1
<eg.Classes.EventGhostEvent.EventGhostEvent object at 0x04DDACB0>
^
SyntaxError: invalid syntax
Traceback (most recent call last):
File "EventGhost.pyw", line 53, in <module>
File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 31, in <module>
import Cli
File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 172, in <module>
'eg.TriggerEvent, %s' % str(args.startupEvent)
File "C:\Program Files (x86)\EventGhost\eg\NamedPipe.py", line 253, in send_message
return eval(data)
File "<string>", line 1
<eg.Classes.EventGhostEvent.EventGhostEvent object at 0x04F13990>
^
SyntaxError: invalid syntax
Traceback (most recent call last):
File "EventGhost.pyw", line 53, in <module>
File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 31, in <module>
import Cli
File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 172, in <module>
'eg.TriggerEvent, %s' % str(args.startupEvent)
File "C:\Program Files (x86)\EventGhost\eg\NamedPipe.py", line 253, in send_message
return eval(data)
File "<string>", line 1
<eg.Classes.EventGhostEvent.EventGhostEvent object at 0x04DDACB0>
^
SyntaxError: invalid syntax
Traceback (most recent call last):
File "EventGhost.pyw", line 53, in <module>
File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 31, in <module>
import Cli
File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 172, in <module>
'eg.TriggerEvent, %s' % str(args.startupEvent)
File "C:\Program Files (x86)\EventGhost\eg\NamedPipe.py", line 253, in send_message
return eval(data)
File "<string>", line 1
<eg.Classes.EventGhostEvent.EventGhostEvent object at 0x05021C10>
^
SyntaxError: invalid syntax
Traceback (most recent call last):
File "EventGhost.pyw", line 53, in <module>
File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 31, in <module>
import Cli
File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 172, in <module>
'eg.TriggerEvent, %s' % str(args.startupEvent)
File "C:\Program Files (x86)\EventGhost\eg\NamedPipe.py", line 253, in send_message
return eval(data)
File "<string>", line 1
<eg.Classes.EventGhostEvent.EventGhostEvent object at 0x05021C10>
^
SyntaxError: invalid syntax


Even changed the name of my macro to Start.Winamp, still getting errors...
Im on 5.0rc3 maybe thats got something to do with it??

User avatar
kgschlosser
Site Admin
Posts: 4179
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Shortcut to Macros/Actions on desktop please?

Post by kgschlosser » Sat Jan 13, 2018 10:49 am

yeah that problem was fixed in RC 4
If you like the work I have been doing then feel free to Image

farbox
Experienced User
Posts: 51
Joined: Fri Jul 18, 2008 1:44 am

Re: Shortcut to Macros/Actions on desktop please?

Post by farbox » Sun Jan 14, 2018 12:00 am

Upgraded to RC 4, seems fine so far.
Thanks for your help!

Post Reply