Re: I must be Daft! (creating a new text file)
Re: I must be Daft! (creating a new text file)
- Subject: Re: I must be Daft! (creating a new text file)
- From: Jay <email@hidden>
- Date: Sat, 5 Apr 2003 20:27:16 -0600
Hi David,
Would something like this be what you're looking for? It saves a text
file (with text entered by user in a dialog) in a folder called
'iPhotoFolder' that resides on the Desktop. This works for me in OS
10.2.4, AS 1.9.1. Hope it helps.
-----------------------------------------------
set FileTxt to (display dialog "Please Insert Information:" default
answer "" buttons "OK" default button 1 with icon 1)'s text returned
set FileLoc to ((path to desktop as string) & "iPhotoFolder:title")
try
set newFile to (open for access file FileLoc with write permission)
write FileTxt to newFile
close access newFile
on error err
close access newFile
display dialog "There was an error!" & return & err
end try
-----------------------------------------------
Jay
On Saturday, April 5, 2003, at 07:18 PM, David G. Simmons wrote:
>
I am either stupid, or just missing something REALLY basic, but I
>
cannot for the LIFE of me manage to create a simple text file, in a
>
folder of my choosing.
>
>
I create the Folder (actually, iPhoto creates it for me) then I prompt
>
the user for some text, and try to create a new file with that
>
information.
>
>
I have to say that I am failing miserably. All I want to do is prompt
>
for a simple text string, then save that text string into a file called
>
"title" in a directory which already exists on the users Desktop.
>
>
So far everything fails. I realize that this is a pretty basic thing,
>
and have read the language guide, the Finder dictionary, etc. and am
>
still failing. Please, someone guide me!
>
>
>
--
>
David G. Simmons
>
Ever notice that even the busiest people are never too busy to tell you
>
just how busy they are.
>
_______________________________________________
>
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.
_______________________________________________
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.