The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   FAQ: Installing & running an OF applescript (http://forums.omnigroup.com/showthread.php?t=7453)

RobTrew 2008-03-09 01:45 PM

FAQ: Installing & running an OF applescript
 
(This comes up quite often, so it may be worth having a post to refer to whenever it arises)

OF applescripts can be run from the OF toolbar, from the OF Script menu, or from tools like [URL="http://www.obdev.at/products/launchbar/index.html"]LaunchBar[/URL], [URL="http://www.keyboardmaestro.com/main/"]Keyboard Maestro[/URL], or [URL="http://www.red-sweater.com/fastscripts/"]FastScripts[/URL].

[I]Since [B]OmniFocus 1.8[/B] it has been possible to use AppleScript applications as toolbar items (in addition to Automator workflows, and scripts stored in text, compiled, and script bundle format).[/I]

[I]To install an applescript to be run from the OF Scripts menu:[/I][LIST=1][*][B]Check that the Script menu icon appears on the OS X menu bar[/B]
If it doesn't:[LIST][*]OS X 10.6:
Run the Applescript Editor from the Utilities folder within the Application folder, and ensure that the following settings are checked:
Applescript Editor > Preferences > General > Show script menu in menu bar
Applescript Editor > Preferences > General > Show computer scripts[*]OS X 10.5:
Run the Applescript Utility from the Applescript folder within the Applications folder, and ensure that "Show Script menu in menu bar" is checked[/LIST][*][B]Place the script in the appropriate folder[/B][LIST][*]Start OmniFocus[*]Click the Script menu icon in the OS X menu bar[*]Choose Open Scripts Folder/Open OmniFocus Scripts Folder[*]Copy your script into the OmniFocus scripts folder, which should now have opened.[/LIST][*]When OmniFocus is running, your script can now be run from the [B]OmniFocus scripts[/B] section of the Script menu.[/LIST]

[I]To install an applescript to be run from the OF toolbar:[/I]
[LIST=1][*][B]Place the applescript in the OF scripts folder[/B][LIST][*](see previous section)[/LIST][*][B]Optionally choose an icon for the script[/B][LIST][*]Select the .scpt file in the Finder[*]Choose [I]File > Get Info[/I] in the Finder menu (or Cmd I)[*]Select the icon in the dialog
[IMG]http://farm5.static.flickr.com/4130/4996097640_a88ba8313e_o.jpg[/IMG][*]Copy a simple image into the clipboard from any graphic source[*]Past the image onto the icon in the file Info dialogue.
[IMG]http://farm5.static.flickr.com/4126/4996160624_97015e2159_o.jpg[/IMG][/LIST][*][B]Get the applescript onto the OF toolbar[/B]

In OmniFocus, choose [B]View>Customize_Toolbar[/B].

The dialog which appears will now enable you to drag your applescript onto the OF toolbar.

Close the dialog, and experiment with running your applescript by clicking its icon in the toolbar.
[/LIST]

librarymonkey27 2008-03-11 06:40 PM

finding folder
 
A way to find the folder for me is to go up to the script icon in the top menubar

pull it down to a folder (do not highlight a file)


For example: I pull down to the 'applications' folder, slide over to the 'OmniFocus' folder

at that point I let go of the mouse and the folder opens

if there wasn't an OmniFocus folder I would let go on applications and then (as you indicated) create one.

this is a great idea ---- an applescript FAQ

RobTrew 2008-03-12 03:03 AM

[QUOTE=librarymonkey27;34343]A way to find the folder for me is to go up to the script icon in the top menubar[/QUOTE]

Yes, me too - I didn't choose that route for the FAQ because the [B]Show script menu in menu bar[/B] option will sometimes be un-checked in the Applescript Utility.

librarymonkey27 2008-03-12 12:39 PM

In that case, People should go and click that button, if only to have easy access to scripts

RobTrew 2008-03-12 01:29 PM

Yes - FAQ amended accordingly.

JohnJ80 2008-04-14 07:48 AM

Can't make this work.
 
I'm doing something wrong here. I've got my script in the finder scripts menu (no problem). I open the Customize toolbar window as described, but I can't drag any script onto it. I can't drag anything onto . All I can do is access the icons that are there.

What I'm trying to do is put the most excellent "Reveal" Applescript onto the toolbar.

J.

Brian 2008-04-14 11:19 AM

You shouldn't need to drag anything to the customize sheet. If the applescript has been installed into the correct folder, you should see the icon in the sheet.

What you want to do is drag the icon for the script [B]from[/B] the sheet and [B]to[/B] your OmniFocus toolbar.

JohnJ80 2008-04-14 11:44 AM

[QUOTE=Brian;35715]You shouldn't need to drag anything to the customize sheet. If the applescript has been installed into the correct folder, you should see the icon in the sheet.

What you want to do is drag the icon for the script [B]from[/B] the sheet and [B]to[/B] your OmniFocus toolbar.[/QUOTE]

Is there an explicit name for the folder or something? I've named the folders simply "OmniFocus" and that is how it appears in the finder script menu.

The folder's path is Users->john(me)->Library->Scripts->Omnifocus

Is that correct?

J>

RobTrew 2008-04-14 01:18 PM

[QUOTE=JohnJ80;35719]The folder's path is Users->john(me)->Library->Scripts->Omnifocus[/QUOTE]

Users->john(me)->Library->Scripts->[B]Applications[/B]->Omnifocus

i.e.

~/Library/Scripts/Applications/Omnifocus/

(which can be pasted into the Finder's [B]Go>Go_to_Folder[/B] dialog)

JohnJ80 2008-04-14 04:42 PM

Work now. Folder is important.

J.


All times are GMT -8. The time now is 02:24 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.