/* AutoConversion QED AREXX macro for GadTools files */
/* will not work for raw asm files because I am too lazy */
/* the checking routines */

options results

'lock 1'

'goto 2'

'status S'

teststring=Result

Test=Word(teststring,(WORDS(teststring)-1))

IF Test~="GadToolsBox" THEN DO

'lock 0'

'message Not a GadToolsBox File, Exiting'

EXIT

END

'goto 4'

'status S'

teststring=Result

Test=Word(teststring,2)

IF Test="Modified" THEN DO

'lock 0'

'message This file is already modified, Exiting!'

EXIT

END

'CASE 1'

'GOTO 15'

DO FOREVER

'STA S'

StringRes=Result

String=WORD(StringRes,1)

IF String="" THEN LEAVE

'BOL'

'SPOT 0'

'REP 1 'String'\\_LVO'String

'SPOT 1'

'LIN +1'

END

'message Finished Processing!'

'GOTO 4'

'LOCK 0'

'TEXT *  Modified in Arexx by Ken Simpson\N'

'STA F'

Filename=Result

'STA P'

Path=Result

File=Path|Filename

'WRI 'File'p'

EXIT
