Can someone running Leopard confirm whether Rob's updated version
still works for them?

On Sep 16, 3:47 pm, Rob McBroom <[email protected]> wrote:
> I stripped out the references to "sheets". It seems to work now under  
> Snow Leopard. I tried both Open and Save and tried it in iTunes (a  
> Carbon app).
>
> on open theFile
>         set filePath to POSIX path of theFile
>         tell application "System Events"
>                 set theApplication to application processes whose frontmost 
> is true
>                 set target to item 1 of theApplication
>                 set target to a reference to front window of target
>                 tell target to keystroke "g" using {command down, shift down} 
> --  
> Activate goto field
>                 delay 0.1
>                 try
>                         set value of text field 1 to filePath
>                         delay 0.1
>                         click button "Go"
>                 on error theError -- Carbon apps don't support setting the 
> field  
> directly, so type out the path.
>                         keystroke filePath
>                         delay 1
>                         keystroke return
>                 end try
>         end tell
> end open
>
> --
> Rob McBroom
> <http://www.skurfer.com/>

Reply via email to