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:
Code:
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 04:22 PM
AppleScript move command bholveck OmniOutliner 3 for Mac 3 2012-01-19 02:55 PM
Applescript Duplicate command: how to use it? Lutin OmniFocus Extras 6 2007-10-30 12:56 AM
New 'complete' AppleScript command Tim Wood OmniFocus 1 for Mac 17 2007-07-19 08:19 PM
AppleScript 'do script' command Bcpst OmniWeb Feature Requests 2 2006-05-06 11:08 PM


All times are GMT -8. The time now is 07:23 AM.


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