Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Jolly Roger Newsgroups: comp.sys.mac.system Subject: Re: AppleScript Question(s) Date: 30 Nov 2020 17:37:52 GMT Organization: People for the Ethical Treatment of Pirates Lines: 51 Message-ID: References: X-Trace: individual.net hHdWA4pZ+2y6TWlSMef7twpRygQsrQgeHYndMpxtHXElNEfhFb Cancel-Lock: sha1:UnrGRDNgGB9ynI9yxlN8YVO1w5Y= X-No-Archive: Yes MMail-Copies-To: nobody X-Face: _.g>n!a$f3/H3jA]>9pN55*5<`}Tud57>1Y%b|b-Y~()~\t,LZ3e up1/bO{=-) User-Agent: slrn/1.0.3 (Darwin) Xref: csiph.com comp.sys.mac.system:135541 On 2020-11-30, gtr wrote: > I've been hunting via google and other and can't answer my issue. I > want to change the font in a program using ab Apple dropdown > (pulldown?) that a few programs use. It looks like this: > > https://snipboard.io/F4j6Xs.jpg > > I can't seem to figure out how to trigger a style from the displayed > menu. So I abandoned it when I saw a different approach that worked > well enough for DevonTHINK (see below). User interface scripting (clicking things, etc) is *never* preferable to using AppleScript commands supported by the application. It should be done as a last resort, if at all. > But this won't work in TextEdit, despite fiddling with the parms. If > there's a way to avoid it all and use the styles, menu, great. Failing > that--any aid on making the properties configuration approach (below) > work with TextEdit would do. TextEdit has built-in AppleScript commands that let you modify text: -- begin script tell application "TextEdit" activate make new document with properties {text:"XDXDXD"} set theDesktopPath to the path to the desktop folder as text tell front document set font to "Comic Sans MS" set size to 40 set its color to {65535, 0, 0} end tell end tell -- end script You can view the AppleScript dictionary of any app by opening Script Editor and choosing File > Open Dictionary, then choosing the app in question. > And if you know where *either* answers might be in AppleScripts for > Dummies, that would be swell too. Don't have that book, sorry. -- E-mail sent to this address may be devoured by my ravenous SPAM filter. I often ignore posts from Google. Use a real news client instead. JR