• 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: creating temp files??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: creating temp files??


  • Subject: Re: creating temp files??
  • From: John Delacour <email@hidden>
  • Date: Thu, 12 Jun 2003 08:09:37 +0100
  • Mac-eudora-version: 6.0b20

At 9:23 pm -0400 11/6/03, Chris Kacerguis wrote:

... I am writting a program that takes a variable reads it into a temp file, then I need to know the file name and location, then send that file name to a:

do shell script ("command <" & filename)


How do I make a temp file (just needs to be plain old text)


set fU to "/tmp/temp.sh"
set f to fU as POSIX file
set lf to ASCII character 10
set scr to "#!/usr/bin/sh" & lf & "echo 'Hello World!';"
open for access f with write permission
set eof f to 0
write scr to f
close access f
do shell script "sh " & fU


JD




.
_______________________________________________
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: 
 >creating temp files?? (From: "Chris Kacerguis" <email@hidden>)

  • Prev by Date: Re: Resurgence in AppleScript interest (Ron Bishop)
  • Next by Date: Re: Books (was Re: Resurgence in AppleScript interest)
  • Previous by thread: Re: creating temp files??
  • Next by thread: Re: Finding only visible files...
  • Index(es):
    • Date
    • Thread