Hullo list,
I have a script that I drop a folder with around 2,000 files in it. Out of that 2,000 about 200 of them are Quark docs. I need to get a list of the Quark docs so I can open them and save EPS files. What I have works, but it usually takes dropping the folder twice before it gets all the files needed. I copied the part of the script that gets the files and did a quick test. I am posting that script here. My question is, why can’t it get the needed info the first time it runs?
on open x
set myFolder to x as alias
set myList to myGetList(myFolder)
try
if myList is {} then
display dialog "nothing here"
else
set myCount to count of myList
display dialog myCount
end if
end try
end open
on myGetList(myFolder)
with timeout of 500 seconds
tell application "Finder"
set x to every file of myFolder
set myList to {}
repeat with i from 1 to count of x
set myFile to item i of x
try
if file type of myFile is "xprj" then
set myFile to myFile as text
set end of myList to myFile as text
end if
end try
end repeat
end tell
end timeout
return myList
end myGetList
Thanx,
mike helbert