Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
File Trigger
#2
hi tested your function wouldn't work for me at all so i made a new function and it worked properly for me
except for when renaming.
when renaming while open in notepad gets this
1 C:\Users\Kevin\Documents\My QM\34.txt
1 C:\Users\Kevin\Documents\My QM\34.txt
8 C:\Users\Kevin\Documents\My QM\34.txt
i noticed if you rename the file while it is open in notepad qm thinks it a new file created and also its modified as well.
but if you rename from the folder without opening the file file trigger works correctly.



Function Function172
Trigger $f 0x449 "C:\" "*.txt"     Help - how to add the trigger to the macro
Code:
Copy      Help
;\
function event $name [$newname]
;event: 1 added, 2 removed, 4 renamed, 8 modified
int i = find(name "$RECYCLE.BIN");;added this so doesnt trigger when deleted to recycle bin
if i!-1;;added this so doesnt trigger when deleted to recycle bin
,end;;added this so doesnt trigger when deleted to recycle bin
sel event
,case 1
,out F"{event} {name}"
,out "added"
,case 2
,out F"{event} {name}"
,out "removed"
,case 4
,out F"{event} {name}"
,out "renamed"
,case 8
,out F"{event} {name}"
,out "modified"


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)