Force an application to run among its food selection alternatives from a covering script?

Exists any kind of means to compel the App to run among its food selection alternatives if there is no command line user interface readily available?

Probably an Automation type of point?

INSTANCE

I would love to run NewsFire is "File > Export Feeds" command to backup the feed checklist (OPML documents). I attempted running NewsFire via Terminal with" - - aid" yet no good luck.

Below is the backup script I presently make use of, in instance any person locate it valuable. It can be made use of to conserve and also recover the state of NewsFire accross numerous equipments (to recover you simply cd ~, and afterwards unzip backup.zip).

#! /bin/bash
#
# Backup NewsFire preferences, feeds and cache (everything)
#

D_DESTFILE=~/Backups/Config/NewsFire.zip

# Don't update archive, create new one
if [ -e "$D_DESTFILE" ]; then
  rm $D_DESTFILE
fi

cd ~
zip -r $D_DESTFILE Library/Application\ Support/NewsFire Library/Caches/org.xlife.NewsFire Library/Preferences/org.xlife.NewsFire.plist
0
2019-05-13 05:33:48
Source Share
Answers: 1

This is a start of an AppleScript to do the exporting:

set filename to "test file"

tell application "NetNewsWire" to activate
tell application "System Events"
    tell process "NetNewsWire"
        click menu item "Export Subscriptions…" of menu "File" of menu bar 1
        set value of first text field of first sheet of first window to filename
        click button "Save" of first sheet of first window
    end tell
end tell

tell application "NetNewsWire" to quit

It will certainly conserve the exported documents with the set filename at the area which was last made use of to do the exporting. It will certainly not overwrite a presently existing documents, so possibly you can wait in a short-lived area and also relocate with a different script.

Keep in mind : My duplicate of NetNewsWire had the food selection command "Export Subscriptions", not "Export Feeds", yet if your own is various, simply transform the name of the food selection thing on line 6.

Modify to add : You additionally require to have "Enable accessibility for assistive tools" in the Universal Access System Preference Panel readied to allowed for this to function.

0
2019-05-17 18:39:21
Source