Posts: 1,000
	Threads: 253
	Joined: Feb 2008
	
	
 
	
	
		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
	
	
	
	
	
 
 
	
	
	
		
	Posts: 12,239
	Threads: 144
	Joined: Dec 2002
	
	
 
	
	
		Is this question about QM file triggers?
	
	
	
	
	
 
 
	
	
	
		
	Posts: 1,000
	Threads: 253
	Joined: Feb 2008
	
	
 
	
	
		Yes.
Function 
File_Trigger 
Trigger 
$f 0x4F "$documents$"      
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?
	
 
 
	
	
	
		
	Posts: 12,239
	Threads: 144
	Joined: Dec 2002
	
	
 
	
	
		Function 
ChangeFileTriggerFolder 
;/
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.
	
 
 
	
	
	
		
	Posts: 1,000
	Threads: 253
	Joined: Feb 2008
	
	
 
	
	
		It took me a minute or two to figure out what you did here.
Works good.
Thanks a bunch!!
jimmy vig