Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Doesn't work for me' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Doesn't work for me
Authored by: Zeratul on Jan 19, '03 12:00:19AM

I've been trying to use these scripts to set up an automated mailing list system, that anyone sending to a certain address with "add to list" in the subject would be added to the Address Book group "List". Well, for some reason the script doesn't seem to be excecuting for me. I spent a few hours over the past few days, with an automated rule that runs the script every time a message is recieved (kept e-mailing myself), to test out the script. If I have it not do anything but display a Dialog, it does that fine. And if I have it follow your instructions as to how to extract the rule name, I can do that and display that in a second dialog. I can even add the line "set selectedMessages to |Selectedmessages| of info", and I still get both dialogs. However, once I add the line "set theSender to sender of Selectedmessages" or anything like that, it runs the script till that point and promptly ends operation of the script. I test this with a dialog saying "before", before that line of code, and a second one "after" after the line of code. If I simply do not have the line, I get 2 dialogs in a row, "before", "after". Once I enter the line, I get "before" and thats it. The strange thing is that even if I delete the strange line after entering it and failing, I have to restart Mail.app for the script to start working again.

I also tried directly copying and pasting in the sample code provided, with no seeming result. Another note, I am pretty sure that Script Editor registers properties of classes in blue, while variables in green. In the script, it registers the "name" of theRule in blue, but it registers "sender" or "subject" of eachMessage in green, not blue.

Any and all help will be greatly appreciated.



[ Reply to This | # ]
Doesn't work for me
Authored by: Helios on Jan 19, '03 03:29:01PM

I cant explain why your script isnt working i can only moan at the fact that if a script error occurs that mail will not notify you of the error... maybe try wrapping your script in a 'try' and set an error handler to display a dialog with the error message.

--example script
try
--your script here
on error
display dialog "Oops"
end try

You can set the dialog to display the error type and number aswell to debug what may have gone wrong. But you probably allready knew all this :/



[ Reply to This | # ]