Script to Close Mail Remotely

I have been scanning the AppleScript dictionary, the AppleScript standard additions dictionary without success looking for the trig functions like sin and cos etc without luck. I know sin and cos are there as I have used them in the past, but I need to find the documentation for them.

If there is no dictionary with this information, where is the documentation on these functions, including functions for converting between floats/reals and integers. This is especially important as I need functions for rounding nearest, rounding up and rounding down. Any help would be appreciated.

Thanks
Kevin

I’m not sure that they are part of vanilla AppleScript. The Satimage OSAX provides these commands (and many more). Rounding, however, is part of Standard Additions:

Jon

As Jon says, the Satimage OSAX has several mathematical functions of this type: cos, sin, acos, asin, tan, atan, sqrt, In, log10, exp. (Maybe you had this installed on an earlier system?)

There’s a ‘round’ function in the Standard Additions. Also, I understand that as from Panther, coercing a real to an integer rounds the value to the nearest whole number, using the IEEE convention that .5 rounds to the nearest even number.

For a set of fast rounding handlers of various types, you may care to check out my own “aRounderRound” package in ScriptBuilders:

http://files.macscripter.net/scriptbuilders/ScriptTools/aRounderRound.sit

Thanks for the replies.

Smile is my AppleScript editor of choice and as a result I installed the Satimage extension as a matter of course without looking into what functionality it provided. Thus I have cos and sin without appreciating that it is not part of AppleScript itself. But I needed to find out the full range of functionality. So now I know to look into the satimage osax dictionary.

Thanks for the extra info on rounding, I was searching through the Apple documentation and dictionaries using cos since it was the keyword that didn’t throw up a large number of unrelated results.

Having to make sure that the user of the script installs the satimage osax before they can use the script is a bit of pain, but at least it is availabe.

Thanks again

Kevin

Actually, you can embed Scripting Additions in your AppleScript applications in OS X…

source…
http://www.apple.com/applescript/releasenotes/192OSX.html

Hi,

I’m totally new to action scripting. I was hoping to create a script that will be called by a rule in Mail. When the subject line is matching the subject that I send, I want the script to close the Mail Application.

Whenever I call the script though, the script closes the application but not completely and properly. It closes it half way while checking the mail. How can I script it so that it waits until it is done checking the mail before closing?Or does anyone know any other solutions???

tell application “Mail”

activate

quit

end tell

Thanks.

steven_yyz

Here is my question again… none of the replies have anythin to do with my initial post???

Hi,

I’m totally new to action scripting. I was hoping to create a script that will be called by a rule in Mail. When the subject line is matching the subject that I send, I want the script to close the Mail Application.

Whenever I call the script though, the script closes the application but not completely and properly. It closes it half way while checking the mail. How can I script it so that it waits until it is done checking the mail before closing?Or does anyone know any other solutions???

tell application “Mail”

activate

quit

end tell

Thanks.

steven_yyz

i set up a applescript that uses email’s rules.
i went to www.kanzu.com and downloaded there extra suites for applescript.
it has a timer feature on it. so you could tell it to wait 5 minutes before
it closes the email application.