changing specified char in txt file

Discuss RoboTask here
tombur
Posts: 24
Joined: Mon Aug 25, 2008 11:59 pm

changing specified char in txt file

Post by tombur »

I' ve done this changes and It clears the txt file instead of changing ¶ to s;*****************************;* RoboTask Task file         ;* Do not edit in text editor!;***************************** [Root]ActionAfterRun=INTEGER|0Actions=FOLDERAutomat=INTEGER|0CatID=INTEGER|0ContinueOnError=INTEGER|0ExternalName=STRING|"Task770"Hide=INTEGER|0ID=INTEGER|1512055805Name=STRING|"convert ¶ to s"Priority=INTEGER|3RunOnClose=INTEGER|0RunOnStartup=INTEGER|0ToLog=INTEGER|3WriteGeneralLog=INTEGER|0[Actions]Action1=FOLDERAction2=FOLDERAction3=FOLDERAction4=FOLDER[Actions\Action1]ActionID=STRING|"A_LOOP_FILE"Enabled=INTEGER|-1Name=STRING|"File Loop"Params=FOLDER[Actions\Action1\Params]createmode=STRING|"1"date1=STRING|"20080419"date2=STRING|"20080419"destvar=STRING|"C_FILE"DuringDays=STRING|"1"DuringMonths=STRING|"1"file0=STRING|"C:\test.txt"filecount=STRING|"1"OlderDays=STRING|"1"OlderMonths=STRING|"1"savesize=STRING|"0"searchkind=STRING|"0"subdirs=STRING|"0"timesize=STRING|"0"WithoutPath=STRING|"0"[Actions\Action2]ActionID=STRING|"BASIC_SCRIPT"Enabled=INTEGER|-1Name=STRING|"Internal basic script"Params=FOLDER[Actions\Action2\Params]line00000=STRING|"Sub Main"line00001=STRING|"Dim MyString As String"line00003=STRING|"MyString = RoboTaskApp.ExpandText(""{TextFile({c_file})}"")"line00004=STRING|"MyString = Replace(MyString,Chr(182),""s"")"line00005=STRING|"RoboTaskApp.SetUserVariable(""MyText"", MyString)"line00007=STRING|"End Sub"linecount=STRING|"8"source=STRING|"0"[Actions\Action3]ActionID=STRING|"A_FILE_TEXTWRITE"Enabled=INTEGER|-1Name=STRING|"Create text file {C_FILE}"Params=FOLDER[Actions\Action3\Params]fileexists=STRING|"0"filname=STRING|"{C_FILE}"line0=STRING|"{MyText}"linecount=STRING|"1"[Actions\Action4]ActionID=STRING|"A_LOOP_END"Enabled=INTEGER|-1Name=STRING|"End Loop"
Oleg
Site Admin
Posts: 3202
Joined: Thu Jan 01, 1970 1:00 am
Contact:

changing specified char in txt file

Post by Oleg »

Send me the example of your text to email oleg(at)robotask.com
I'll check this.
tombur
Posts: 24
Joined: Mon Aug 25, 2008 11:59 pm

changing specified char in txt file

Post by tombur »

Now It's doing nothing with the file. I do not know why.I'll send you the file
Post Reply