The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniFocus Extras (http://forums.omnigroup.com/forumdisplay.php?f=44)
-   -   Why does "tell OF to activate" error? (http://forums.omnigroup.com/showthread.php?t=8739)

albyrne 2008-07-15 07:48 PM

Why does "tell OF to activate" error?
 
OK, have just joined the clan, and licensed the copy of OF 1.0.3 that I've trialled for the past week.

As with most of the apps in which I spend significant amounts of time, I've made a very short applescript to launch the app/or bring it to the foreground. I then fire this script with a keyboard shortcut from FastScripts.

With every other app that I've tried, the one-line script as follows, has worked just fine. But, when I fire the following:

tell application "OmniFocus" to activate

I receive this error...

"Error number: -1701. Message: OmniFocus got an error: Some parameter is missing for activate."

This should be the simplest possible Applescript. Any ideas?

Al

curt.clifton 2008-07-16 09:34 PM

That's a recurring bug that disappears whenever I try to reproduce it. (Sometimes developers call these Heisen-bugs. Lame quantum physics joke.)

You might try making a new script with the code:
[CODE]
tell application "OmniFocus"
activate
end tell[/CODE]

There's a thread on the forum about the bug with some possible workarounds. IIRC, merely creating a new script in Script Editor and copying the text of an old, broken script into the new script was sufficient to make the problem disappear. Truly bizarre.

albyrne 2008-07-17 02:14 AM

[QUOTE=curt.clifton;41290]That's a recurring bug that disappears whenever I try to reproduce it. (Sometimes developers call these Heisen-bugs. Lame quantum physics joke.)

You might try making a new script with the code:
[CODE]
tell application "OmniFocus"
activate
end tell[/CODE]

There's a thread on the forum about the bug with some possible workarounds. IIRC, merely creating a new script in Script Editor and copying the text of an old, broken script into the new script was sufficient to make the problem disappear. Truly bizarre.[/QUOTE]

Thanks Curt - yes, truly bizarre! Sadly, the quick and dirty fix suggested above doesn't, in this case, seem to help. Still seeing the same error message presented. Do you know, by any chance if this is still evident in v1.1 (I'll be upgrading once v1.1 is formally released, or I succumb to iPhone lust - whichever occurs first!)

I'll go looking for that previous thread...

Al

curt.clifton 2008-07-17 08:51 PM

I haven't seen the bug in 8 or 9 months, and certainly not in 1.1. But given the strangeness of the bug, I wouldn't say that its been squashed. Perhaps just hiding under a rock somewhere.

You might try zipping up your script and emailing it to Omni (Help --> Send Feedback) to see if the support ninjas can duplicate the bug.

urtlnomis 2008-08-01 12:17 AM

anything new?
 
hey albyrne

did you find out something with the support ninjas?

or did anybody else find out something helpful about this probem?

simon

albyrne 2008-08-01 05:47 AM

Hi folks,

I have to say that my real life has prevented getting to this. Have been busy finishing reading Mr Allen's 'bible', in preparation for next week's planned delivery of a bouncing white baby iPhone, weighing in at 16gb....

Al

albyrne 2008-09-02 02:50 AM

Glory, glory, glory! As of tonight, the mystery is solved!

Browsing the forums here, I found the thread about "OmniFocus URL Support" located [URL="http://forums.omnigroup.com/showthread.php?t=4970"]here [/URL], and tried this script myself...

[CODE]
property target_URL : "omnifocus:"
open location target_URL[/CODE]

And, it does EXACTLY what I was looking for: using FastScripts - I now have a keyboard shortcut that launches OmniFocus, if it's not already running, or, if running, brings it to the foreground.

Now, back to our usually scheduled programming...

Al

joshfree 2008-09-02 02:42 PM

I've been having this same trouble using an Applescript in Automator. I've tried all the suggestions here and on the old threads.

Latest is this:

[QUOTE]on run {input, parameters}

tell application "OmniFocus"
activate
end tell

return input
end run
[/QUOTE]

Still getting:

[B]Syntax Error[/B]
OmniFocus got an error: Some parameter is missing for activate.

Any further suggestions? I have not tried the URL Support thing on this thread. Will do that now, but shouldn't plain old "activate" work?

albyrne 2008-09-02 11:57 PM

[QUOTE=joshfree;46242]I've been having this same trouble using an Applescript in Automator. I've tried all the suggestions here and on the old threads.

Latest is this:



Still getting:

[B]Syntax Error[/B]
OmniFocus got an error: Some parameter is missing for activate.

Any further suggestions? I have not tried the URL Support thing on this thread. Will do that now, but shouldn't plain old "activate" work?[/QUOTE]

Ahhh - yes - that's exactly my point.

Plain old 'activate' should work, without error. It does not.

I have found a solution that fixes my problem. Try it - perhaps the "...URL Support thing..." will fix your problem also.

Good luck.

A


All times are GMT -8. The time now is 10:30 AM.

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