https://github.com/binaryage/fscript-osax
Simple way how to inject F-Script into any app from the command-line (replacement for F-Script Anywhere and F-Script SIMBL)
https://github.com/binaryage/fscript-osax
Last synced: 9 months ago
JSON representation
Simple way how to inject F-Script into any app from the command-line (replacement for F-Script Anywhere and F-Script SIMBL)
- Host: GitHub
- URL: https://github.com/binaryage/fscript-osax
- Owner: binaryage
- License: other
- Created: 2012-09-24T08:35:14.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2013-01-01T17:28:22.000Z (about 13 years ago)
- Last Synced: 2025-03-26T10:52:14.577Z (10 months ago)
- Language: Objective-C
- Homepage:
- Size: 113 KB
- Stars: 12
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.txt
Awesome Lists containing this project
README
# FScript.osax
This is a scripting addition which adds a new Apple Script command to inject [F-Script](http://www.fscript.org) to any application.
It is similar to [F-Script Anywhere](http://www.fscript.org/download/download.htm) or [F-Script SIMBL](https://bitbucket.org/dainkaplan/fscript-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](http://www.fscript.org/download/download.htm).
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](https://raw.github.com/binaryage/fscript-osax/master/license.txt)