Hello,
I am merging few text files into one, and some texts
include {sometext} strings in it (the texts are scripts
for IDE software.
Most strings aren't recognized by Robotask and therefore
not being replace, but some do.
How can I avoid that please?
is there an option to set Robotask not replacing it?
Thx
Jay
disable variable replacment
disable variable replacment
RoboTask always tries to expand {sometext} constructions
Therefore in order to preserve such strings you should replace this to another string (for example to {#sometext#}) before processing of the text.
You can do this by using BASIC scripts, because high-level actions of RoboTask will expand text in any case.
See this task please. Save the task into file and use menu Task | Import in order to import into RoboTask
It searches necessary files in folder, opens and replaces braces (small Basis script), processes body, and save result with restoration original constructions (another small script).
Of course you need Basic plugin in order to get this task work. You can download it here.
Therefore in order to preserve such strings you should replace this to another string (for example to {#sometext#}) before processing of the text.
You can do this by using BASIC scripts, because high-level actions of RoboTask will expand text in any case.
See this task please. Save the task into file and use menu Task | Import in order to import into RoboTask
It searches necessary files in folder, opens and replaces braces (small Basis script), processes body, and save result with restoration original constructions (another small script).
Of course you need Basic plugin in order to get this task work. You can download it here.
disable variable replacment
thx
this is solving it.
is it possible to use variables in the Basic script, like:
buf = Replace(buf,"sometext","{SOMEVAR}")
so it will replace every "sometext" with the content of
varaible {SOMEVAR} ?
this will make my script much simpler.
thx
this is solving it.
is it possible to use variables in the Basic script, like:
buf = Replace(buf,"sometext","{SOMEVAR}")
so it will replace every "sometext" with the content of
varaible {SOMEVAR} ?
this will make my script much simpler.
thx
disable variable replacment
Yes, of course.
function replace is BASIC function and it don't use RoboTask engine.
If you want to expand variables in text you should use
RoboTaskApp.ExpandText( SomeTextVar )
or
RoboTaskApp.ExpandText( "Some text with {MyVariable}" )
function replace is BASIC function and it don't use RoboTask engine.
If you want to expand variables in text you should use
RoboTaskApp.ExpandText( SomeTextVar )
or
RoboTaskApp.ExpandText( "Some text with {MyVariable}" )
disable variable replacment
thank you, that worked