Remoce spaces in my URL

Discuss RoboTask here
Post Reply
chase
Posts: 2
Joined: Thu Oct 09, 2008 10:48 am
Location: United States

Remoce spaces in my URL

Post by chase »

Maybe someone could help...  I have data extract that I send to a web site and inside the data I have a (example) url: www.helpme.com but the feed that it comes from puts  spaces inside the (example) url: www.help  me.com because the url is on two different lines of text. I need to remove the spaces an reconnect the URL together. Any Ideas how to remove just remove those spaces.
 
thanks
Trevor
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Remoce spaces in my URL

Post by Oleg »

There is "STR Replace" action for this purpose.
Enter one space into "Find Substring" parameter and keep the "Replacement" parameter empty (without any chars).
In this case the action removes all spaces from your string.

see the example below:
;*****************************
;* RoboTask Task file       
;* Do not edit in text editor!
;*****************************

[Root]
ActionAfterRun=INTEGER|0
Actions=FOLDER
Automat=INTEGER|-1
CatID=INTEGER|0
ContinueOnError=INTEGER|0
ExternalName=STRING|"Task286"
Hide=INTEGER|0
ID=INTEGER|525520860
LogOnAsUser=INTEGER|1
Name=STRING|"Set variable ""MYURL"" with value ""www.help me.com""..."
Priority=INTEGER|3
RunOnClose=INTEGER|0
RunOnStartup=INTEGER|0
ToLog=INTEGER|3
WriteGeneralLog=INTEGER|0

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

[Actions\Action1]
ActionID=STRING|"A_VARIABLES_SET"
Enabled=INTEGER|-1
Name=STRING|"Set variable ""MYURL"" with value ""www.help me.com"""
Params=FOLDER

[Actions\Action1\Params]
expand=STRING|"0"
varname=STRING|"MYURL"
varvalue=STRING|"www.help me.com"

[Actions\Action2]
ActionID=STRING|"A_STR_REPLACE"
Enabled=INTEGER|-1
Name=STRING|"STR Replace"
Params=FOLDER

[Actions\Action2\Params]
mode=STRING|"0"
source=STRING|"{MyURL}"
substring=STRING|" "
variable=STRING|"MyURL"

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

[Actions\Action3\Params]
icon=STRING|"1"
msg0=STRING|"""{MyUrl}"""
msgcount=STRING|"1"
playsound=STRING|"0"
showmessage=STRING|"1"
chase
Posts: 2
Joined: Thu Oct 09, 2008 10:48 am
Location: United States

Remoce spaces in my URL

Post by chase »

Got it...   Thanks
What happens if the URL changes. can I use wildcard? www.*.com
Thanks for you help.
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

Remoce spaces in my URL

Post by Oleg »

What will it change? "STR Replace" doesn't know that it is URL. It simply processes specified string.
So you need process each URL in the loop or by another way.
Post Reply