Then do the math for that movement to convert it to an A movement in degrees and replace it.
Without knowing the math involved, the following script will stop at any line that starts with "Y" and allow you to manually replace it with a value of your choosing (like A-74.86).
I used the data you provided in your first post as "input.txt". The file "output.txt" will be your modified data.
InFile = "input.txt"
OutFile = "output.txt"
InputFile = FileOpen(InFile, "READ")
OutputFile = FileOpen(OutFile, "WRITE")
StringOut = "Y"
while @TRUE
TextLine = FileRead(InputFile)
IsItY = StrSub (TextLine, 1, 1)
If IsItY == StringOut Then TextLine = AskLine ("Enter Value", "Change %TextLine% to:", TextLine,0)
; Or have it do some math functions here to convert TextLine to your A value
If TextLine == "*EOF*" Then Break
FileWrite (OutputFile, TextLine)
end while
FileClose(InputFile)
FileClose(OutputFile)
That is helpful and the data appears to be space delimited in the last post but not in the first so that makes a difference...assuming that is the case. Assuming it is...just off the top of my head and I am sure it can be done a little more efficiently but maybe something like...
........
line = FileRead(or)
new_line = ""
For x = 1 to ItemCount(line," ")
code = ItemExtract(x,line," ")
If StrSub(code,1,1) == "Y" Then
code = StrSub(code,2,StrLen(code))
....DO CONVERSION
code = "A":code
new_line = new_line:" ":code
Else
new_line = new_line:" ":code
EndIf
Next
new_line = StrTrim(new_line)
FileWrite(ow,new_line)
....................