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.

Directory watcher Multiple tasks

If you have a question or need help, this is the place to be.
Post Reply
Ztrust
Posts: 5
Joined: Fri Oct 16, 2015 7:26 pm

Directory watcher Multiple tasks

Post by Ztrust »

Hi

before I Start please know I have been on all the pages about ths in the forum and been googleing it for the last many hours.
I have no understanding of python so i have not been able to modify some of the other scripts regarding this.

1)
I have a setup similar to this, just with a 40 sec timer
Image
to watch my download directory so I can start a program to extract archives to another directory, problem is my extractor writes a file to say it has already extracted it, which fires the macro again.
and that tends to lauch my multiple times and then crashes
basicly i need the macro to only run my app once and if it is already open then cancel.

2)
I have the same the structure to launch another app but only when an nfo is created
I have been using this python script pako made but it dont work any longer

Code: Select all

from os.path import splitext
pld = eg.event.payload
fl = pld[0]
ext = splitext(fl)[1].lower()
if ext == '.png':
    eg.TriggerEvent("%s.%s" % (eg.event.suffix, "Png"), prefix=eg.event.prefix, payload = pld)
I am hoping someone can fix it ?

3)
could a similar script be made but to stop the macro if the extenstion match
.png = stop macro

I hope some of you can help because I can not figure this out ;)

Ztrust ;)
Post Reply