home *** CD-ROM | disk | FTP | other *** search
- /* Insert_ASCII.ms V1.0
- **
- ** Open a string requester where you can enter an ASCII number
- ** to be inserted
- ** Needs rexxreqtools.library!
- **
- */
-
- options results
-
- if ~show('l','rexxreqtools.library') then
- if ~addlib('rexxreqtools.library',0,-30,0) then
- do
- say "Cannot open rexxreqtools.library!"
- exit 20
- end
-
- if left(address(),10)~="MATHSCRIPT" then
- do
- call rtezrequest("Run this script from MathScript!")
- exit 10
- end
-
-
- ascii=rtgetlong(,"ASCII number:","Insert ASCII","_Insert|_Cancel",,)
-
- if ascii="" then exit
-
- getstyle
-
- style=result
-
- select
- when style="Variable" then stylecode="\va"
- when style="Function" then stylecode="\fu"
- when style="Greek" then stylecode="\gr"
- when style="Text" then stylecode="\te"
- when style="Custom1" then stylecode="\c1"
- when style="Custom2" then stylecode="\c2"
- otherwise stylecode=""
- end
-
- InsertCode stylecode||D2C(ascii)
-
-