Re: Can't make string to list
Re: Can't make string to list
- Subject: Re: Can't make string to list
- From: "Marc K. Myers" <email@hidden>
- Date: Tue, 23 Jan 2001 16:28:49 -0500
- Organization: [very little]
Brandon Carpenter wrote:
>
Subject: Can't make string to list
>
To: email@hidden
>
From: "Brandon Carpenter" <email@hidden>
>
Date: Tue, 23 Jan 2001 12:08:28 -0600
>
>
In the script below, I am attempting to look into a
>
folder where there are other folders. In those folders
>
are files that I want to send to SoundJam, convert them to a
>
differant format and send them back to thier original folder
>
(with everything else). Two things are happening. I am
>
unable to set the source_folder_contents to a string. But the
>
script still finds the files and adds all the files, when I
>
only want to work on one folder at a time. The second thing
>
is the script add the first file found twice.
>
Any feedback would be appreciated.
The variable "source_folder_contents" is a list. "display dialog"
requires a text parameter, so you'd have to say "display dialog
(source_folder_contents as text)". This would concatenate the list into
text with no separation between what were formerly items of the list.
To get separation, you'd have to set AppleScript's Text Item Delimiters
to something other than their default {""} before coercing the list to text.
I'm not clear as to why you are using the idle handler here. Wouldn't
it be easier to put a "display dialog" at the end of the run handler
with an option to "do it again?". If selected, it could give the
command "run" to start the whole process over with a new source folder.
If would certainly make it easier to test, since you could run it in the
script editor and observe the event log instead of using all those
"display dialog" statements.
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[1/23/01 4:27:41 PM]