In a task, I declared a local variable Filename like this (works perfect in any other task).
I apply this in the screenshot function:
But, when I press "OK" and open it again, it became this:
When I fill in the path directly without variable it goes perfectly. How come?
Variable not accepted?
Re: Variable not accepted?
Hm-m...
I've just tested the similar example - it works!
My example:
I've just tested the similar example - it works!
My example:
Code: Select all
;*****************************
;* RoboTask Task file
;* Do not edit in text editor!
;*****************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|379259420
Comment=STRINGLIST
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task14"
Hide=INTEGER|0
ID=INTEGER|754138547
LocalVariables=STRING|"FileName=c:\temp\img\{Year}-{MonthNo}-{Day}Test.png,kleur=$000000"
LogOnAsUser=INTEGER|1
Name=STRING|"Screenshot..."
OnErrorTaskID=INTEGER|-1
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
UnicodeFormat=INTEGER|1
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
[Actions\Action1]
ActionID=STRING|"A_FOLDER_CREATE"
Enabled=INTEGER|-1
Name=STRING|"Create Folder ({ExtractFilePath({FileName})})"
Params=FOLDER
[Actions\Action1\Params]
newfolder=STRING|"{ExtractFilePath({FileName})}"
[Actions\Action2]
ActionID=STRING|"A_SCR_SCREEN"
Enabled=INTEGER|-1
Name=STRING|"Screenshot"
Params=FOLDER
[Actions\Action2\Params]
captureregion=STRING|"1"
filename=STRING|"{FileName}"
format=STRING|"2"
height=STRING|"519"
left=STRING|"58"
top=STRING|"122"
width=STRING|"1148"
Oleg Yershov
Re: Variable not accepted?
I've tried your task and that works as well. I reviewed my task and add again the variable. This time it works. No clue why this happens.