MLEmail Commands

Thread to discuss the MLOutlook family of applications: MLCalendar / MLEmail / MLPhoneBook
User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

MLEmail Commands

Postby ronsatter » Wed Dec 24, 2008 7:53 pm

Hi Tracy,

I finally got around to playing with this plugin some more. I read this in the wiki:

•On the MainLobby client PC, the 0019_email1.mls scene is opened and displays a default view of your incoming emails. You can then resort, filter email by first letter, Page up and down the list, and select an individual email for viewing.


First of all, I don't have a scene named "0019_email1.mls" in my folders anywhere. I do have 2 differently named scenes which appear to be identical:

0019_email and 0019_mlemail

Which is correct to use, and does this mean that somehow the plugin will issue a command to automatically open the 0019_email.mls scene when it receives a new email? That would be very cool. I couldn't find any commands in the wiki which might allow this and there were no commands embedded in the scene startup area of either scene. Is there a specific command, or can the plugin only be triggered by a key word in the subject line of the incoming email?

I'm wondering what the best way might be to automatically open the 0019_email.mls scene when ANY new email arrives.

Has anyone using this plugin found a method to do this?

Also:
1. Is there a way to display the new email count, i.e. "total emails" received with any of the variables?

2. What is the MLServe command to clear all variables? I tried MLEmail|CLEAR_VARIABLES with no luck.

Ron
If it ain't broke ... don't fix it!

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Postby ronsatter » Sat Dec 27, 2008 6:17 pm

2. What is the MLServe command to clear all variables? I tried MLEmail|CLEAR_VARIABLES with no luck.


I just notice a macro to do this. It must have been added to the command db with the MLEmail plugin. It's called Email_Reset_Current. It clears all of the current emails variables. That's handy for opening the Email scene to a clean page without lingering email text. etc.

Ron
If it ain't broke ... don't fix it!

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Postby ronsatter » Sun Dec 28, 2008 12:34 am

I'm wondering what the best way might be to automatically open the 0019_email.mls scene when ANY new email arrives.


My solution ...

1. Create a new ML Automation Rule:

Whenever mlemail_new_subject changes value
Then MLServe.Cmd.Macro|Show_Email_Alert

This will execute the macro "Show_Email_Alert" whenever the variable "mlemail_new_subject" changes value. This variable is created when the MLEmail Plugin is installed. It displays the subject line of a new incoming email.

2. Create a new ML Macro named "Show_Email_Alert"

Macro|
MLServeCmd.MLCmd|{{clientname}}~loadOverlayAdvanced|Email_Alert.mls~2

The macro sends a command to load a scene called "Email_Alert" into layer 2. (Fig 1 below). It contains text objects which display the variables:

mlemail_new_from_address
mlemail_new_subject
mlemail_new_from_email_address.

Clicking the "VIEW" button on the scene loads my modified version of 0019 email.mls into layer 2, replacing scene Email_Alert. (Fig 2)

Note: If MainLobby is displaying a scene using MLWebLobby, you'll need to incorporate a command in the "Show_Email_Alert" macro to close the MLWebLobby window because it always floats above any ML scene graphic.

Hope this gives some folks some ideas. :D

Ron
You do not have the required permissions to view the files attached to this post.
If it ain't broke ... don't fix it!

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Bump

Postby ronsatter » Sat Jan 03, 2009 2:38 am

1. Is there a way to display the new email count, i.e. "total emails" received with any of the variables?


Hi Tracy,

Happy New Year!

I'm still looking for a solution. The only hint I see in the MLEmail plugin is in the "Mail Providers" tab. There is a column called "Emails Captured". How does this work and can that total be exposed in a variable?

Thanks,

Ron
If it ain't broke ... don't fix it!

User avatar
ronsatter
Is there life beyond Cinemar?
Is there life beyond Cinemar?
Posts: 1304
Joined: Mon Dec 04, 2006 1:40 am
Location: San Leandro, CA
Contact:

Postby ronsatter » Sun Jan 04, 2009 5:01 pm

I found a solution using a simple MLMath command. Thanks Brandon Higa!

Build an MLServer Automation Rule definition for alerting of incoming email:

Whenever mlemail_new_subject changes value
MLServeCmd.Macro|Email_New_Tally
MLServeCmd.Macro|Slide_Email_Alert
MLServeCmd.MLTimer|Enable~3


The 3 macros above execute:

1. Email_New_Tally looks like this:
Macro|
MLConditional|IsEqual##{{mlemail_new_subject}}####SetVariable|MLEmail_New_Total~0##MLMath|Add~MLEmail_New_Total~{{MLEmail_New_Total}}~1


It checks the variable {{mlemail_new_subject}} to see if it is blank. If so, it sets a variable {{mlemail_new_total}} to the value "0". If {{mlemail_new_subject}} is not blank, it increments the variable {{mlemail_new_total}} by 1, using the MLMath|Add command. Every time a new email arrives, it increments {{mlemail_new_total}} by 1. I placed a text object on my home scene displaying {{mlemail_new_total}} so I can see at a glance how many new emails have arrived.

2. Slide_Email_Alert
Macro|
MLServeCmd.MLCmd|MLCommand~{{clientname}}~Web|Close~1!
MLPause|.25!
MLServeCmd.MLCmd|MLCommand~{{clientname}}~setProperty|2~y~1200!
MLServeCmd.MLCmd|{{clientname}}~loadOverlayAdvanced|Email_Alert.mls~2!
MLCmd|MLCommand~{{clientname}}~setProperty|2~move~0~0


This macro closes a WebLobby window, should one be open (all ML layers are obscured by open WebLobby windows) and loads a scene called "Email_Alert" into layer 2. (See Fig 1 in earlier post). It slides up from off screen and displays the variables:

{{mlemail_new_from_address}}
{{mlemail_new_subject}}
{{mlemail_new_from_email_address}}

Clicking the "VIEW" button on the scene loads my custom version of 0019 email.mls into layer 2, replacing scene Email_Alert. (See Fig 2 in earlier post). Clicking the "SKIP" button dismisses the "Email_Alert" scene and loads my "Home" scene.

3. MLTimer|Enable~3

I added this timer using MLTimer to dismiss the Email_Alert scene after 60 seconds. It's set to run once. When the timer's duration is completed (60 secs), it sends this macro:

Macro|
MLServeCmd.MLCmd|MLCommand~{{clientname}}~setProperty|2~y~1200!
MLServeCmd.MLCmd|{{clientname}}~loadOverlayAdvanced|Home_Overlay.mls~2!
MLCmd|MLCommand~{{clientname}}~setProperty|2~move~0~0


which replaces the "Email_Alert" scene in layer 2 with a layer used in my normal "Home" scene. It slides the layer from off screen up into center screen.

This technique can be adapted to other uses, when an "On Screen" visual alert is helpful, ie weather alerts, power usage alerts, security alerts ... just modify the information displayed on the "Alert" scene for each scenario.

Here's a screen shot of my "Home" scene with the email counter display (above the calendar photo) along with a daily appointment counter and a phone message counter, all designed to be real time displays. When you click on a counter, it takes you to the appropriate scene for more details.

Hope this gives some practical help to others in ML world.


Happy New Year everyone! :D

Ron
You do not have the required permissions to view the files attached to this post.
If it ain't broke ... don't fix it!


Return to “MLOutlook”

Who is online

Users browsing this forum: No registered users and 1 guest