6 mime KDataTypePriorityHigh%, "text/rexx"
24 global rexxstartini$(50)
25 global rexxstartdir$(50)
29 file$="c:\documents\*.rexx"
31 rexxstartdir$="C:\System\Apps\Regina"
32 rexxstartini$=rexxstartdir$ +"\Regina.ini"
33 rexxexe$="?:\System\Apps\Regina\rexx.exe"
35 loadm "z:\system\opl\Toolbar"
52 if (ev&( KEvAType%) = KKeyMenu32%)
54 elseif (ev&(1) = KKeySidebarMenu32%)
56 elseif ((ev&(1) and &400) = 0)
57 key% = ev&(1) + (%A - 1)
61 elseif (ev&(KEvAType%) = KEvPtr&)
62 TBarOffer%:(ev&(KEvAPtrOplWindowId%),ev&(KEvAPtrType%),ev&(KEvAPtrPositionX%),ev&(KEvAPtrPositionY%))
63 elseif (ev&(KEvAType%) = KEvCommand&)
69 file$=right$(cmdl$,len(cmdl$)-1)
84 file$=OPENFILEDIALOG$:(file$,0,0,0)
86 file$="c:\documents\*.rexx"
89 dcheckbox trace_chk%,"Trace"
90 dedit file$, "Program", 25
91 dedit args$, "Arguments", 25
92 dbuttons "Ok", KDButtonEnter%, "Cancel", -KDButtonEsc%
95 file$="c:\documents\*.rexx"
104 gfont KFontCourierNormal11&
105 tbarinit:("Regina", gwidth, gheight)
107 Icon%=gCreateBit(0,0) rem create it once and for all
109 tbarbutt:("r", 1, "Run", 0, icon%, icon%, KTbFlgCmdOnPtrDown%)
110 tbarbutt:("c", 2, "Command" +chr$(10) + "line", 0, icon%, icon%, KTbFlgCmdOnPtrDown%)
111 tbarbutt:("e", 3, "Exit", 0, icon%, icon%, KTbFlgCmdOnPtrDown%)
112 rem tbarbutt:("a", 4, "About", 0, icon%, icon%, KTbFlgCmdOnPtrDown%)
123 mcard "File", "Run", %r, "Command Line", %c, "Exit", %e
124 mcard "Help", "About", %a, "Contents", %h
128 @%("cmd"+chr$(val%)):
145 dinit "RexxStart v3.0"
146 dtext "by Mark Hessling",""
147 dtext " http://www.lightlink.com/hessling",""
148 dtext "based on PerlStart by Olaf Flebbe",""
149 dtext " http://www.science-computing.de/o.flebbe",""
150 dbuttons "Continue", KDButtonEnter%
154 proc checkrexx%:( location$)
155 rexxexe$ = location$ + right$(rexxexe$, len(rexxexe$)-1)
156 return exist( rexxexe$)
160 if (checkrexx%:("C"))
162 elseif (checkrexx%:("D"))
165 alert("Rexx executable not found on C: or D:")
179 local tid&, statusword&
183 if file$ = "c:\documents\*.rexx"
186 if file$ = "c:\documents\*.rexx"
191 if ( trace_chk% = 0 )
197 runargs$ = " " + args$
201 busy "[" + trace_flag$ + file$ + args$ + "]"
202 tid& = RunExeWithCmd&:( rexxexe$, trace_flag$ + file$ + args$)
205 LOGONTOTHREAD:(tid&,statusWord&)
206 IOWAITSTAT32 statusWord&
211 alert(rexxexe$ + " unable to be run")
215 RUNAPP&:("Data","c:\system\apps\regina\regina.hlp","",0)