Page 1 of 1

Shortcut to Macros/Actions on desktop please?

Posted: Fri Jan 12, 2018 2:22 am
by farbox
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

Re: Shortcut to Macros/Actions on desktop please?

Posted: Sat Jan 13, 2018 4:24 am
by kgschlosser
"c:\program files (x86)\eventghost\eventghost" -event Some.Event

that will work if you create a shortcut

Re: Shortcut to Macros/Actions on desktop please?

Posted: Sat Jan 13, 2018 5:56 am
by farbox
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

Re: Shortcut to Macros/Actions on desktop please?

Posted: Sat Jan 13, 2018 9:22 am
by kgschlosser
You are missing something...

Some.Event


see the "." it has to be a single string with no spaces.

Re: Shortcut to Macros/Actions on desktop please?

Posted: Sat Jan 13, 2018 10:17 am
by farbox
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??

Re: Shortcut to Macros/Actions on desktop please?

Posted: Sat Jan 13, 2018 10:49 am
by kgschlosser
yeah that problem was fixed in RC 4

Re: Shortcut to Macros/Actions on desktop please?

Posted: Sun Jan 14, 2018 12:00 am
by farbox
Upgraded to RC 4, seems fine so far.
Thanks for your help!