Get Save As Filename Dialogue Box using Applescript

J

jhufford

Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Does anyone here know the syntax for changing the starting location for the browser window in the dialogue box that pops up when you call the "Get Filename Save As" command in Applescript?

It would appear that it defaults to the folder that you last saved a spreadsheet in. I would like to pass a path into the command as a parameter using applescript but have not found an answer in any of the documentation.

Thanks!
 
B

Bob Greenblatt

Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel
Does anyone here know the syntax for changing the starting location for the
browser window in the dialogue box that pops up when you call the "Get
Filename Save As" command in Applescript?

It would appear that it defaults to the folder that you last saved a
spreadsheet in. I would like to pass a path into the command as a parameter
using applescript but have not found an answer in any of the documentation.

Thanks!
Yes it defaults to the last place a file was saved to or opened from. Try
passing the DIR command to set the current directory before issuing the
getsaveasfilename. Be aware that there is a long time bug with
getsaveasfilename ­ if the user navigates to the file using the disclosure
arrows, an incorrect path will be returned. However, if the directory nodes
are instead double clicked, the path will be correct.
 
J

jhufford

Hi Bob,
Thanks for the quick response and the heads up about the bug, I had not experienced it yet. I guess now my question is what is the DIR command? I didn't see a reference to it in the Applescript language guide. Is it in fact an applescript command?
 
B

Bob Greenblatt

Hi Bob,
Thanks for the quick response and the heads up about the bug, I had not
experienced it yet. I guess now my question is what is the DIR command? I
didn't see a reference to it in the Applescript language guide. Is it in fact
an applescript command?
It is an Excel command. I thought you were using ³tell Microsoft Excel² If
so the DIR will set the current directory.
 
J

jhufford

Hi Bob,
I hadn't realized you'd responded to this thread again, but I've finally had the time to try and get this last part of my script working.

I'm still confused about the syntax and usage of DIR. I'm thinking that DIR is native to VBA, and thus wouldn't work in Applescript?

Am I way off base?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top