Re: Input key
Re: Input key
- Subject: Re: Input key
- From: Andy Wylie <email@hidden>
- Date: Thu, 21 Mar 2002 23:30:19 +1200
that last script had a bad filter for selecting the description so...
--low ASCII
set numCodeName to {{" 0 NUL Null"}, {" 1 SOH Start of Heading"}, {" 2 STX
Start of Text"}, {" 3 ETX End of Text"}, {" 4 EOT End of Transmission"}, {"
5 ENQ Enquiry"}, {" 6 ACK Acknowledge"}, {" 7 BEL Bell"}, {" 8 BS
Backspace"}, {" 9 HT Horizontal Tab"}, {"10 LF Line Feed"}, {"11 VT Vertical
Tab"}, {"12 FF Form Feed"}, {"13 CR Carriage Return"}, {"14 SO Shift Out"},
{"15 SI Shift In"}, {"16 DLE Data Link Escape [F1 to F15]"}, {"17 DC1
Device Control 1 [propeller]"}, {"18 DC2 Device Control 2 [radical]"},
{"19 DC3 Device Control 3 [lozenge]"}, {"20 DC4 Device Control 4 [Apple
logo]"}, {"21 NAK Negative Acknowledge"}, {"22 SYN Synchronous Idle"}, {"23
ETB End of Transmission Block"}, {"24 CAN Cancel"}, {"25 EM End of Medium"},
{"26 SUB Substitute"}, {"27 ESC Escape [clear]"}, {"28 FS File Separator
[left arrow]"}, {"29 GS Group Separator [right arrow]"}, {"30 RS Record
Separator [up arrow]"}, {"31 US Unit Separator [down arrow]"}, {"32 SP
Space"}}
set {lowASCII, cnt} to {{}, 0}
repeat with i in numCodeName
set cnt to cnt + 1
set end of lowASCII to (numCodeName's item cnt as string)
set end of lowASCII to "\"" & (ASCII character (cnt - 1)) & "\""
end repeat
try
repeat
set theChar to ((choose from list lowASCII with prompt "low ASCII")
as text)'s item 2
if result = false then error number -128
try
theChar as number
on error
exit repeat
end try
end repeat
on error errMsg number errnum
end try
theChar
_____________________________ Andy
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.