Simple way how to inject F-Script into any app from the command-line (replacement for F-Script Anywhere and F-Script SIMBL)
Objective-C
Switch branches/tags
Nothing to show

readme.md

FScript.osax

This is a scripting addition which adds a new Apple Script command to inject F-Script to any application.

It is similar to F-Script Anywhere or F-Script SIMBL.

Installation

git clone git://github.com/binaryage/fscript-osax.git
cd fscript-osax
xcodebuild

If you see ** BUILD SUCCEEDED ** that means that you have FScript.osax installed in ~/Library/ScriptingAdditions/FScript.osax

How to inject F-Script into an app?

  1. Install F-Script.
  2. Let's say you want to inject F-Script into Safari...

Applescript

tell application "Safari" to «event BAFSinjc»

Command line

osascript -e "tell application \"Safari\" to «event BAFSinjc»"

You have to relaunch Safari after first installation of FScript.osax. In other case the AppleScript will fail.

Applications without main menu

You may use apple events to control F-Script menu item:

osascript -e "tell application \"Safari\" to «event BAFSscon» -- show console"
osascript -e "tell application \"Safari\" to «event BAFSoobr» -- open object browser"
osascript -e "tell application \"Safari\" to «event BAFSsppa» -- show preference panel"

FScript.framework location

By installing F-Script you should place framework in /Library/Frameworks/FScript.framework. This is default location.

If you need to inject different version or a framework from different location, please create ~/.fscript-framework-location text file with a new path to your FScript.framework.

License: MIT-Style