09-03-2009, 04:10 AM
maybe use GetCurDir function?
Macro
Macro
str test = GetCurDir
if (test= "C:\Windows\SysWOW64") ;;result of GetCurDir when ran through qm for me
,out "run through qm"
,str name.getmacro(getopt(itemid) 1)
,out name
,str directory = "$my qm$/"
,directory + name
,out directory
,iff- directory
,,out "doesnt exist"
,,mkdir directory
,else
,,out "already exists"
,;SetCurDir(directory)
else
,out "run through exe"
,mes test
,;set directory to whatever, maybe GetCurDir?
test = "testtt textt"
test.setfile("test.txt")
SetCurDir("C:\Windows\SysWOW64") ;;without resetting the curdir, it would only work the first time through