home *** CD-ROM | disk | FTP | other *** search
- /* ©1996 Dietmar Eilert. Empty GoldED macro */
-
- OPTIONS RESULTS /* enable return codes */
-
- if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
- address 'GOLDED.1'
-
- 'LOCK CURRENT RELEASE=4' /* lock GUI, gain access */
-
- if (RC ~= 0) then
- exit
-
- OPTIONS FAILAT 6 /* ignore warnings */
-
- SIGNAL ON SYNTAX /* ensure clean exit */
-
- /* ------------------------ INSERT YOUR CODE HERE: ------------------- */
- /* $VER: 1.3, ©1999 Wolfgang Morgeneier */
-
- parse arg sprache
- if sprache = "d" then do
- R1B= "Wirklich ein Byte einfügen?|Programmdateien werden dadurch unbrauchbar!"
- R1T= "Achtung"
- R1X= "OK|!Abbrechen"
- R2P= "Der Cursor muß sich im Hexbereich innerhalb eines Bytes befinden"
- end
- else do
- R1B= "Really insert a byte?|Program files will not be useable any more!"
- R1T= "Attention"
- R1X= "OK|!Cancel"
- R2P= "The cursor must be in the hex area at a byte"
- end
-
- 'REQUEST Body="' || R1B || '" Title="' || R1T || '" Button="' || R1X || '"'
- if Result = 0 then do
- 'UNLOCK'
- exit
- end
-
- 'QUERY Name=Column Var=Spalte'
- 'QUERY Name=Code Var=Zeichen'
- if Spalte<11 | Spalte>45 | Zeichen=32 then do
- 'REQUEST Problem="' || R2P || '"'
- 'UNLOCK'
- exit
- end
-
- 'QUERY Name=Line Var=Zeile'
- 'QUERY Name=Lines Var=GesZeilen'
- 'QUERY Name=Buffer Var=Inhalt'
- 'GOTO Column=11'
-
- Zeile1= compress(substr(Inhalt, 11, 35))
- Start= ((Spalte-11)-((Spalte-11)%9)) % 2
- Zeile1x= right(Zeile1, 2)
- if length(Zeile1)=32 then do
- if Start > 0 then Zeile1= left(Zeile1, 2*Start) || "00" || substr(Zeile1, 2*Start+1, 30-2*Start)
- else Zeile1= "00" || left(Zeile1, 30)
-
- if Zeile=GesZeilen then do
- 'HEXKEY KEYL="' || Zeile1 || '"'
- 'SMARTCR'
- 'GOTO Column=1'
- Addresse= d2x(x2d(left(Inhalt, 8))+16)
- Addresse= reverse(overlay(reverse(Addresse), "00000000", 1, 8, "0"))
- Inhalt= Addresse || " " || Zeile1x || " "
- 'FIX Var=Inhalt'
- 'TEXT stay T="' || Inhalt || '"'
- 'GOTO Column=11'
- 'HEXKEY KEYL="' || Zeile1x || copies(" ", 30) || '"'
- end
- else do
- 'HEXKEY KEYL="' || Zeile1 || '"'
- end
- if Zeile<GesZeilen-1 then do
- do i=Zeile+1 to GesZeilen-1
- 'DOWN'
- 'GOTO Column=11'
- 'QUERY Name=Buffer Var=Inhalt'
- Zeile1= compress(substr(Inhalt, 11, 35))
- Zeile2x= right(Zeile1, 2)
- Zeile1= Zeile1x || left(Zeile1, 30)
- Zeile1x= Zeile2x
- 'HEXKEY KEYL="' || Zeile1 || '"'
- end
- end
- if Zeile<GesZeilen then do
- 'SMARTCR'
- 'GOTO Column=11'
- 'QUERY Name=Buffer Var=Inhalt'
- Zeile1= compress(substr(Inhalt, 11, 35))
- if length(Zeile1) = 32 then do
- Zeile2x= right(Zeile1, 2)
- Zeile1= Zeile1x || left(Zeile1, 30)
- Zeile1x= Zeile2x
- 'HEXKEY KEYL="' || Zeile1 || '"'
- 'SMARTCR'
- 'GOTO Column=1'
- Addresse= d2x(x2d(left(Inhalt, 8))+16)
- Addresse= reverse(overlay(reverse(Addresse), "00000000", 1, 8, "0"))
- Inhalt= Addresse || " " || Zeile1x || " "
- 'FIX Var=Inhalt'
- 'TEXT stay T="' || Inhalt || '"'
- 'GOTO Column=11'
- 'HEXKEY KEYL="' || Zeile1x || copies(" ", 30) || '"'
- end
- else do
- Zeile1= Zeile1x || left(Zeile1, 30)
- 'HEXKEY KEYL="' || Zeile1 || '"'
- end
- end
- end
- else do
- if Start > 0 then Zeile1= left(Zeile1, 2*Start) || "00" || substr(Zeile1, 2*Start+1, length(Zeile1)-2*Start)
- else Zeile1= "00" || Zeile1
- if length(Zeile1) < 32 then Zeile1=substr(Zeile1,1,32)
- 'HEXKEY KEYL="' || Zeile1 || '"'
- end
-
- 'GOTO Line=' || Zeile || ' Column=' || Spalte
-
- 'UNLOCK'
- exit
-
- /* ---------------------------- END OF YOUR CODE --------------------- */
-
- SYNTAX:
-
- SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
-
- 'UNLOCK'
-
- exit
-