home *** CD-ROM | disk | FTP | other *** search
- /*
- ** SetBookmark.ced
- **
- ** $VER: SetBookmark.ced 1.1.0 (27.05.93)
- **
- ** This script stores the current cursor position into a numbered
- ** bookmark in an ARexx clip.
- **
- ** This script requires CygnusEd Professional v3.5 (or later) to run.
- **
- ** Copyright © 1993 ASDG, Incorporated All Rights Reserved
- */
-
-
- OPTIONS RESULTS
-
-
- NL = '0A'X
- TRUE = 1
- FALSE = 0
-
- /*
- ** Get the bookmark description.
- */
-
- CEDTOFRONT
- GETSTRING "1" '"Set which bookmark?"'
- IF (RESULT = "") THEN
- EXIT 0
- ELSE NewBookmark = RESULT
-
- /*
- ** If it's one of the menu-selectable bookmarks, then set the
- ** appropriate mark. If the user selected mark 4, then it will be used
- ** as the auto-mark.
- */
-
- IF (NewBookmark >= 1) & (NewBookmark <= 4) THEN
- MARK LOCATION NewBookmark
-
- /*
- ** Store the cursor's location in a clip.
- */
-
- STATUS CURSORCOLUMN
- CurrCursorCol = RESULT + 1
- STATUS CURSORLINE
- CurrCursorLine = RESULT + 1
-
- BookmarkID = "CEDBookmark" || NewBookmark
- BookmarkValue = CurrCursorLine || "," || CurrCursorCol
-
- SETCLIP( BookmarkID, BookmarkValue )
-
- EXIT 0
-