Re: novice questions (error diagnosis/incomplete dictionaries)
Re: novice questions (error diagnosis/incomplete dictionaries)
- Subject: Re: novice questions (error diagnosis/incomplete dictionaries)
- From: Joe Rice <email@hidden>
- Date: Thu, 23 Nov 2000 03:21:53 +0100
Jason -
Thanks for the response. Here's the relevant code from the script -
tried having the apps quit every twenty times in case they were
running out of memory due to a leak somewhere, but that didn't seem
to do it either. The length of the overall script is also due to
having to create a bunch of XML for each file processed - one XML
file for later server parsing, and a set of customized Cleaner XML
settings files.
Here are the routines handling file list creation. I wouldn't be
surprised if I missed some important concept when kludging it
together. ;) :
on open dropped_items
set startupDelay to 6
set buttonNames to {"Quit", "Configure", "Run"}
set defaultButton to 3
set dlgTimeOut to 6
set prompString to "Processing media will start automatically
in " & (startupDelay as string) & " seconds."
set these_items to GetItems(dropped_items)
set userOperation to 2
repeat while (userOperation = 2)
set dlgReply to display dialog prompString with icon
note buttons buttonNames default button defaultButton giving up after
dlgTimeOut
if (gave up of dlgReply) then
set userOperation to defaultButton
else if (button returned of dlgReply = item 1 of
buttonNames) then
set userOperation to 1
else if (button returned of dlgReply = item 2 of
buttonNames) then
set userOperation to 2
ConfigureFolders()
else if (button returned of dlgReply = item 3 of
buttonNames) then
set userOperation to 3
itemPick(these_items)
end if
end repeat
if (userOperation = 1) then
quit
end if
end open
to itemPick(these_items)
set currentIteration to 1
repeat with i from 1 to the count of these_items
set currentIteration to currentIteration + 1
if currentIteration = 20 then
tell application "Cleaner 5"
quit
end tell
tell application "SoundJam MP"
quit
end tell
delay 1
end if
set this_item to (item i of these_items)
make_xml(this_item)
end repeat
end itemPick
on GetItems(dropped_items)
script makeFileList
property fileList : {}
on open (theFile)
tell application "Finder"
copy theFile as string to end of fileList
end tell
return fileList
end open
end script
set names to walk folders dropped_items with script
makeFileList only using files of type type_list
end GetItems