- Joined
- Mar 28, 2006
- Messages
- 198
- Reaction score
- 5
We have Stuffit Deluxe 7.0.3. We're running Mac OS X. I know how to make a script that moves files to specific folders based on file names... what I want is to have PDFs stuffed to .sit files individually (one .sit for every .pdf) as they are put into a specific folder and then move the original PDF to one folder and the SIT to another folder. Like I said, the moving part works... it's the stuffing part that's being uncooperative...
Here's what I've got... I put several PDFs in my "inFolder" for testing purposes...
it gives me the error message of "Can't get item 1 of "Nicodemus:TestfolderIn""
property inFolder : "Nicodemus:TestfolderIn"
property outfolder : "Nicodemus:TestfolderOut"
property notfolder : "Nicodemus:TestfolderNot"
on idle
tell application "Finder"
set theCount to (count of items of inFolder)
repeat until theCount = 0
if exists item 1 of folder inFolder then
set x to name of item 1 of folder inFolder
if x contains ".PDF" then
select item 1 of inFolder
tell application "System Events"
tell process "Stuffit Deluxe"
keystroke "s" using command down
delay 1
end tell
end tell
move item 1 of folder inFolder to folder outfolder with replacing
else if x contains ".sit" then
move item 1 of folder inFolder to folder notfolder with replacing
end if
else if not (exists item 1 of folder inFolder) then
return 0
end if
end repeat
end tell
return 10
end idle
Here's what I've got... I put several PDFs in my "inFolder" for testing purposes...
it gives me the error message of "Can't get item 1 of "Nicodemus:TestfolderIn""
property inFolder : "Nicodemus:TestfolderIn"
property outfolder : "Nicodemus:TestfolderOut"
property notfolder : "Nicodemus:TestfolderNot"
on idle
tell application "Finder"
set theCount to (count of items of inFolder)
repeat until theCount = 0
if exists item 1 of folder inFolder then
set x to name of item 1 of folder inFolder
if x contains ".PDF" then
select item 1 of inFolder
tell application "System Events"
tell process "Stuffit Deluxe"
keystroke "s" using command down
delay 1
end tell
end tell
move item 1 of folder inFolder to folder outfolder with replacing
else if x contains ".sit" then
move item 1 of folder inFolder to folder notfolder with replacing
end if
else if not (exists item 1 of folder inFolder) then
return 0
end if
end repeat
end tell
return 10
end idle