home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / TextEditors&Viewers / Texteditors / NextStep16.lha / NextStep / auto.ged < prev    next >
Encoding:
Text File  |  1995-04-17  |  2.3 KB  |  76 lines

  1. /* $VER: 1.0 AutoConfig macro */
  2.  
  3. OPTIONS RESULTS                             /* enable return codes     */
  4.  
  5. if (LEFT(ADDRESS(), 6) ~= "GOLDED") then    /* not started by GoldEd ? */
  6.     address 'GOLDED.1'
  7.  
  8. 'LOCK CURRENT'                              /* lock GUI, gain access   */
  9. OPTIONS FAILAT 6                            /* ignore warnings         */
  10. SIGNAL ON SYNTAX                            /* ensure clean exit       */
  11.  
  12. /* ------------------------ INSERT YOUR CODE HERE: ------------------- */
  13.  
  14. 'REQUEST BODY="A new API client has been installed.|Do you want to have this client added|to the list of active clients ?" BUTTON="_START NEW CLIENT|no"'
  15.  
  16. if (RESULT = 1) then do
  17.  
  18.     'REQUEST HIDE=TRUE'
  19.  
  20.     'API FIND="NextStep"'
  21.  
  22.     if (RC > 0) then do
  23.  
  24.         'API ADD GOLDED:API/NextStep/DOCK'
  25.         'RUN WAITPORT DOCKSERVER'
  26.     end
  27.  
  28.     'REQUEST STATUS="Waiting for dock startup ..."'
  29.     'RUN CMD="WAIT 5 sec"'
  30.  
  31.     'REQUEST STATUS="" HIDE=FALSE BODY="API client has been added - save|new configuration ?" BUTTON="_SAVE|no"'
  32.  
  33.     if (RESULT = 1) then
  34.         'PREFS SAVE'
  35.  
  36.     'KEY EVENT="<ctrl shift r>"'
  37.  
  38.     'REQUEST BODY="You can toggle the dock on/off using the|hotkey <ctrl shift r>. Do you want to have|the hotkey assigned to a mouse event (e.g.|a doublelick) ?" BUTTON="_ASSIGN TO MOUSE|no"'
  39.  
  40.     if (RESULT = 1) then do
  41.  
  42.         'REQUEST BODY="Select a mouse button ..." BUTTON="doubleclick|doublelick+SHIFT|left+CTRL|middle|none"'
  43.  
  44.         if (RESULT > 0) then do
  45.  
  46.             if (RESULT = 1) then
  47.                 'MOUSE LOAD CONFIG="GOLDED:API/NextStep/PRESETS/doubleclick.rat"'
  48.  
  49.             if (RESULT = 2) then
  50.                 'MOUSE LOAD CONFIG="GOLDED:API/NextStep/PRESETS/doubleshift.rat"'
  51.  
  52.             if (RESULT = 3) then
  53.                 'MOUSE LOAD CONFIG="GOLDED:API/NextStep/PRESETS/ctrlleft.rat"'
  54.  
  55.             if (RESULT = 4) then
  56.                 'MOUSE LOAD CONFIG="GOLDED:API/NextStep/PRESETS/middlebutton.rat"'
  57.  
  58.             'REQUEST BODY="GoldED''s preferences have been changed.|Save new configuration ?" BUTTON="_SAVE|no"'
  59.  
  60.             if (RESULT = 1) then
  61.                 'PREFS SAVE'
  62.         end
  63.     end
  64. end
  65.  
  66. /* ---------------------------- END OF YOUR CODE --------------------- */
  67.  
  68. 'UNLOCK' /* VERY important: unlock GUI */
  69. EXIT
  70.  
  71. SYNTAX:
  72.  
  73. SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
  74. 'UNLOCK'
  75. EXIT
  76.