I guess my question is: How do I move the cursor to a specific postion within a text file?

Moderators: JRL, Dorian (MJT support)
Code: Select all
Input>YourFile,Get text file
Input>RepText,Text to be replaced
Dialog>Dialog1
Caption=Text Replacement Dialog
Width=448
Height=360
Top=CENTER
Left=CENTER
Label=Text replacement Text,160,120
Edit=msEdit1,16,136,401,
Label=Pre Replacement Text,160,8
Memo=msMemo1,16,24,401,89,
Label=Post Replacement Text,160,168
Memo=msMemo2,16,184,401,89,
Button=Ok,176,296,75,25,3
EndDialog>Dialog1
Show>dialog1
Closedialog>dialog1
Readfile>YourFile,filetext
Separate>filetext,%RepText%,var
Let>cnt=0
Let>NewText=
Repeat>cnt
add>cnt,1
Let>next=%cnt%+1
If>%cnt%=%var_count%,done
Let>value1=var_%cnt%
Let>value2=var_%next%
Let>dialog1.msmemo1=%value1%
Let>dialog1.msmemo2=%value2%
RDA>dialog1
Show>dialog1,r1
If>r1=3,process
If>r1=2,quit
Goto>notdone
Label>done
Concat>NewText,%value2%
Label>notdone
Until>cnt=var_count
SRT>process
Concat>NewText,%value1%%dialog1.msedit1%
If>%cnt%=%var_count%
Concat>NewText,%value2%
EndIf
Let>dialog1.msedit1=
Show>dialog1
Press TAB
CloseDialog>dialog1
END>process
WriteLn>C:\NewFile.txt,wresult,%NewText%
Label>quit