• 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: Set the target_file without prompt?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Set the target_file without prompt?


  • Subject: Re: Set the target_file without prompt?
  • From: "Adam K. Wuellner" <email@hidden>
  • Date: Tue, 2 Nov 2004 16:55:28 -0600

On Nov 2, 2004, at 4:29 PM, TJ Marbois wrote:

How do I change this so I can pass a string and set the file name and
location with a passed string --  instead of prompting each time?

set the target_file to choose file name with prompt "Name and location."

I want to pass a string 'theNumber' into a handler - that sets the
target_file name and just simply saves it to an output folder.

You want the file to be specified by your code, not the user, correct?

You can build up the path programatically, as a string, in either Mac or POSIX style. When it's a complete and valid path, you just ask for that file thusly:
file "my:path:to:my:file"
alias "my:path:to:my:file"
or
POSIX file "/path/to/my/file"


When you say 'saves it', to what save mechanism are you referring? Some application dictionary's 'save' command, or are you going to write data to the file yourself, via 'write'?

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Set the target_file without prompt?
      • From: TJ Marbois <email@hidden>
References: 
 >Set the target_file without prompt? (From: TJ Marbois <email@hidden>)

  • Prev by Date: Re: Best practices- nested loops or handlers or both
  • Next by Date: Re: OmniGraffle - Insert Image
  • Previous by thread: Set the target_file without prompt?
  • Next by thread: Re: Set the target_file without prompt?
  • Index(es):
    • Date
    • Thread