Applescript: get path

Wayne Brissette waynefb at earthlink.net
Fri Mar 21 13:34:09 PST 2003


Angus McIntyre angus at pobox.com on Friday, March 21, 2003 stated:


>At 13:20 -0600 21.03.2003, Wayne Brissette wrote:
>>I think there's a problem with the Path command in OO.
>
>There almost certainly is. As you say, 'path of front document' (or 
>variants thereof) generates an error.
>
>What's interesting is that if you do:
>
>	tell application "OmniOutliner"
>	   properties of (front document as item)
>	end
>
>the result returned from AppleScript is an associative array that 
>includes an entry for 'path' which is displayed - by Script Editor - 
>with the correct value. However, it's not possible to get the values 
>for any of the individual entries in the array without triggering an 
>error.
>
>Angus

Hey, I forgot about that. Here is a workaround:

tell application "OmniOutliner"
	copy properties of (front document) to tmpList
	set tmpList to tmpList as list
	set MyPath to item 2 of tmpList
end tell

-- 
"Never interrupt your enemy when he is making a mistake." 
- Napoleon Bonaparte

Live DAT & Music Page: http://homepage.mac.com/wayneb/
PowerMail AppleScript Archives: http://homepage.mac.com/wayneb/powermail.html

Music Currently playing:




More information about the OmniOutliner-Users mailing list