home *** CD-ROM | disk | FTP | other *** search
/ In'side Shareware 1994/1995 January / ish194-95.iso / dfu / gocis / gocis.btn < prev    next >
Text File  |  1993-11-20  |  17KB  |  573 lines

  1.  
  2. ;**************************************************************************
  3. ;  GoCIS User defined button bar L.Lee 6/30/93
  4. ;**************************************************************************
  5. ;
  6. ; You can redefine buttons to tailor GoCIS to your style and needs.
  7. ; This is an example of such a button definition file.
  8. ; up to 128 buttons can be defined in a single file.  If you need
  9. ; more than this I suggest having one button load a separate
  10. ; button file..
  11. ;
  12. ;* [DEFINED.FORMAT] *******************************************************
  13. ;
  14. ; Some have expressed the need to display more than one row of buttons
  15. ; in this case you need to define an optional [DEFINED.FORMAT] section
  16. ; this the only section which is not considered a button.  In this
  17. ; section you can only define two fields (either of which are optional)
  18. ;
  19. ; Define &MaxRows = (1 to 3 defaults as 1)
  20. ;        This field defines the number of row of buttons when displayed
  21. ;        horizontially across the top or bottom on the display
  22. ;
  23. ; Define &MaxColumns = (1 to 3 defaults as 1)
  24. ;        This field defines the number of columns of buttons when displayed
  25. ;        Vertically down the left or right side of the display
  26. ;
  27. ;
  28. ;
  29. ;* [BUTTON NAME] **********************************************************
  30. ;
  31. ; You specify a button name by placing it in braces [name].  The
  32. ; name is used internally by GoCIS to identify the button. You can
  33. ; use any name you like as long as it is unique within the file.
  34. ;
  35. ; After the button name you specify the definition of several
  36. ; components. Any and all of these are optional.  The defined
  37. ; variables are used to initially display the button.  At the very
  38. ; least you should probably define the following:
  39. ;
  40. ;   DEFINE &CAPTION     =caption to display on the button
  41. ;   DEFINE &ICON        =the name of an icon (.ICO) file to display on
  42. ;                        the button
  43. ;   DEFINE &TITLE       =text to display as the mouse moves across the
  44. ;                        button
  45. ;   DEFINE &DRAGMODE    =can the button be dragged to a forum?
  46. ;                        (0=no, 1=yes)
  47. ;
  48. ; Finally comes the actions you'd like carried out as the button is pressed
  49. ; this consists of some verb or action and any parameters as appropriate
  50. ;
  51. ;  The following is a list of the commands and the actions
  52. ;
  53. ;  SET &variable        =value
  54. ;  &Variable            =value
  55. ;
  56. ;   The varibles that you can set are as follows:
  57. ;
  58. ;   &CAPTION    =caption to display on the button
  59. ;   &ICON       =the name of an icon (.ICO) file to display on the button
  60. ;   &TITLE      =text to display as the mouse moves across the button
  61. ;   &DRAGMODE   =can the button be dragged to a forum (0=no, 1=yes);
  62. ;   &CONFIG     =load a new configuration file
  63. ;   &SCOPE      =Set the scope of the action buttons to "VIEW" or "FORUM"
  64. ;   &VIEW       =display this view
  65. ;   &FORUM      =Make this the current forum
  66. ;   &BAUD       =set baud rate to this value
  67. ;   &PHONE      =set phone number to this value
  68. ;   &FIELD1..5  =user defined to do with as you please
  69. ;
  70. ;
  71. ; +ACTION       named-action
  72. ; -ACTION       named-action
  73. ;
  74. ;   The specified action can be set "+" or removed "-".  Actions that
  75. ;   can be named include:
  76. ;
  77. ;               Join.Forum
  78. ;               Set.Defaults
  79. ;               Update.Sections
  80. ;               Read.Announcements
  81. ;               Scan.New.Messages
  82. ;               Read.Messages
  83. ;               Send.Replies
  84. ;               Read.New.Messages
  85. ;               Read.Waiting.Messages
  86. ;               Scan.Libraries
  87. ;               Download.Files
  88. ;               Upload.Files
  89. ;
  90. ;       
  91. ;
  92. ; +PENDING      named-pending-state
  93. ; -PENDING      named-pending-state
  94. ;
  95. ;   The pending states are the flags that display the fact that
  96. ;   you have recieved messages, headers, and or catalogs.  Pending
  97. ;   states you can specify include:
  98. ;
  99. ;               LBR    (catalogs)
  100. ;               MSG    (messages)
  101. ;               MQS    (headers)
  102. ;
  103. ;
  104. ; LOAD          button-filename
  105. ;
  106. ;   Loads a new set of buttons from the specified file
  107. ;
  108. ; DO            ScriptfileName
  109. ; RUNSCRIPT     ScriptfileName
  110. ;
  111. ;   Both of these are the same and causes GoCIS to execute the given
  112. ;   communications script.  This of course means that GoCIS will be
  113. ;   loging on to CIS and performing some prescribed actions..
  114. ;
  115. ; RUN           window-state program parameters
  116. ; EXECUTE       window-state program parameters
  117. ; SHELL         window-state program parameters
  118. ;
  119. ;   All of these are the same and causes GoCIS to execute the given
  120. ;   program passing it the specifed parameters.  The window-state
  121. ;   is optional and defaults to NORMAL, but can be specified as
  122. ;   NORMAL, MAXIMIZED otr MINIMIZED.
  123. ;
  124. ; WAITAPP               Seconds or .fraction-of-second
  125. ; WAITSTART             Seconds or .fraction-of-second
  126. ; WAITEND
  127. ;
  128. ;   Each of these commands can cause GoCIS to suspend execution
  129. ;   until a "SHELLED" application has started or completed.
  130. ;   WAITSTART   causes the button to pause (N) seconds for  the application to start
  131. ;   WAITEND     causes the button to pause until the application ends
  132. ;   WAITAPP     causes the button to pause (N) seconds for  the application to start
  133. ;               and then futher causes the button to pause until the application ends
  134. ;
  135. ;
  136. ;
  137. ; PAUSE         Seconds or .fraction-of-second
  138. ;
  139. ;   This causes the button to pause before continuing.  You can enter
  140. ;   decimal point to indicate a delay in fractions of a second as well.
  141. ;   This is useful after using the RUN command since many windows
  142. ;   programs need a few seconds before they are willing to accept commands
  143. ;
  144. ;
  145. ;
  146. ; SENDKEYS keystrokes
  147. ;
  148. ;   Defines the keystrokes to be simulated by the program
  149. ;
  150. ;
  151. ;   If you are already familiar with the VB SendKeys function you
  152. ;   already know the format of the keystrokes that can be sent
  153. ;   For those of you not familiar with this command the following
  154. ;   characters have special meaning:
  155. ;
  156. ;               '+' SHIFT
  157. ;               '^' CONTROL
  158. ;               '%' ALT
  159. ;
  160. ;   So to simulate an ALT-R you code %R
  161. ;   CONTROL-R would be ^R and so on...
  162. ;
  163. ;   The following keys can be simulated by enclosing them in braces {}
  164. ;
  165. ;   {ENTER} {HELP} {LEFT} {RIGHT} {UP} {DOWN} {PGDN} {PGUP} {F1 ... F12}
  166. ;
  167. ;   You can repeat a keystroke by specifing the key within braces and
  168. ;   specifing a count.  Fox example you can code:
  169. ;
  170. ;   {TAB}{TAB}{TAB}{TAB}   ot {TAB 4}
  171. ;
  172. ;
  173. ;  CONDITIONAL LOGIC...
  174. ;
  175. ;  IF.. THEN.. ENDIF
  176. ;  FOR.. NEXT...
  177. ;
  178. ;   This was never intended to be the do all language it does support
  179. ;   some very simple conditional commands that can be useful..
  180. ;
  181. ;   IF condition THEN
  182. ;     ...
  183. ;   ELSE
  184. ;      ...
  185. ;   ENDIF
  186. ;
  187. ;   if the condition is true the commands between the if and endif
  188. ;   are executed.  You can nest if's up to 20 deep.
  189. ;
  190. ;   There are 5 functions that are avaiable to be used only within an
  191. ;   "IF":
  192. ;
  193. ;       FileExists(filename)..  Returns true if the file exists
  194. ;       FileData(FileName)...   Returns date/time of the file
  195. ;       Today()...              Returns current date/time
  196. ;       Pending(state)...       Returns true if the state is pending
  197. ;       Action(flag)...         Returns true if the flag is set
  198. ;
  199. ;
  200. ;   FOR EACH FORUM
  201. ;      ...
  202. ;   NEXT
  203. ;
  204. ;   This is the only looping construct and it executes commands for between
  205. ;   FOR..NEXT for each forum listed in the current view...
  206. ;
  207. ;
  208. ;
  209. ;  <<<< ADDITIONAL NOTES >>>>>
  210. ;
  211. ;    Finally you can use GoCIS variable data that will be replaced when
  212. ;    the button is pressed with the value of a GoCIS field
  213. ;
  214. ;    For example instead of hard coding a user name you can
  215. ;    use the &UserName variable, for which GoCIS will substitute
  216. ;    the cis user name at the time the button os pressed.
  217. ;
  218. ;    The following variables can be used:
  219. ;
  220. ;       &Caption        Caption of the button
  221. ;       &Icon           Icon file name of the button
  222. ;       &Title          Title of the button
  223. ;       
  224. ;       &ExePath    Path to GoCIS.EXE
  225. ;
  226. ;       &ForumName
  227. ;       &Forum  Name of the currently active forum
  228. ;
  229. ;       &ControlPath    Path to GoCIS control file
  230. ;       &MessagePath  Path to GoCIS .MSG files
  231. ;       &DownloadPath   Path to GoCIS downloads
  232. ;       &ScriptPath     Path to GoCIS scripts
  233. ;
  234. ;       &Name
  235. ;       &UserName       Name used on CIS
  236. ;
  237. ;       &UserId Account number on CIS
  238. ;
  239. ;       &Password       Cis Password
  240. ;
  241. ;
  242. ;       &Date           
  243. ;       &Time           
  244. ;       &DDMMMYY
  245. ;       &YYMMDD Various date and time variables
  246. ;
  247. ;       &ConfigFile             Name of currently active configuration file
  248. ;       &AddressFile            Name of currently active address book file
  249. ;       &ButtonFile             Name of currently active ButtonBar file
  250. ;
  251. ;       &Baud           Current Baud rate
  252. ;       &Phone          Current Phone number
  253. ;
  254. ;       &Field1..5              User defined fields
  255. ;
  256. ;
  257. ;**************************************************************************
  258. ;
  259.  
  260. [ExitBtn]
  261. ;
  262. ; EXITBTN - QUICK Exit the program
  263. ;
  264.     Define &Caption = Exit
  265.     Define &Icon    = &ExePath\Icons\exit.ICo
  266.     Define &Title   = EXIT, QUIT, or TERMINATE the program.
  267.     SendKeys %FX
  268.  
  269. [ReadMail]
  270. ;
  271. ; READMAIL - Show mail latest mail received from CIS
  272. ;
  273.     Define &Caption = ReadMail
  274.     Define &Icon    = &ExePath\Icons\Mail10.ICO
  275.     Define &Title   = Review latest CompuServe Mail.
  276.     SendKeys %EL
  277.  
  278. [SendMail]
  279. ;
  280. ; SENDMAIL - Create mail to be sent to CIS
  281. ;
  282.     Define &Caption = SendMail
  283.     Define &Icon    = &ExePath\Icons\Mail03.ICO
  284.     Define &Title   = Create CompuServe MAIL to send.
  285.     SendKeys %EC
  286.  
  287. [ScanMail]
  288. ;
  289. ; SCANMAIL - Specify selection criteria to review historical email
  290. ;
  291.     Define &Caption = ScanMail
  292.     Define &Icon    = &ExePath\Icons\MAIL04.ICO
  293.     Define &Title   = Select CompuServe MAIL for review.
  294.     SendKeys %ES
  295.  
  296. [ReadMsgs]
  297. ;
  298. ; READMSGS - Show latest forum messages received from CIS
  299. ;
  300.     Define &Caption  = ReadMsgs
  301.     Define &Icon     = &ExePath\Icons\MAIL11.ICO
  302.     Define &Title    = Review latest &FORUM forum MESSAGES.
  303.     Define &DragMode = 1
  304.     SendKeys %RML
  305.  
  306. [SendMsgs]
  307. ;
  308. ; SENDMSGS - Create a forum message to be sent
  309. ;
  310.     Define &Caption  = SendMsgs
  311.     Define &Icon     = &ExePath\Icons\MAIL12.ICO
  312.     Define &Title    = Create &FORUM forum MESSAGE.
  313.     Define &DragMode = 1
  314.     SendKeys %RMC
  315.  
  316. [ScanMsgs]
  317. ;
  318. ; SCANMSGS - Specify selection criteria to review historical messages
  319. ;
  320.     Define &Caption  = ScanMsgs
  321.     Define &Icon     = &ExePath\Icons\MAIL13.ICO
  322.     Define &Title    = Select &FORUM forum MESSAGES for review.
  323.     Define &DragMode = 1
  324.     SendKeys %RMS
  325.  
  326. [MarkHdrs]
  327. ;
  328. ; MARKHDRS - Mark messages headers for download
  329. ;
  330.     Define &Caption  = MarkHdrs
  331.     Define &Icon     = &ExePath\Icons\PEN06.ICO
  332.     Define &Title    = Mark &FORUM forum MESSAGE HEADERS for retrieval.
  333.     Define &DragMode = 1
  334.     SendKeys %RMM
  335.  
  336. [MarkLib]
  337. ;
  338. ; MARKLIB - Mark cataloged library records for download
  339. ;
  340.     Define &Caption  = MarkLib
  341.     Define &Icon     = &ExePath\Icons\FILES07.ICO
  342.     Define &Title    = Mark cataloged &FORUM forum files for download.
  343.     Define &DragMode = 1
  344.     SendKeys %RLC
  345.  
  346. [ScanLib]
  347. ;
  348. ; SCANLIB - Define criteria to perform an online library search
  349. ;
  350.     Define &Caption  = ScanPtn
  351.     Define &Icon     = &ExePath\Icons\CRDFLE11.ICO
  352.     Define &Title    = Specify &FORUM forum library search criteria.
  353.     Define &DragMode = 1 
  354.     SendKeys %RLS
  355.  
  356. [Change.Baud.Rate]
  357. ;
  358. ; Cycles through various baud rates
  359. ;
  360.     Define &Caption = &Baud
  361.     Define &Icon    = &ExePath\Icons\Baud&Baud.ICo
  362.     Define &Title   = Baud rate currently set at &Baud, press to change rate to 1200, 2400, 9600, 14400, or 19200
  363.  
  364.     &Field1 = &Baud
  365.     If &Baud = 1200 Then 
  366.        &Field1 = 2400
  367.     Endif
  368.     If &Baud = 2400 Then
  369.        &Field1 = 9600
  370.     Endif
  371.     If &Baud = 9600 Then
  372.        &Field1 = 14400
  373.     Endif
  374.     If &Baud = 14400 Then
  375.        &Field1 = 19200
  376.     Endif
  377.     If &Baud = 19200 Then
  378.        &Field1 = 1200
  379.     Endif
  380.  
  381.     &Baud    = &Field1
  382.     &Icon    = &ExePath\Icons\Baud&Baud.Ico
  383.     &Caption = &Baud
  384.     Echo Baud Rate now set to &Baud.
  385.  
  386. [EditBtn]
  387. ;
  388. ; EDITBTN - Allow user to edit this file using notepad.exe
  389. ;
  390.     Define &Caption = Edit.BTN
  391.     Define &Icon    = &ExePath\Icons\EditBtn.ICO
  392.     Define &Title   = EDIT the Button Bar definition.
  393.     Run Maximized NotePad.Exe &ButtonFile
  394. ;
  395. ; we could optionally print and then exit notepad?
  396. ;
  397. ;       SendKeys &FP
  398. ;       Pause 20
  399. ;       SendKeys %FX
  400.  
  401. [EditIni]
  402. ;
  403. ; EDITINI - Allow user to edit the GoCIS.INI using notepad.exe
  404. ;
  405.     Define &Caption = Edit.INI
  406.     Define &Icon    = &ExePath\Icons\Wrench.ICO
  407.     Define &Title   = EDIT the GoCIS.INI file.
  408.     Run Maximized NotePad.Exe &ExePath\GoCIS.INI
  409.     WaitStart .50
  410.     SendKeys %SFPGM OPTIONS{Enter}{Tab 4}{Enter}{DOWN}{HOME}
  411. ;
  412. ; we could optionally print and then exit notepad?
  413. ;
  414. ;       SendKeys &FP
  415. ;       Pause 20
  416. ;       SendKeys %FX
  417.  
  418. [Weather]
  419. ; WEATHER - Go online an get the local weather report
  420. ;
  421.     Define &Caption = Weather
  422.     Define &Icon    = &ExePath\Icons\Rain.ICO
  423.     Define &Title   = Go ONLINE and get local WEATHER information.
  424.  
  425. ; The folloing code insures this is only run once/day
  426.  
  427.     If FileExists(&ScriptPath\Weather.Scr) Then 
  428.        If FileDate(&MessagePath\Weather.Txt) < Today() Then
  429.           RunScript &ScriptPath\Weather.Scr
  430.        Endif
  431.        If FileExists(&MessagePath\Weather.Txt) Then 
  432.           Run Maximized NotePad.Exe &MessagePath\Weather.Txt
  433.           &Title = Review local WEATHER information.
  434.        Else
  435.           Echo Cannot locate &Messagepath\Weather.Txt
  436.           Beep
  437.        Endif
  438.     Else
  439.        Echo You need to fix the path in this button to point at Weather.SCR
  440.        Beep
  441.     Endif
  442.  
  443. ; We could add commands to print it via Notepad?
  444.  
  445. ;       SendKeys &FP
  446. ;       Pause 20
  447. ;       SendKeys %FX
  448.  
  449. [WhatsNew]
  450. ; WHATSNEW - Go online an get the lastest "Whats New Report"
  451. ;
  452.     Define &Caption = WhatsNew
  453.     Define &Icon    = &ExePath\Icons\WhatsNew.ICO
  454.     Define &Title   = Go ONLINE and get "WHAT's NEW" from CompuServe.
  455.  
  456. ; The folloing code insures this is only run once/day
  457.  
  458.     If FileExists(&ScriptPath\WhatsNew.Scr) Then 
  459.        If FileDate(&MessagePath\WhatsNew.Txt) < Today() Then
  460.           RunScript &ScriptPath\WhatsNew.Scr
  461.        Endif
  462.        If FileExists(&MessagePath\WhatsNew.Txt) Then 
  463.           Run Maximized NotePad.Exe &MessagePath\WhatsNew.Txt
  464.           &Title = Review "WHAT's NEW" from CompuServe.
  465.        Else
  466.           Echo Cannot locate &Messagepath\WhatsNew.Txt
  467.           Beep
  468.        Endif
  469.     Else
  470.        Echo You need to fix the path in this button to point at WhatsNew.SCR
  471.        Beep
  472.     Endif
  473.  
  474. ; We could add commands to print it via Notepad?
  475.  
  476. ;       SendKeys &FP
  477. ;       Pause 20
  478. ;       SendKeys %FX
  479.  
  480. [Billing]
  481. ; BILLING - Go ONLINE and get information on your current CHARGES.
  482. ;
  483.     Define &Caption = Billing
  484.     Define &Icon    = &ExePath\Icons\Billing.ICO
  485.     Define &Title   = Go ONLINE and get information on your current CHARGES.
  486.  
  487. ; The folloing code insures this is only run once/day
  488.  
  489.     If FileDate(&MessagePath\Billing.Txt) < Today() Then
  490.        RunScript &ScriptPath\Billing.Scr
  491.     Endif
  492.  
  493.     Run Maximized NotePad.Exe &MessagePath\Billing.Txt
  494.     &Title = Review your CURRENT CHARGES from CompuServe.
  495.  
  496. ; We could add commands to print it via Notepad?
  497.  
  498. ;       SendKeys &FP
  499. ;       Pause 20
  500. ;       SendKeys %FX
  501.  
  502.  
  503. [Grammatik]
  504. ;
  505. ; Run Gramatik to spell check my .SND files
  506. ;
  507.     Define &Caption = Grammatik
  508.     Define &Icon    = &ExePath\Icons\GMkw.ICO
  509.     Define &Title   = Spell check a .SND files using Grammatik
  510.  
  511.     If FileExists(C:\GMKW\GMKW.EXE) Then
  512.        Run Maximized C:\GMKW\GMKW.EXE
  513.        WaitStart 1.5
  514.        SendKeys %FO&MessagePath\*.Snd{Enter}
  515.     Else
  516.        Echo You need to fix the path in this button to point at GRAMATIK.
  517.        Beep
  518.     Endif
  519.  
  520. [Super.Button]
  521. ;
  522. ; This button scans the for all offline pending states and displays each
  523. ; corresponding form for you to act upon...
  524. ;
  525.     Define &Caption = JustDoIt!
  526.     Define &Icon    = &ExePath\Icons\SuperMan.ICo
  527.     Define &Title   = For each FORUM, displays all forms for appropriate pending offline actions.
  528.  
  529.     &Field1 = &View
  530.     &Field2 = &Forum
  531.     &Field3 = 0
  532.  
  533.     &VIEW = [Forums...Pending Offline]
  534.  
  535.     For Each Forum
  536.         Echo Scanning &FORUM for offline pending states.
  537.         If PENDING(MSG) Then 
  538.             &Field3 = 1
  539.             Echo Messages found in &FORUM.
  540.             Beep
  541.             Pause .15
  542.             SendKeys %RML
  543.         EndIF
  544.         If PENDING(MQS) Then 
  545.             &Field3 = 1
  546.             Echo Headers found in &FORUM.
  547.             Beep
  548.             Pause .15
  549.             SendKeys %RMM
  550.         EndIF
  551.         If PENDING(LBR) Then 
  552.             &Field3 = 1
  553.             Echo Catalogs found for &FORUM.
  554.             Beep
  555.             Pause .15
  556.             SendKeys %RLC
  557.         EndIF
  558.     Next
  559.  
  560.     If &Field3 = 1 Then 
  561.        Echo Done! Returning to &Field2 in &Field1
  562.     Else
  563.        Echo No pending offline actions found. Returning to &Field2 in &Field1.
  564.     Endif
  565.  
  566.     Beep
  567.     &View = &Field1
  568.     &Forum = &Field2
  569.  
  570.