Variable not accepted?

Discuss RoboTask here
Post Reply
Rukbunker
Posts: 192
Joined: Mon Feb 22, 2016 4:06 pm
Location: Netherlands

Variable not accepted?

Post by Rukbunker »

In a task, I declared a local variable Filename like this (works perfect in any other task).
I apply this in the screenshot function:

Image

Image

But, when I press "OK" and open it again, it became this:

Image

When I fill in the path directly without variable it goes perfectly. How come?
Oleg
Site Admin
Posts: 3000
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Re: Variable not accepted?

Post by Oleg »

Hm-m...
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
Rukbunker
Posts: 192
Joined: Mon Feb 22, 2016 4:06 pm
Location: Netherlands

Re: Variable not accepted?

Post by Rukbunker »

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.
Post Reply