Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.mac.system > #135541

Re: AppleScript Question(s)

From Jolly Roger <jollyroger@pobox.com>
Newsgroups comp.sys.mac.system
Subject Re: AppleScript Question(s)
Date 2020-11-30 17:37 +0000
Organization People for the Ethical Treatment of Pirates
Message-ID <i2kovgFjoa8U1@mid.individual.net> (permalink)
References <rq1ikt$gm3$1@dont-email.me>

Show all headers | View raw


On 2020-11-30, gtr <xxx@yyy.zzz> 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

<https://apple.stackexchange.com/questions/345861/applescript-to-perform-actions-to-text-in-new-textedit-document>

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

Back to comp.sys.mac.system | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-11-29 17:41 -0800
  Re: AppleScript Question(s) Krzysztof Mitko <invalid@kmitko.at.list.dot.pl> - 2020-11-30 05:20 +0000
    Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-11-29 23:16 -0800
      Re: AppleScript Question(s) Krzysztof Mitko <invalid@kmitko.at.list.dot.pl> - 2020-11-30 07:43 +0000
        Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-11-30 18:04 -0800
          Re: AppleScript Question(s) Jolly Roger <jollyroger@pobox.com> - 2020-12-01 17:22 +0000
            Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-12-01 16:30 -0800
              Re: AppleScript Question(s) Lewis <g.kreme@kreme.dont-email.me> - 2020-12-02 02:00 +0000
                Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-12-01 18:57 -0800
                Re: AppleScript Question(s) Alan Baker <notonyourlife@no.no.no.no> - 2020-12-01 21:35 -0800
                Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-12-01 22:00 -0800
                Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-12-01 22:01 -0800
        Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-12-05 11:04 -0800
          Re: AppleScript Question(s) Krzysztof Mitko <invalid@kmitko.at.list.dot.pl> - 2020-12-05 19:31 +0000
            Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-12-05 22:23 -0800
            Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-12-06 09:55 -0800
              Re: AppleScript Question(s) Jolly Roger <jollyroger@pobox.com> - 2020-12-06 18:39 +0000
                Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-12-06 12:18 -0800
                Re: AppleScript Question(s) Jolly Roger <jollyroger@pobox.com> - 2020-12-07 17:16 +0000
                Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-12-07 10:14 -0800
          Re: AppleScript Question(s) Lewis <g.kreme@kreme.dont-email.me> - 2020-12-06 00:21 +0000
            Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-12-05 22:24 -0800
            Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-12-06 09:44 -0800
              Re: AppleScript Question(s) Lewis <g.kreme@kreme.dont-email.me> - 2020-12-06 21:13 +0000
                Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-12-06 19:09 -0800
                Re: AppleScript Question(s) Lewis <g.kreme@kreme.dont-email.me> - 2020-12-07 04:57 +0000
                Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-12-06 22:09 -0800
                Re: AppleScript Question(s) Lewis <g.kreme@kreme.dont-email.me> - 2020-12-07 06:54 +0000
                Re: AppleScript Question(s) Jolly Roger <jollyroger@pobox.com> - 2020-12-07 17:24 +0000
                Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-12-07 10:16 -0800
      Re: AppleScript Question(s) Lewis <g.kreme@kreme.dont-email.me> - 2020-11-30 13:28 +0000
        Re: AppleScript Question(s) Alan Baker <notonyourlife@no.no.no.no> - 2020-11-30 12:56 -0800
          Re: AppleScript Question(s) Lewis <g.kreme@kreme.dont-email.me> - 2020-11-30 22:42 +0000
            Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-11-30 18:05 -0800
        Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-11-30 17:59 -0800
  Re: AppleScript Question(s) Jolly Roger <jollyroger@pobox.com> - 2020-11-30 17:37 +0000
    Re: AppleScript Question(s) gtr <xxx@yyy.zzz> - 2020-11-30 18:05 -0800

csiph-web