home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxxpl201.zip / REXXPL.U2 < prev   
Text File  |  1998-01-20  |  19KB  |  392 lines

  1. ;U2;;«SS0,SZ=12PT,UF=STANDARD,LM=0DI,RM=0DI,PW=80DI,OF=0DI,0DI,IP=0DI,0DI,0DI,NJ,HY=0,PL=273LI,273LI,273LI,FD=273LI,TP=0LI,BT=0LI»«US0»«LM2DI»
  2.  
  3.  ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá
  4.  ⁿá ⁿá                                                              ⁿá ⁿá
  5.  ⁿá ⁿá       REXXPL.U2 v2.011 -- Carl L. Distefano  1/20/98         ⁿá ⁿá
  6.  ⁿá ⁿá                REXX within XPL ... "RexXPL!"                 ⁿá ⁿá
  7.  ⁿá ⁿá                                                              ⁿá ⁿá
  8.  ⁿá ⁿá   For XyWrite 4 & XyWrite for Windows Running Under OS/2     ⁿá ⁿá
  9.  ⁿá ⁿá «MDFL»>«MDNM» The XyWrite-OS/2 Shell [XYOS2SHL.ZIP] must be installed «MDFL»<«MDNM»  ⁿá ⁿá
  10.  ⁿá ⁿá                                                              ⁿá ⁿá
  11.  ⁿá ⁿá  Read REXXPL.DOC for instructions on installation and use    ⁿá ⁿá
  12.  ⁿá ⁿá  ========================================================    ⁿá ⁿá
  13.  ⁿá ⁿá                                                              ⁿá ⁿá
  14.  ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá
  15.  
  16. «GL »«US0»
  17. {{5Help4RexXPL,Help4R2*}} Help for RexXPL.PM
  18. «SV01,«FL»«LM2DI»«RM78DI»
  19.  
  20. «MDBO»REXXPL.PM v2.01 -- Carl L. Distefano  rev. 1/15/98
  21. For XyWrite 4 & XyWrite for Windows Running Under OS/2«MDNM»
  22.  
  23. Core Routines & Instructions for Incorporating REXX
  24.     into the XyWrite Programming Language (XPL)
  25.            ⁿ╛ ⁿ╛  REXX + XPL = RexXPL!   ⁿ╝ ⁿ╝
  26.  
  27. «MDBI»See REXXPL.DOC for detailed information on set-up and use«MDNM»
  28.  
  29.  
  30. «MDIT»Requirements
  31. ------------«MDNM»
  32.  - Xy-OS/2 Shell [XYOS2SHL.ZIP by R.J.Holmgren] must be installed
  33.  - Frames  7B5o2 7D and {5r2x} must be *in U2* (having the PMs on
  34.     disk only will NOT work)
  35.  - You must set the User Variable (BootDrive letter) in S/G 710
  36.  
  37. «MDIT»Usage
  38. -----«MDNM»
  39. «MDBO»Frame R2X (REXXPL operator):
  40. ============================«MDNM»
  41.  AESV50,[O2|STARTOS2 params] [/PROTECT]
  42.  
  43. [/* xy.nn#nn */]
  44. [Rexx code to execute]
  45.  AF
  46.  éú2.R2X é
  47.  
  48.    Place all RexXPL and O2 parameters on the first line of S/G 50.
  49.    ending with a carriage return.  "Program Title", if any, must
  50.    come first
  51.  
  52.    If no parameters are specified, S/G 50 must begin with a
  53.    carriage return
  54.  
  55.    Switch /PROTECT suppresses updating of Save/Get contents
  56.  
  57.  
  58. «MDIT»RexXPL Syntax
  59. -------------«MDNM»
  60. 1.  Variable names corresponding to S/Gs take the form "xy.n",
  61.     where n is the S/G number: xy.00, xy.01, xy.999, etc.
  62.  
  63. 2.  RexXPL variable names that do not appear literally in the
  64.     Rexx code (e.g., names manufactured by iteration through a
  65.     DO loop) must be included in a comment; a range of S/G
  66.     numbers can be specified.
  67.  
  68.       For example, "/* xy.71#75; xy.100 */" instructs
  69.       R2X to process S/Gs 71-75 and 100, in *addition*
  70.       to any other S/G numbers appearing explicitly
  71.       as per Rule 1.
  72.  
  73.     Note the use of Ascii-35 (#) to state the range.
  74.  
  75. 3.  EXIT instructions must be replaced with SIGNAL EXIT.
  76.  
  77. «MDBO»Frame R2 (evaluate Rexx expressions within XyWrite):
  78. ====================================================«MDNM»
  79. R2[/T|/Q] [RexxExpression]<Helpkey>
  80.  
  81. «MDIT»Examples
  82. --------«MDNM»
  83. R2 reverse('!dlroW ,olleH') <== displays "Hello, World!" as PRompt
  84. R2/T xrange(d2c(32),d2c(127))<Helpkey> <== puts Ascii 32-127 in text
  85. R2/Q xrange(d2c(32),d2c(127))<Helpkey> <== evaluates expression but
  86.                                            does not display result
  87.  
  88.  
  89. For use with RENUMBER.PM:
  90. -------------------------
  91. Default S/G Range=[00|50] 01-02; 710-733
  92. Renumber frame R2X + frame R2 + REXXPL.CMD together
  93.          ^^^^^^^^^   ^^^^^^^^   ^^^^^^^^^^
  94. Use PACK mode; FREEZE 50
  95. Specify RANGE 710-733 *or* RANGE 01-02
  96. LEFT$ renumber strings (2) (observe cAsE):
  97. Lg"SV
  98. xy.
  99. Do not renumber the Help frame {5Help4RexXPL}
  100.  
  101. «LM»»
  102. {{m}}
  103.  
  104. {{5RexXPL,R2X}} RexXPL Evaluator v2.01 (CLD rev. 1/15/98)
  105. «LB »«SX00,«IS50»»«GLa»
  106.  
  107.             USER VARIABLE - Toggle eXPanded view to set Save/Gets
  108.             -----------------------------------------------------
  109.              ⁿÖ OS/2 BootDriveLetter (REQUIRED) (e.g., «SV710,C»)
  110. «LBa»«SV710,»;*;
  111. ;*;
  112.  éº é½(es 1) üA«IF«VA|710»<1»«PR Set User Variable 1 (OS/2 BootDriveLetter) in frame R2X»«EX1»«EI»«IF«VA|00»<1»«SV711,No Rexx code received»«GLp»«EI»;*;
  113. «SV50,»«SX711,«IS00»»«SV712, »«LBb»«IF" "ε«IS711»==0»«SV713,»«XS711,712,,712,713»«SX711,«IS713»»«GLb»«EI»«SX710,«IS710»+":\OS2\MDOS\"»«SV712,»«SV713,»«SV714,
  114. »«SV715,»«IF""""ε«IS711»==0!"/"ε«IS711»==0&«IS714»ε«IS711»>0»«XS711,714,712,,715»«SX711,«IS715»»«SV713,»«SU714,«IF@upr(«IS712»)≡«IS715»»«XS712,715,716,717,718»«SX712,«IS716»+«IS718»»«SX713,«IS713»+«IS717»»«EI»»«SV715,/PROTECT»«GT714»«SV715,/S»«GT714»«SV715,/WAIT»«GT714»«EI»«SX713,@upr(«IS713»)»«SX714,@upr(«IS711»)»«SV715,»«SV717,»«SV716,»«SV718,xy.»«SV719,#0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ»«SV720,X»«LBc»«IF«IS714»≡"XY."»«SV716,»«SV721,»«XS714,718,722,,721»«LBd»«SV723,»«XS721,720,,722,723»«SX714,«IS721»»«IF«IS722»ε«IS719»<0»«GLe»«EI»«SX714,«IS723»»«SX716,«IS716»+«IS722»»«IF«VA|716»>8»«SV718,»«GLe»«EI»«SX721,«IS723»»«GLd»«LBe»«IF«IS716»≡"#"»«SX717,«IS717»+«IS716»+","»«GLc»«EI»«IF(«IS716»+",")ε«IS715»<0»«SX715,«IS715»+«IS716»+","»«EI»«GLc»
  115. «EI»«SX714,«IS715»+«IS717»»«SV716,ü»«SV717, ü»«XS717,716,724,,725»«SV717,■»«XS717,725,726,,727»«SX717,«IS724»+"Ç"+«IS726»»«SV716,X»«XS717,716,,718,725»«SV728,[≥bΘ*═╘X└]»«SV717, é
  116. »«SV716,黫XS717,716,718,,729»«SV717, é»«XS717,716,718,,730»«SV716,»«SV717,,»«SX718,0»«LBf»«IF«VA|714»>0»«SX727,0»«LBg»«IF","ε«IS714»<0»«SX720,«IS714»»«SV714,»«GLh»«EI»«SV722,»«XS714,717,720,,722»«SX714,«IS722»»«IF«VA|720»<1»«GLg»«EI»«LBh»«SX721,«IS720»»«IF«IS720»≡"#"»«SX727,1»«SX721,«VA@720#2»»«SX720,«VA@720#1»»«IF«PV720»>«PV721»»«SX723,«IS720»»«SX720,«IS721»»«SX721,«IS723»»«EI»«IF«PV721»-«PV720»>25»«PRWorking...»«EI»«SX715,"
  117. if ("+«IS721»+"-"+«IS720»+")>25 then say 'Working ...'
  118. do IDz="+«IS720»+" to "+«IS721»+"
  119. do while length(IDz)<2; IDz='0'||IDz;end
  120. SGs=SGs||IDz||','
  121. SGfile='"+«IS710»+"R2X'||IDz||'.SAV'
  122. ff=stream(SGfile,'C','query exists');if ff\='' then do
  123. call Read;xy.IDz=tmpSG;drop tmpSG;end;end
  124. "»«EI»«SU722,»«IF"0"ε«IS720»==0!"0"ε«IS721»==0»«SU722,«IF«PV720»<10&@siz(«IS720»)<2»«SX720,"0"+«IS720»»«EI»»«EI»«LBi»«IF«PV727»<1»«SV715,»«EI»«IF«VA720»<1»«IF@upr(«IS720»)ε«IS719»<11!(@upr(«IS720»)ε«IS719»>10&«VA|720»>1)»«GLf»
  125. «EI»«EI»«IF«VA720»>0»«IF«PV720»<0!«PV720»>1999»«GT722»«SX711,"Bad S/G name: "+«IS720»»«GLp»«EI»«EI»«GT722»«IF«PV727»<1»«SX716,«IS716»+«IS720»+","»«SX718,«PV718»+«VA|720»+1»«IF«PV718»>200»«SX716,«IS716»+"'
  126. SGs=SGs||'"»«SX718,0»«EI»«EI»«SX726,"«VA|"+«IS720»+"»"»«SX726,«PV726»»«IF«PV726»>0»«IF«PV727»>0!«PV726»>200»«SX726,"«SX"+«IS720»+",«IS"+«IS720»+"»»"»«PV726»«LBj»«SX726," é½sa %"+«IS720»+","+«IS710»+"R2X"+«IS720»+".SAV é"»«PV726»«IF«ER»»«LBk»«SX711,«VA$ER»»«SX711,"«VA\"+«IS711»+"»"»«SX711,«PV711»»«GLp»«EI» é½(wait)«IF«PV727»<1»«SX715,"SGfile='"+«IS710»+"R2X"+«IS720»+".SAV';call Read;xy."+«IS720»+"=tmpSG;drop tmpSG
  127. "»«EI»«SX50,«IS50»+«IS715»»«SV715,»«GLm»«EI»«SX724,"«IS"+«IS720»+"»"»«SX724,«PV724»»«SV731,»«SV726,»«LBl»«IF«IS724»≡«IS725»»«SV731,»«XS724,725,732,,731»«SX724,«IS732»+«IS728»+«IS731»»«GLl»«EI»«IF"'"ε«IS724»+"
  128. "ε«IS724»+«IS729»ε«IS724»+«IS730»ε«IS724»>-4»«GLj»
  129. «EI»«SV733,»«SX50,«IS50»+"xy."+«IS720»+"='"+«IS724»+"'
  130. "»«EI»«SV724,»«LBm»«IF@upr(«IS720»)ε«IS719»<11»«SX720,«PV720»+1»«IF«PV720»<=«PV721»»«SX720,«IS720»»«GLi»«EI»«EI»«GLf»«EI»«IF«IS713»≡"/PROTECT"»«SX714,«IS714»+"Protect=1; "»«EI»«SX50,«IS714»+"xy.=''
  131. SGs='"+«IS716»+"'
  132. "+«IS50»+"
  133. "+«IS711»»«SV711,» é½sa %50,«PV710»R2XTMP.TMP é«IF«ER»»«GLk»«EI» é½(wait);*;
  134. «IF"/"ε«IS712»+""""ε«IS712»<-1»«SV712,/b /c»«EI»«IF"/F"ε@upr(«IS712»)+"/B"ε@upr(«IS712»)+"/WIN"ε@upr(«IS712»)+"/MAX"ε@upr(«IS712»)<-3»«SX712,«IS712»+" /b"»«EI»«IF"/K"ε@upr(«IS712»)+"/C"ε@upr(«IS712»)<-1»«SX712,«IS712»+" /c"»«EI»«SX50,«IS712»+" /i call "+«IS710»+"REXXPL.CMD"» éú(2.o2)«SV722,»«SV723,»«IF«IS713»≡"/PROTECT"»«GLp»«EI» éW«SX716,«IS710»+"OUTPUT.OK"»«SU719,«SX720,«VA$ET»»«SX720,«VA@720:3»»«SX720,«VA@720.1»»«IF«PV720»>6»«SV710,!»«EI»»«LBn» é½exist «PV716» é«IF«ER»»«GT719»«IF«IS710»=="!"»«SV719,»«PRWaiting for Rexx output [hit func BK to stop]»«EI»«GLn»
  135. «EI»«IF«VA|Q»<0»«SVQ,»«EI»«SX717,«VA!Q»»«SX717,«IS717»»«SV719,0V|2U|4X|»«XS719,717,720,,721»«SX719,«VA@721|1»»«SX717,"«S"+«IS719»+"Q,"+«ISQ»+"»"» é½ldpm «PV716»,Q é«IF«ER»»«GLk»«EI» é½(wait) é½ernv «PV716» é é½(wait);*;
  136. «SX50,«ISQ»+""»«PV717»«SV716,»«SV717,»«SV719,»«SV721,»«IF",Error ("ε«IS50»>5»«PV50» ü ü? ü; Çc«PV712»«IF«VA|711»>0»«PR@711»«EI»«SV711,!»«GLp»«EI»«IF«VA|50»<1»«SV711,No Rexx output received - Abort»«GLp»«EI»«LBo»«IF«IS728»ε«IS50»+"≥bΘ*═╘X└]"ε«IS50»+"bΘ*═╘X└]"ε«IS50»>-3»«XS50,728,722,,721»«SX50,«IS722»+«IS725»+«IS721»»«GLo»«EI»«PV50»«LBp»«SV733,»«SV732,»«SV731,»«SV730,»«SV729,»«SV728,»«SV727,»«SV726,»«SV725,»«SV724,»«SV723,»«SV722,»«SV721,»«SV720,»«SV719,»«SV718,»«SV717,»«SV716,»«SV715,»«SV714,»«SV713,»«SV712,»«IF«VA|711»>0»«IF«IS711»<>"!"»«SX710,"«PR"+«IS711»+"»«SV711,»"»«PV710»«SV710,»«EI»«EX1»«EI»«SV710,»«EX»
  137.  
  138. {{5R2,R2/?}} Evaluate REXX expressions interactively, in Xy
  139. «SX00,«IS 50»»«SX01,«IS00»»«SX02,@upr(«VA$FR»)»«SV50,
  140.  
  141. if pos(';',xy.01)>0 then do
  142.   tmp=left(xy.01,lastpos(';',xy.01))
  143.   xy.01=right(xy.01,length(xy.01)-lastpos(';',xy.01))
  144.   interpret tmp
  145.   end
  146.  
  147. interpret 'xy.01='xy.01
  148.  
  149. » éú(2.r2x)«IF«IS02»≡"/Q"»«EX»«EI»«IF«IS02»≡"/T"» Ç}«GT01»«EX»«EI»«PR@01»«EX»
  150.  
  151.  2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E
  152.  
  153. «GLa»
  154. {{5Help4Alarm}} Help for ALARM.PM (RexXPL)
  155. «SV01,
  156. ALARM.PM (RexXPL)  C.L.Distefano 7/21/96
  157. Set Alarms|Reminders from XyWrite Command Line
  158. [Requires XYOS2SHL.ZIP + REXXPL.ZIP]
  159.  
  160. Usage:
  161. -----
  162. ALARM [h]h:mm [AM|PM][,reminder]<Helpkey>
  163.  
  164. Examples:
  165. ALARM 10:55a,Coffee break!<Helpkey>
  166. ALARM 1:00 PM,Lunch
  167. ALARM 14:55,Meeting uptown<Helpkey>
  168. ALARM 6:05<Helpkey> <== see Note A below
  169.  
  170. Remarks:
  171. -------
  172. A.  If XyWrite is displaying civilian time and you omit AM|PM,
  173.     the alarm is set to the _next occurrence_ of the specified
  174.     time.  E.g., if current time is 11:00pm and you specify "1:00",
  175.     alarm is set to 1:00_a_m.  When in doubt specify AM|PM or use
  176.     military style ("13:00").
  177.  
  178. B.  OS/2 Task List shows pending alarm(s)
  179.  
  180. C.  When alarm sounds, focus SWitches to ALARM window
  181.  
  182. Customization:
  183. -------------
  184. Set user variables in frame ALARM to:
  185.  - adjust alarm (beep) characteristics, or
  186.  - substitute sounds for beeps (multimedia support required)
  187.  
  188. «FC»
  189. For Use by RENUMBER.PM:
  190. Renumber ALARM.PM in PACK mode
  191. Default Save/Get Range=[00|50] 01-10
  192. OPTIONs(2): Freeze 50; Left$: xy.
  193. «FL»«LM»»
  194. {{m}}
  195.  
  196. {{5,Alarm}} RexXPL Alarm [CLD 7/21/96]
  197. «SX00,«IS 50»»«GLa»
  198.              USER VARIABLES (optional) - Toggle eXPanded view
  199.              ================================================
  200.                  ⁿÖ
  201. «LBa»«SV01,  /* Adjust the following values to taste: */
  202.  
  203. freq=500     /* frequency (pitch) of alarm beep */
  204. durn=250     /* duration (in millisecs.) of alarm beep */
  205. tmsb=10      /* number of times to beep (0 to 'forever') */
  206. soundfile='' /* play sound file instead of beeps (MMOS2 support required)
  207.                   use fully-qualified filename, e.g.:
  208.                   soundfile='C:\MMOS2\SOUNDS\EEERRUPP.WAV' */
  209. tmss=3       /* number of times to play soundfile */
  210.  
  211. »;*;
  212. ;*;
  213.  éº«IF«VA|00»<4!":"ε«IS00»<1!":"ε«IS00»>2»«LBb»«PRALARM [h]h:mm [AM|PM],[reminder]<Helpkey>»«EX»«EI» é½(es 1)«SX02,«IS00»»«SV03,:»«XS02,03,04,,05»«SX02,«IS04»»«SX03,«IS05»»«IF«VA02»<1»«GLb»«EI»«SV04,»«SV05,»«SU06,«IF«VA|04»>0»«LBc»«IF«IS04»≡«IS07»»«SV08,»«XS04,07,09,,08»«SX04,«IS09»+«IS08»»«GLc»«EI»«EI»»«SV10,Normal»;*;
  214. «IF«IS03»≡","»«SV07,,»«XS03,07,04,,05»«SX03,«IS04»»«EI»;*;
  215. «SV04,»«IF«VA|03»>2»«SV07,XX»«XS03,07,,08,04»«IF«VA08»<1»«GLb»«EI»«SX03,«IS08»»«EI»;*;
  216. «IF«VA$MT»>0&«VA|04»<1»«GLe»«EI»;*;
  217. «SV07, »«GT06»«SV07,.»«GT06»«SX04,@upr(«IS04»)»;*;
  218. «IF«IS04»=="A"!«IS04»=="P"»«SX04,«IS04»+"M"»«EI»;*;
  219. «IF«VA$MT»<1!«VA|04»>0»«IF«VA|04»<1»«IF«PV02»>12»«SX02,«PV02»-12»«EI»«IF«PV02»==0»«SX02,12»«EI»«SX04,«VA$TM»»«SX06,«VA@04 1»»«SX07,«VA@06:2»»«SX06,«VA@06:1»»«SX04,«VA@04 2»»«IF«PV06»<12&(«PV02»>11!«PV02»<«PV06»!(«PV02»==«PV06»&«PV03»<«PV07»))»;*;
  220. «IF«IS04»≡"A"»«SV04,PM»«GLd»«EI»«SV04,AM»«LBd»«EI»«EI»;*;
  221. «IF«IS04»<>"AM"&«IS04»<>"PM"»«GLb»«EI»«SV10,Civil»«GLe»«EI»;*;
  222. «IF«VA|04»>0»«IF«IS04»=="PM"&«PV02»<13&«PV02»>0»«SX02,«PV02»+12»«IF«PV02»==24»«SX02,0»«EI»«EI»«IF@siz(«IS02»)<2»«SX02,"0"+«IS02»»«EI»«SV04,»;*;
  223. «LBe»«SX06,24»«IF«VA|04»>0»«IF"0"ε«IS02»==0&«VA|02»>1»«SX02,«PV02»»«EI»«SX04," "+«IS04»»«SX06,12»«EI»«IF«PV02»<0!«PV02»>«PV06»!«PV03»<0!«PV03»>59»«GLb»«EI»«EI»;*;
  224. «SV50,signal on Halt
  225.  
  226. call SysIni 'BOTH','FolderWorkareaRunningObjects','ALL:','Objects'
  227. BDr=translate(left(Objects.1,2)) /* Get BootDrive */
  228. call SysCurState 'off'
  229.  
  230. if xy.10='Normal' then do
  231.   if length(xy.02)=1 then xy.02='0'||xy.02
  232.   end
  233. RingTime=xy.02||':'||xy.03||xy.04
  234.  
  235. DO FOREVER
  236. call SysCurPos 0,0
  237. Now=translate(time(xy.10))
  238. if xy.10='Civil' then do
  239.   if pos('0:',Now)=1 then,
  240.    Now='12:'||right(Now,length(Now)-2) /* work around bug in TIME('C') */
  241.   select
  242.     when pos(':',Now)<pos(':',RingTime) then Now=" "||Now
  243.     when pos(':',Now)>pos(':',RingTime) then RingTime=" "||RingTime
  244.     otherwise Nop
  245.     end /* select */
  246.   Now=left(Now,length(Now)-2)||' '||right(Now,2)
  247.   end /* do */
  248. if xy.10='Normal' then Now=left(now,5)
  249.  
  250. say 'Current time is : '||Now
  251. say 'Alarm is set for: '||RingTime
  252. say
  253. if xy.05\='' then do
  254.   say 'Reminder: '||xy.05;say
  255.   end
  256. say '______________________'
  257. say ' Ctrl-C CANCELS Alarm '
  258.  
  259. if pos(RingTime,now)\=1 then do
  260.   call SysSleep 10
  261.   iterate
  262.   end
  263. else 
  264. 'call '||BDr||'\os2\mdos\sw.cmd '||RingTime
  265. if soundfile='' then do tmsb
  266.   call beep freq,durn
  267.   tmsb=0
  268.   end
  269. else do tmss
  270.   'call '||BDr||'\os2\mmos2\play.cmd file="'||soundfile||'"'
  271.   call SysSleep 1
  272.   end
  273. say
  274. END
  275.  
  276. Halt:
  277. say 'Alarm canceled'
  278. call SysSleep 1
  279. »«SX06,«IS05»»«IF«VA|06»>13»«SV07,XXXXXXXXXX»«XS06,07,,08,09»«SX06,«IS08»+"..."»«EI»«SX50,"""Alarm at "+«IS02»+":"+«IS03»+«IS04»+" ("+«IS06»+")"+""""+" /P:XY4 /b /win /protect
  280. "+«IS01»+«IS50»» éú2.r2x é ü«SX01,"Alarm set for "+«IS02»+":"+«IS03»+«IS04»»«IF«VA|05»>0»«SX01,«IS01»+" ("+«IS05»+")"»«EI»«PR@01»«EX»
  281. --------------------
  282.  
  283. «GLa»«LM»«RM»
  284. {{5Help4FIND2}} Help for FIND2.PM
  285. «SV01,«FL»«LM2DI»«RM78DI»
  286.  
  287. «MDBO»FIND2.PM -- C.L.Distefano 1/11/98
  288. For XyWrite 4 & XyWrite for Windows under OS/2
  289.   >> «MDIT»Requires XyWrite-OS/2 Shell + RexXPL «MDBO»<<«MDNM»
  290.  
  291. Find files across drives, with support for HPFS long filenames
  292.  
  293.  
  294. Usage:
  295. ======
  296. FIND2 [filespec]<Helpkey>
  297.  
  298.   Search starts with drive C: and ends with last valid drive.
  299.  
  300.   To omit one or more drives (e.g., a CD-ROM drive or RAMdrive),
  301.   add the drive letters to  AESV01, AF.
  302.  
  303.   If the system is configured for non-consecutive drives, the
  304.   intervening *unused* drive letters must be listed in  AESV01, AF.
  305.   E.g., if the system contains drives C:, D:, E: and K:, S/G 01
  306.   should be coded thus:  AESV01,FGHIJ AF
  307.  
  308. «FC»
  309. For use by RENUMBER.PM:
  310. Default Save/Get range = [00|50] 01-04
  311. Renumber FIND2.PM in PACK mode; FREEZE 50  
  312. «LM»«FL»»
  313. {{m}}
  314.  
  315. {{5find2}} Find files across drives (OS/2 only) [CLD 1/20/98]
  316. «SX00,«IS 50»»«LBa»;*;
  317. ;*;
  318. «SV01,»;*; <== Drive letter(s) to omit from search (e.g., "«SV01,FG»")
  319. ;*;
  320.  éº é½(es 1) üA«SX02,«IS00»»«SX03,«VADR»+"FIND!2.TMP"» é½ernv «PV03» é é½(wait)«SV50,» é½sa %50,«PV03» é é½(wait);*;
  321. ;*;
  322. «SX50,""""+"FIND2.PM ("+«IS02»+")"+""""+" /p:Xy /b /c /protect
  323.  
  324. DriveList=SysDriveMap()
  325. rc=lineout(xy.03,'Filespec='xy.02||CrLf)
  326. do until pos(':',DriveList)=0
  327.  parse var DriveList Drv ' ' DriveList
  328.  if pos(Drv,xy.01)>0 then iterate
  329.  rc=SysFileTree(Drv'\'xy.02,'fn','s')
  330.  rc=lineout(xy.03,'Drive 'Drv||CrLf||,
  331.   '========'CrLf'Date      Time       Size     Attr   Filename'||,
  332.   Crlf'----      ----       -------  ----   --------')
  333.  do i=1 to fn.0
  334.  rc=lineout(xy.03,fn.i)
  335.  end
  336. rc=lineout(xy.03,CrLf)
  337. end
  338.  
  339. j=100; do i=500 to 740 by 120 
  340.  call beep j,10; call beep i,50; j=j+10
  341.  end; call beep 50,50; call beep i+120,300
  342.  
  343. "» éú(2.r2x);*;
  344. ;*;
  345.  üca/100 «PV03» ü? ü;«PR After beep, eXeCute command to view results» é½(p 4) Ç}«SX01,«VA$MG»»«PR@01»«EX»
  346.  
  347.  2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E 2E
  348.  
  349. «GLa»
  350. {{5Help4Runcode}}  Help for RUNCODE.PM
  351. «SV01,
  352. «FL»«LM2DI»«RM78DI»
  353. RUNCODE.PM  C.L.Distefano 7/15/93
  354. Execute XPL code from a DeFined block, open file, or directory listing
  355.  
  356. Operation:
  357.  
  358. IF:                                   RUNCODE: 
  359. ═══                                   ════════
  360. FILE is open and code is DeFined      RUNs DeFined code
  361. FILE is open and nothing is DeFined   RUNs FILE
  362. DIRectory is displayed                RUNs FILE under cursor
  363.  
  364. Usages (3):
  365. 1) From a U2 Help file, with a dedicated key in the KeyBoarD file:
  366. KeyBoarD file assignment:
  367. nn=NO,JM,(,2,.,P,r,s,K,b,d,A,r,g,),R,u,n,c,o,d,e,NO
  368.  
  369. The U2 file MUST contain R.J.Holmgren's PrsKbdArg frame.
  370.  
  371. 2) From an ordinary or "ampersand" save/get, with a dedicated key:
  372. First, LDPM RUNCODE.PM [or LDPMDEF the RUNCODE code -- see frame LDPMDEF] to a key, e.g.:  LDPM RUNCODE.PM,r [or: LDPM RUNCODE.PM,&r]
  373. Then, assign the corresponding save/get mnemonic to a key via the  KeyBoarD file:  nn=@R [or: nn=&R]
  374.  
  375. To pass an argument to the code with Usage 1 or 2, put argument on command line, preceded by a space.
  376.  
  377. 3) From a U2 Help file, via the command line:
  378. RUNCODE [argument]<Helpkey>
  379. [Argument] is passed to the subject code as save/get 00.  The subject code is executed via save/get 100; if you already use save/get 100, RENUMBER RUNCODE to another *permanent* save/get (101-999).
  380. «FC»
  381. For Use by RENUMBER.PM:
  382. Renumber RUNCODE.PM in PACK mode
  383. Default Save/Get Range=[00|50] 01-02; 100
  384. OPTIONs (2): RANGE 01-99 (or SWAP 100-[n]nnn); FREEZE 50
  385. «FL»«LM»»
  386. {{m}}
  387.  
  388. {{5,Runcode}}  (CLD 6/6/91 rev. 7/15/93, 6/30/96)
  389. «SX00,«IS 50»»«LBa»«IF«VA$WS»<1»«PRFile or DIRectory required»«EX»«EI»«SV01,»«IF«VA|00»>0»«SX01,«IS00»»«GLb»«EI»«SU02,«SX01,«IS00»»»«GT02»«LBb»«IF«VA$WS»>1»«SX02,«VA$DR»»«LBc» é½run «PV02» «PV01» é«EX»«EI» éG«IF«VA$DE»<1»«SX02,«VA$FP»»«GLc»«EI»«SV100»«SX02,"«SU100,«SV00,"+«IS01»+"»"+«IS100»+"»"»«PV02»«GT100»«SV100,»«EX»
  390.  
  391.  ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá ⁿá
  392.