Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Simple Choose File default location question.

I wish to set the default location of a choose file command to the desktop as in:

choose file default location (path to desktop)

But the dialogue box to choose the file never opens on the desktop folder. Can anyone let me know what I am doing wrong? As a test, if I use:

set File_Name to (path to desktop)

The result is the correct alias to the desktop.

I am confused.

Regards, XP

Dual 2.7GHz G5, Mac OS X (10.4.1)

Posted on Jan 25, 2010 3:09 PM

Reply
6 replies

Jan 25, 2010 4:12 PM in response to XP

Hi XP

try a couple of these suggestions.

set desktop_path to path to desktop folder
set theFolder to choose folder with prompt "Choose your folder XP" default location desktop_path

--or

set theFolder to choose folder with prompt "Choose your folder XP" default location path to desktop folder



Budgie

Jan 25, 2010 4:37 PM in response to XP

strange, both point to my desktop folder. I had folder instead of file also.


If I use the below, this directs me to my documents folder, you can change it to library folder etc etc and the result will direct you to your chosen location.

set documents_path to path to documents folder

If I use this, it directs me to my desktop folder.

set desktop_path to path to desktop folder

see the result of the alias path returned in Script Editor, both for me are:

alias "Macintosh HD:Users:Budgie:Desktop:"

and

alias "Macintosh HD:Users:Budgie:Documents:"

Jan 25, 2010 4:57 PM in response to Budgie

Yes it is strange. All the other path short forms like Users, Documents etc all seem to work fine - but for some reason it refuses to point itself at the Desktop folder.

Even if I grap the alias for the Desktop - and plug that in long-hand - it still refuses to go to the desktop, yet the alias it produces for the Desktop is correct.

Simple Choose File default location question.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.