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.

What is the python code for...

If you have a question or need help, this is the place to be.
Post Reply
IceGothic
Posts: 33
Joined: Tue Oct 20, 2009 2:47 pm

What is the python code for...

Post by IceGothic »

I need to jump to a macro depending on the payload value of a directoryWatcher plugin event; Ie:

on DirectoryWatcher.Created (u'C:\\fileA.txt',) : Jump to macroA
on DirectoryWatcher.Created (u'C:\\fileB.txt',) : Jump to macroB

EG have limited conditionnal actions so I had to go with python. It works great but now I need to execute a Jump to a specified macro from a python script.

Anyone could tell me what's the syntax in python?

Thank you
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: What is the python code for...

Post by jinxdone »

Actually the jumpto action seems to work with the eventghost configuration tree, so that's kinda hard to work with from a script.

It's easier to use eg.TriggerEvent() in your python script, and then use this new generated event to tigger other macros.
IceGothic
Posts: 33
Joined: Tue Oct 20, 2009 2:47 pm

Re: What is the python code for...

Post by IceGothic »

Sweet!! :) thanx
Post Reply