I haven’t noticed the naming issue you mention. I have my old OmniFocus build renamed to “OmniFocus 1.x” (in the same folder as my OmniFocus 2 build, which is just named “OmniFocus”). If I do:
tell app "OmniFocus 1.x"
log "test"
end
I can see 1.x logs the string. If you continue to run into this problem, we’d love details on how to reproduce it. But, you can explicitly target OmniFocus 2 by using a different form for the application:
tell app id "com.omnigroup.OmniFocus2"
...
end
or:
tell app "Volume Name:Path:to:the:OmniFocus.app"
...
end
For user toolbar scripts, because OmniFocus 2 is sandboxed, you need to place the scripts in a new place. In Finder, use the Go → Go to Folder… menu and enter “~/Library/Application Scripts”. Inside that folder, create a new folder “com.omnigroup.OmniFocus2” and put your scripts there.
Sadly, the system wide scripts menu that AppleScript Editor can display (via its Preferences pane) doesn’t open this new location – I’ll log a bug with Apple on that.
installed OmniFocus 2 in the same folder (/Applications) with its default app name (OmniFocus)
Now considering a script:
tell application "OmniFocus" to activate
I was expecting to see OmniFocus 2 being activated, but actually it activate OF1.
I can definitely modify my scripts to use the tell app id approach while moving them to the new folder location.
Update: interestingly, if I run the above script directly from the AppleScript editor without saving, the “OmniFocus” string is automatically transformed into “OF1” (which explains the behavior at least). I’m not sure though I understand why ASE is doing that part, but I also don’t think this is related to OF2.
Can you try the following to help double-check what is going on:
• Launch Terminal
• Drag the folder with your OmniFocus 2 scripts (~/Library/Application Scripts/com.omnigroup.OmniFocus2) from Finder onto Terminal
• Enter these commands in Terminal:
Ah yeah – you want Application Scripts, not Application Support. Hopefully either Apple will add a way to get to this folder easily or we’ll have time to add it ourselves.