Re: Question about handler
Re: Question about handler
- Subject: Re: Question about handler
- From: Graff <email@hidden>
- Date: Fri, 02 Apr 2004 10:05:44 -0500
You can set pictureCount as a global variable. Do this at the top of
the script:
global pictureCount
The values of global variables are saved between runs so it is a good
idea to initialize them to clear any retained values that might mess up
your calculations. You are doing this in the open handler already so
this shouldn't be a problem.
- Ken
On Apr 2, 2004, at 9:44 AM, stephan wrote:
Hello all,
Is there a way to pass the info for a variable from one handler to an
other
one. I need to be able to count the number of file beeing process.
Example:
on open objectList
set pictureCount to 0
repeat with objectRef in objectList
set pictureFileRef to objectRef
processAFile (pictureFileRef)
end repeat
finalizeProcess ()
end open objectList
on processAFile (pictureFileRef)
copy file pictureFileRef to folder x
set pictureCount to pictureCount + 1
end processAFile
on finalizeProcess ()
display dialog "Number of images copied is:" pictureCount
end finalizePorcess
Thanks!
--
Stephan Adam
Stephan Adam Consultant inc.
Solutions d'automatisation
www.saconsultant.com
email@hidden
Cell. : (514) 944-6139
Membre associi, Filemaker Solutions Alliance
Associate Member, Filemaker Solutions Alliance
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.