Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Folder modification trigger.
#1
Is there anyway for the folder trigger to be a variable in a function?

Files may need to be moved down the road, and I would prefer if that file can be located through a dialog in my program.

I can't seem to find anywhere the path of the folder is stored in QM to be able to edit.

Thanks,
jimmy Vig
#2
Is this question about QM file triggers?
#3
Yes.

Function File_Trigger
Trigger $f 0x4F "$documents$"     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

sel event
,case 1
,out name

Can the trigger folder be in a ini file?
#4
Function ChangeFileTriggerFolder
Code:
Copy      Help
;/
function $macro $folder

;Changes folder of a file trigger.

;In the trigger, folder must be macro name enclosed in %.
;For example, if the macro is Function15, in the Folder field in Properties type %Function15%.
;The function creates/changes environment variable whose name is macro.

;EXAMPLE
;ChangeFileTriggerFolder "Function168" "$desktop$\folder1"


SetEnvVar macro folder
if(!dis(macro)) dis+ macro; dis- macro

Before calling this function first time in QM session, the trigger does not work because the environment variable does not exist.
#5
It took me a minute or two to figure out what you did here.

Works good.

Thanks a bunch!!

jimmy vig


Forum Jump:


Users browsing this thread: 1 Guest(s)