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 löschen?|Programmdateien werden dadurch unbrauchbar!"
- R1T= "Achtung"
- R1X= "OK|!Abbrechen"
- R2P= "Der Cursor muß sich im Hexbereich innerhalb eines Bytes befinden"
- R3P= "Löschen des letzten Bytes ist nicht möglich"
- end
- else do
- R1B= "Really delete 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"
- R3P= "You cannot delete the last 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'
-
- 'GOTO Line=' || GesZeilen
- 'GOTO Column=11'
- 'QUERY Name=Buffer Var=Inhalt'
- Zeile1= compress(substr(Inhalt, 11, 35))
- AnzByte= length(Zeile1) % 2
-
- if GesZeilen=1 & AnzByte=1 then do
- 'REQUEST Problem="' || R3P || '"'
- 'UNLOCK'
- exit
- end
-
- Zeile1= compress(substr(Inhalt, 11, 35))
- Start= ((Spalte-11)-((Spalte-11)%9)) % 2
- Zeile1x= left(Zeile1, 2)
- if Zeile~=GesZeilen then do
- if length(Zeile1) = 2 then do
- 'DELETE Line'
- 'GOTO Column=11'
- end
- else do
- Zeile1=substr(Zeile1, 3, 32)
- 'HEXKEY KEYL="' || Zeile1 || '"'
- 'UP'
- 'GOTO Column=11'
- end
-
- if Zeile<GesZeilen-1 then do
- do i=GesZeilen-1 to Zeile+1 by -1
- 'QUERY Name=Buffer Var=Inhalt'
- Zeile1= compress(substr(Inhalt, 11, 35))
- Zeile2x= left(Zeile1, 2)
- Zeile1= right(Zeile1, 30) || Zeile1x
- Zeile1x= Zeile2x
- 'HEXKEY KEYL="' || Zeile1 || '"'
- 'UP'
- 'GOTO Column=11'
- end
- end
- end
-
- 'QUERY Name=Buffer Var=Inhalt'
- Zeile1= compress(substr(Inhalt, 11, 35))
-
- if Zeile=GesZeilen then Zeile1x=""
-
- if Start > 0 then do
- if Start<15 then do
- Zeile1= left(Zeile1, 2*Start) || substr(Zeile1, 2*Start+3, 30-2*Start) || Zeile1x
- end
- else do
- Zeile1= left(Zeile1, 30) || Zeile1x
- end
- end
- else do
- Zeile1= substr(Zeile1, 3, 30) || Zeile1x
- end
- if Zeile=GesZeilen then Zeile1= Zeile1 || " "
-
- 'HEXKEY KEYL="' || Zeile1 || '"'
-
- 'GOTO Line=' || Zeile || ' Column=' || Spalte
- 'HEXKEY'
-
- 'UNLOCK'
- exit
-
- /* ---------------------------- END OF YOUR CODE --------------------- */
-
- SYNTAX:
-
- SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
-
- 'UNLOCK'
-
- exit
-