applescript issue

dysong3

Member
Hi,

I use this applescript to add recipients to a given list

Code:
tell application "my drive:Applications:MaxBulk Mailer:MaxBulk Mailer.app"
	activate
SaveList
	SelectList "x"
	AddRecipient 
	SaveList
	end tell

However when I use it in a loop the "SelectList" part does not finish loading before the new recipient is added and the list is saved which ends up truncating my list. Any idea how to designate "wait till list is loaded" before continuing ?
 

stanbusk

Administrator
Staff member
Why do you select a list in a loop? Once the list is selected, just add recipients then you can save but again, outside the loop, no need to save each time you add a recipient.
 

dysong3

Member
I need the loop because I need to put email address into two different lists, one where the addresses accept my localhost as the SMTP address and one where they don't. So the script is meant to be able to put the right address in the right list, except that as it is the lists get truncated.
 

stanbusk

Administrator
Staff member
It may be an applescript problem then, not sure. We did not add the list selection command to use it in a loop actually. Can't you add the recipients to a variable in your script and then select the list and add all those recipients from that variable?
 
Top