Directing a File Window from within System Events to an Alias

I am trying to create a script for Acrobat Pro (which is not very Applescript friendly). So to achieve the desired result I have had to use a fair bit of “System Events” to get the job done.

Using “System Events” I have selected an export option that brings up a “Save As” dialog box with that Finder Style folder navigation in the middle.

My question is… Can I pass an alias of a particular folder to this window?.. and if so… HOW?

I’m not sure if I understand your problem correctly. But if your intention is to navigate to a specific folder in an open/save dialog by script, you can use system events to evoke the “Go to Folder”-sheet. The keyboard command to do so is shift-cmd-G (at least on a Swedish system). And then put the path to your folder in a keystroke. A slightly faster way might be to put the path on the clipboard, and pasting it in the sheet by “keystroke v using {command down}”. Try experimenting with the delay settings, sometimes they are necessary, sometimes not.

/backelin


tell application "Adobe Acrobat Pro"
	activate
	tell application "System Events"
		
		
		tell application process "AdobeAcrobat"
			delay 0.5
			keystroke "G" using {command down, shift down}
			delay 0.2
			keystroke "/THE/PATH/TO/YOUR/FOLDER/"
			keystroke return
		end tell
		
		
	end tell
	
end tell


THANK YOU! that’s the sort of work around I was looking for!