How to trim ZERO LEAD SYMBOLS in a string?
Thanks!!!
STR Trim Zero Lead Symbols
-
- Posts: 11
- Joined: Wed Mar 04, 2009 1:07 am
- Location: Italy
- Contact:
STR Trim Zero Lead Symbols
What are "ZERO LEAD SYMBOLS"? Symbol "0"?
-
- Posts: 11
- Joined: Wed Mar 04, 2009 1:07 am
- Location: Italy
- Contact:
STR Trim Zero Lead Symbols
Yes, sorry...
STR Trim Zero Lead Symbols
Hm-m... Probably we need to add custom symbols into "STR Trim" action.
Now you can do this like in the example below:
Now you can do this like in the example below:
Code: Select all
;*******************************
;* RoboTask Task file
;* Do not edit in text editor!
;*******************************
[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|1939387200
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task128"
Hide=INTEGER|0
ID=INTEGER|614445171
LocalVariables=STRING|"TEST,F"
LogOnAsUser=INTEGER|1
Name=STRING|"Suppress lead symbols"
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0
[Actions]
Action1=FOLDER
Action2=FOLDER
Action3=FOLDER
Action4=FOLDER
Action5=FOLDER
Action6=FOLDER
Action7=FOLDER
Action8=FOLDER
[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""TEST"" with value ""00000123456"""
Params=FOLDER
[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"TEST"
varvalue=STRING|"00000123456"
[Actions\Action2]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Variable TEST contains this: {Test}"""
Params=FOLDER
[Actions\Action2\Params]
icon=STRING|"1"
msg0=STRING|"Variable TEST contains this: {Test}"
msg1=STRING|"Now we remove lead ""0"" symbols"
msgcount=STRING|"2"
playsound=STRING|"0"
showmessage=STRING|"1"
[Actions\Action3]
ActionID=STRING|"A_STR_EXTRACT"
Enabled=INTEGER|-1
Name=STRING|"STR Extract"
Params=FOLDER
[Actions\Action3\Params]
amount=STRING|"1"
from=STRING|"1"
source=STRING|"{test}"
variable=STRING|"F"
[Actions\Action4]
ActionID=STRING|"A_LOOP_WHILE"
Enabled=INTEGER|-1
Name=STRING|"While loop"
Params=FOLDER
[Actions\Action4\Params]
case=STRING|"0"
operator=STRING|"0"
type=STRING|"0"
value1=STRING|"{F}"
value2=STRING|"0"
[Actions\Action5]
ActionID=STRING|"A_STR_DELETE"
Enabled=INTEGER|-1
Name=STRING|"STR Delete"
Params=FOLDER
[Actions\Action5\Params]
amount=STRING|"1"
from=STRING|"1"
source=STRING|"{TEST}"
variable=STRING|"test"
[Actions\Action6]
ActionID=STRING|"A_STR_EXTRACT"
Enabled=INTEGER|-1
Name=STRING|"STR Extract"
Params=FOLDER
[Actions\Action6\Params]
amount=STRING|"1"
from=STRING|"1"
source=STRING|"{test}"
variable=STRING|"F"
[Actions\Action7]
ActionID=STRING|"A_LOOP_END"
Enabled=INTEGER|-1
Name=STRING|"End Loop"
[Actions\Action8]
ActionID=STRING|"A_DIALOG_MESSAGE"
Enabled=INTEGER|-1
Name=STRING|"Show ""Variable TEST contains this: {Test}"""
Params=FOLDER
[Actions\Action8\Params]
icon=STRING|"1"
msg0=STRING|"Variable TEST contains this: {Test}"
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
Last edited by Oleg on Tue Mar 24, 2009 11:40 am, edited 1 time in total.
-
- Posts: 11
- Joined: Wed Mar 04, 2009 1:07 am
- Location: Italy
- Contact:
STR Trim Zero Lead Symbols
Ok, I understood how it works...
However in future version a selectable character trim would be great!
However in future version a selectable character trim would be great!