How do I Create an ANSI Font Menu?
This lesson will show you how to create an option menu that displays all of the ANSI fonts available on the computer.
Build The Font List

Open the script editor of the option menu and enter the script below. This option menu will respond to the "BuildANSIFontList" message and populate the option menu with ANSI fonts.
The script begins by getting all available fonts on the system (1) and sorting them (2). The script then checks the fontlanguage of each font and filters out any fonts that are not ANSI fonts (3) before assigning the font list to the option menu.
==========
Copy & Paste
==========
command BuildANSIFontList
put the fontnames into theListOfAllFonts
## sort list of fonts
sort theListOfAllFonts
## Strip out non-ANSI fonts
repeat for each line theFont in theListOfAllFonts
if the fontlanguage of theFont is "ANSI" then
put theFont & cr after theANSIFonts
end if
end repeat
## Get rid of trailing CR
delete the last char of theANSIFonts
set the text of me to theANSIFonts
end BuildANSIFontList
0 Comments
Add your comment