• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [XPOST] Universal or general path to desktop?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XPOST] Universal or general path to desktop?


  • Subject: Re: [XPOST] Universal or general path to desktop?
  • From: David Graham <email@hidden>
  • Date: Tue, 8 Apr 2003 08:55:53 -0700

Mike,

PLEASE if you are going to cross-post to more than one mailing list, you need to prefix your subject with the customary [XPOST]. It's generally bad form to x-post because if you post a question on one list people may still be trying to provide assistance when the answer has already been given elsewhere.

On Monday, April 7, 2003, at 11:21 PM, MR wrote:

Thanks Ben and Malcolm,

but I don't see how that will help. A ((path to desktop folder as string)) will be different for every desktop. e.g. the example I gave specific to my desktop is

"Macintosh HD: users:Mike:desktop:PDFfiles:"

whereas the path to another desktop might be

"Payables HD:users:Linda:desktop:PDFfiles:"

You wanted something that would provide the path to a specific file on the current desktop for the logged-in user, right? Well that's precisely what the script provides for you. You should actually test it and you'll see that it solves your problem.

The only exception that I'll add to Ben's snippet is a trailing colon ":". In your initial example your path ended at 'fileondesktop' which implies that it is a file, not a directory. If it is, in fact, a directory then you'll need the following:

set sourceFolder to ((path to desktop folder as string) & "fileondesktop:") as string

Also, where is testing for current system version going to help? I already test for current platform to test for OSX or OS9.2.

The assumption is that if the script must be tweaked for different OS versions, you can test for it and run the appropriate one as needed. That said, this snippet should work on all recent versions of AppleScript.

I need to be able to point the script to a folder that is already on each desktop (PDFfiles) so that following scripts can put PDF files into that file. I've got it working on my computer. Now I need it to work on any desktop that has a folder with that name.

Test it and let us know if it's not working correctly.

--

david m graham
619.322.9698
http://homepage.mac.com/davidgraham/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Universal or general path to desktop? (From: MR <email@hidden>)

  • Prev by Date: Re : Capturing code snippets
  • Next by Date: Accessing FMP with a password?
  • Previous by thread: Re: Universal or general path to desktop?
  • Next by thread: Re: Universal or general path to desktop?
  • Index(es):
    • Date
    • Thread