6 Replies Latest reply: Jan 25, 2010 6:55 PM by XP
XP Level 1 Level 1 (15 points)
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)
  • 1. Re: Simple Choose File default location question.
    Budgie Level 4 Level 4 (1,120 points)
    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
  • 2. Re: Simple Choose File default location question.
    XP Level 1 Level 1 (15 points)
    Thanks

    Both of those suggestions come up with the same result I was having - ie the open file dialogue is pointing to my Documents folder, not my Desktop.

    XP
  • 3. Re: Simple Choose File default location question.
    Budgie Level 4 Level 4 (1,120 points)
    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:"
  • 4. Re: Simple Choose File default location question.
    XP Level 1 Level 1 (15 points)
    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.
  • 5. Re: Simple Choose File default location question.
    Budgie Level 4 Level 4 (1,120 points)
    try repairing permissions, or maybe a re-boot?
  • 6. Re: Simple Choose File default location question.
    XP Level 1 Level 1 (15 points)
    Disk permissions didn't fix it, but reboot did. Strange I thought I'd left the land of rebooting when leaving my PC behind.

    Oh well, fixed for now thanks.

    XP