advertisement
Forums

The Forum is sponsored by 
 

AAPL stock: Click Here

You are currently viewing the Tips and Deals forum
Applescript Experts, I need some assistance
Posted by: C(-)ris
Date: May 02, 2006 10:09AM
I am working on an Apple script that does a purge of a network folder from a Filemaker database. The script worked great in OS 9, took some time to run, but worked.

I switched the machine running the scripts over to 10.4 and it is super slow now. The purge used to take about 10 to 15 minutes, now it times out after an hour.

Here is the part of the scipt that seems slow, the rest of the script is just mounting servers.



tell application "FileMaker Pro"
activate
set filecount to count of records in database 1
try
repeat with i from 1 to filecount
set myfile to the first cell of record i
go to record i
tell application "Finder"
try
if length of myfile > 4 then
delete (every file in folder "Folder 1" of folder "Files" of disk "Server1" whose name contains myfile)
delete (every file in folder "Folder 2" of folder "Files" of disk "Server1" whose name contains myfile)
end if
end try
end tell
end repeat
end try
try
display dialog "All Done"
end try
tell database 1
close
end tell
end tell

Sorry it didn't keep the formatting.

Chris
Options:  Reply • Quote
Re: Applescript Experts, I need some assistance
Posted by: jesse
Date: May 02, 2006 10:14AM
If you don't get an answer here, you might try posting on this applescript forum.

[bbs.applescript.net]

jesse
Options:  Reply • Quote
Re: Applescript Experts, I need some assistance
Posted by: Greg the dogsitter
Date: May 02, 2006 10:20AM
I'm wondering if you could put commands in there to print out the current time after each step, so you can see where the slowdown is.
Options:  Reply • Quote
Re: Applescript Experts, I need some assistance
Posted by: mattkime
Date: May 02, 2006 08:27PM
use the do shell script command and put as much logic in there as possible.



Options:  Reply • Quote
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 238
Record Number of Users: 186 on February 20, 2020
Record Number of Guests: 5122 on October 03, 2020