Page 1 of 1

Delimit variable & spaces

Posted: Wed Jul 23, 2008 2:20 pm
by verona
I'm having a slight problem with Delimit Variable. I have a string that looks something like -word1 word2 "word3 word4 "What I'd like to do is capture the information in the quotes- including any trailing white space. The problem is, when I use Delimit Variable and choose Other and " as the delimiter, it throws away any spaces after word4. (Space is not also selected as a delimiter)Anyone know a workaround to this?

Delimit variable & spaces

Posted: Wed Jul 23, 2008 5:26 pm
by verona
Nevermind. I wrote my own delimiting script in Basic and it seems to be working correctly 

Delimit variable & spaces

Posted: Wed Jul 23, 2008 9:53 pm
by Oleg
There is "Delimit Variable" action for this purpose.
See the example below.

;*****************************
;* RoboTask Task file       
;* Do not edit in text editor!
;*****************************

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|697468481
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task272"
Hide=INTEGER|0
ID=INTEGER|2071771350
Name=STRING|"Set variable ""AAA"" with value ""word1 word2 ""word3 word4 """"..."
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER

[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""AAA"" with value ""word1 word2 ""word3 word4 """""
Params=FOLDER

[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"AAA"
varvalue=STRING|"word1 word2 ""word3 word4 """

[Actions\Action2]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{aaa}"""
Params=FOLDER

[Actions\Action2\Params]
icon=STRING|"1"
msg0=STRING|"{aaa}"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"

[Actions\Action3]
ActionID=STRING|"A_VARIABLES_DELIMITED"
Enabled=INTEGER|-1
Name=STRING|"Delimit Variable"
Params=FOLDER

[Actions\Action3\Params]
colon=STRING|"0"
comma=STRING|"0"
other=STRING|"0"
quote=STRING|"0"
semocolon=STRING|"0"
space=STRING|"1"
spaceasone=STRING|"0"
string=STRING|"{aaa}"
tab=STRING|"0"
variable=STRING|"aaa"

[Actions\Action4]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""{aaa}"""
Params=FOLDER

[Actions\Action4\Params]
icon=STRING|"1"
msg0=STRING|"{aaa}"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"