The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniOutliner > OmniOutliner 3 for Mac
FAQ Members List Calendar Search Today's Posts Mark Forums Read

AppleScript references with no set or command Thread Tools Search this Thread Display Modes
I have noticed that various AppleScripts online and in OmniGroup's "Useful Scripts" collection contain what might be called "bare references" -- i.e., references that are not used to set the value of a variable or as part of a command. For example, in Useful Script's "Set Named Styles based on Priority Column" script, there is a loop:
if MyNamedStyle is not missing value then
    named styles of style of MyRow
    add MyNamedStyle to named styles of style of MyRow
end if
I am a very experienced AppleScripter, but I have never seen or done anything like this before. What is its purpose? Is this something unique to OmniGroup product AppleScript support (though I can't see how that would be)? Is it just illustrative? It seems very strange to have a line with just a reference followed by a line that includes the same reference.

I would search the Web or an AppleScript site generally for an answer to this, but I can't even think of what search terms to use, so I am asking it here.
It's just there for debugging purposes; if you step over the statement you'll see the value of the expression at that point. If you comment out both of those lines (there's one after the repeat statement as well), you'll see that the script functions identically.

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Crashing on applescript references to sidebar RobTrew OmniFocus 2 for Mac (Private Test) 1 2013-03-27 05:22 PM
AppleScript move command bholveck OmniOutliner 3 for Mac 3 2012-01-19 03:55 PM
Applescript Duplicate command: how to use it? Lutin OmniFocus Extras 6 2007-10-30 01:56 AM
New 'complete' AppleScript command Tim Wood OmniFocus 1 for Mac 17 2007-07-19 09:19 PM
AppleScript 'do script' command Bcpst OmniWeb Feature Requests 2 2006-05-07 12:08 AM

All times are GMT -8. The time now is 05:29 AM.

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