tags:

views:

44

answers:

1

I am trying to open a file in a not so scriptable area of an application.

I got halfway there by using UI scripting to select the proper menu item, but this opens a standard file dialog.

How can I set the destination of the file dialog with Applescript?

A: 

ahh ok this should get you going on the right path

   tell application "Safari"
    activate
    -- do menu select gui script first
    set posixpath to "/path/to/a/folder/that/exists"
    tell window 1
        tell application "System Events"
            keystroke "g" using {shift down, command down}
            keystroke posixpath
            delay 1
            keystroke return
        end tell
    end tell
   end tell
mcgrailm
I agree wiht songdogtech but this is how you set the destination folder
mcgrailm