It is currently March 28th, 2024, 10:15 am

Windows live mail

General topics related to Rainmeter.
Darkfall
Posts: 5
Joined: January 1st, 2017, 8:13 pm

Windows live mail

Post by Darkfall »

Before i dig further into the topic i felt i had to ask first if its even possible.

What i would like is to have a gmail feed listing my latest mails, and when i click any of them i would like that mail entry to open with the windows 10 mail app located in

AppsFolder\microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.mail

I have tried many mail feed skins, but so far all of them open up web based gmail instead of any default app, or settings for what app to show the feed entry in. If anyone knows of any such skin, or could tell me if its even possible, feel free to tell me. Thank you in advance :)
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Windows live mail

Post by balala »

I can say how to open the Windows Mail modern app, but I don't have set up this app, so I couldn't find a way to open a specific mail in this app. So, this will be just a partial success.
A very good description of how to open a modern app can be found at: https://forum.rainmeter.net/viewtopic.php?p=119837#p119837
(thanks again jsmorley).
According to this description, the following meter will open the Mail app:

Code: Select all

[MeterMail]
Meter=STRING
X=0
Y=0
Padding=15,5,15,5
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFT
AntiAlias=1
Text=Open Mail
LeftMouseUpAction=["shell:Appsfolder\microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.mail"]
You'll have to try to find out how to open certain mail in this app (if it even is possible, but I suppose it is). The first thing I'd try would be to add the address of the mail as second parameter of the LeftMouseUpAction, something like:
LeftMouseUpAction=["shell:Appsfolder\microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.mail" "https://[color=#0080FF]#UserName#[/color]:[color=#0080FF]#Password#[/color]@gmail.google.com/gmail/feed/atom/[color=#0080FF]1585baff5ef6106d[/color]"]
Add to the [Variables] section the UserName and the Password variables and take care about the ID of your mail (the last colored part above). For a first try, you can find it out from the URL of an open mail (in webbrowser).
Please let me know if this helped somehow.
Darkfall
Posts: 5
Joined: January 1st, 2017, 8:13 pm

Re: Windows live mail

Post by Darkfall »

Thank you for your reply. I absolutely see where you are getting at with the above suggestion but after doodling around a bit i already know that my lack of knowledge prevent me from making any good use of it. But if i understood what you wrote correctly it goes something like this:

List gmail in rss feed the usual way
click entry in feed
check and save the mail ID in var
open liveMaill using the shell command

But how to make use of the saved mail ID, thats the question. How would one go about appending the feed query to the open LiveMail shell command? Or would one somehow be able to forward what ID liveMail should filter once opened?

Hopefully you or someone else will be able to take your concept and build on it, if it dosn't already exist such a gadget im sure more would love to have this working as having a browser + tab pop up every time you hit a feed entry is rather annoying.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Windows live mail

Post by balala »

Darkfall wrote:Thank you for your reply. I absolutely see where you are getting at with the above suggestion but after doodling around a bit i already know that my lack of knowledge prevent me from making any good use of it. But if i understood what you wrote correctly it goes something like this:

List gmail in rss feed the usual way
click entry in feed
check and save the mail ID in var
open liveMaill using the shell command

But how to make use of the saved mail ID, thats the question. How would one go about appending the feed query to the open LiveMail shell command? Or would one somehow be able to forward what ID liveMail should filter once opened?

Hopefully you or someone else will be able to take your concept and build on it, if it dosn't already exist such a gadget im sure more would love to have this working as having a browser + tab pop up every time you hit a feed entry is rather annoying.
We won't save in fact those IDs, but have to get and then use them. The following WebParser measures will do this, for the first mail:

Code: Select all

[MeasureGMailn]
Measure=Plugin
Plugin=WebParser
Url=https://#UserName#:#Password#@gmail.google.com/gmail/feed/atom
RegExp=(?siU)<title>(.*)</title>.*#Item#.*#Item#.*#Item#.*#Item#.*#Item#
UpdateRate=300

[MeasureTitle1]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=2

[MeasureAddress1]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=10

[MeasureMailId1]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=3
This code will work if you add the Item (see below), UserName and Password, to the [Variables] section. Item is this: Item=(?(?=.*<title>)<title>(.*)</title>.*message_id=(.*)&.*<issued>(.*)-(.*)-(.*)T(.*):(.*):(.*)Z</issued>.*<name>(.*)</name>). See that here I used the Lookahead Assertions. This way you can add as many #Item# elements in the RegExp option of the [MeasureGMailn] measure, you want, just for each of them have to add the appropriate [MeasureTitleX], [MeasureAddressX] and [MeasureMailIdX] child measures. Because I used in the above expression five #Item# elements, the skin will get up to five mails.
Now create the appropriate meters to can see the mails:

Code: Select all

[BackgroundStyle]
SolidColor=255,255,255,1
X=0
W=300
H=14
MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor "255,255,255,150"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor "255,255,255,1"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
DynamicVariables=1

[TitleStyle]
X=0r
Y=7r
W=160
Padding=15,2,15,2

[AddressStyle]
X=190r
Y=0r
W=100
Padding=0,2,15,2
Text=%1

[TextStyle]
H=12
ClipString=1
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFTCENTER
AntiAlias=1

[MeterBaground1]
Meter=Image
MeterStyle=BackgroundStyle
Y=0
LeftMouseUpAction=["shell:Appsfolder\microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.mail" "https://#UserName#:#Password#@gmail.google.com/gmail/feed/atom/[MeasureMailId1]"]
Group=Mail1

[MeterTitle1]
Meter=STRING
MeterStyle=TitleStyle | TextStyle
MeasureName=MeasureTitle1
Text=1.: %1
Group=Mail1

[MeterAddress1]
Meter=STRING
MeterStyle=AddressStyle | TextStyle
MeasureName=MeasureAddress1
Group=Mail1

[MeterBaground2]
Meter=Image
MeterStyle=BackgroundStyle
Y=15
LeftMouseUpAction=["shell:Appsfolder\microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.mail" "https://#UserName#:#Password#@gmail.google.com/gmail/feed/atom/[MeasureMailId2]"]
Group=Mail2

[MeterTitle2]
Meter=STRING
MeterStyle=TitleStyle | TextStyle
MeasureName=MeasureTitle2
Text=2.: %1
Group=Mail2

[MeterAddress2]
Meter=STRING
MeterStyle=AddressStyle | TextStyle
MeasureName=MeasureAddress2
Group=Mail2

[MeterBaground3]
Meter=Image
MeterStyle=BackgroundStyle
Y=30
LeftMouseUpAction=["shell:Appsfolder\microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.mail" "https://#UserName#:#Password#@gmail.google.com/gmail/feed/atom/[MeasureMailId3]"]
Group=Mail3

[MeterTitle3]
Meter=STRING
MeterStyle=TitleStyle | TextStyle
MeasureName=MeasureTitle3
Text=3.: %1
Group=Mail3

[MeterAddress3]
Meter=STRING
MeterStyle=AddressStyle | TextStyle
MeasureName=MeasureAddress3
Group=Mail3

[MeterBaground4]
Meter=Image
MeterStyle=BackgroundStyle
Y=45
LeftMouseUpAction=["shell:Appsfolder\microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.mail" "https://#UserName#:#Password#@gmail.google.com/gmail/feed/atom/[MeasureMailId4]"]
Group=Mail4

[MeterTitle4]
Meter=STRING
MeterStyle=TitleStyle | TextStyle
MeasureName=MeasureTitle4
Text=4.: %1
Group=Mail4

[MeterAddress4]
Meter=STRING
MeterStyle=AddressStyle | TextStyle
MeasureName=MeasureAddress4
Group=Mail4

[MeterBaground5]
Meter=Image
MeterStyle=BackgroundStyle
Y=60
LeftMouseUpAction=["shell:Appsfolder\microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.mail" "https://#UserName#:#Password#@gmail.google.com/gmail/feed/atom/[MeasureMailId5]"]
Group=Mail5

[MeterTitle5]
Meter=STRING
MeterStyle=TitleStyle | TextStyle
MeasureName=MeasureTitle5
Text=5.: %1
Group=Mail5

[MeterAddress5]
Meter=STRING
MeterStyle=AddressStyle | TextStyle
MeasureName=MeasureAddress5
Group=Mail5
This meters will show the title and the sender of each mail. Also they are clickable, if I'm not wrong too much, the LeftMouseUpAction options of the [MeterBaground1] - [MeterBaground5] meters should open the appropriate mail into Live Mail. If they aren't, you'll have to start experimenting, changing the second parameter of the LeftMouseUpAction options.
Seems complicated? It's not so. But to make it a bit easier, here is the whole code:

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[Variables]
Item=(?(?=.*<title>)<title>(.*)</title>.*message_id=(.*)&.*<issued>(.*)-(.*)-(.*)T(.*):(.*):(.*)Z</issued>.*<name>(.*)</name>)
UserName= - ADD HERE YOUR USERNAME -
Password= - AND HERE YOUR PASSWORD -

[BackgroundStyle]
SolidColor=255,255,255,1
X=0
W=300
H=14
MouseOverAction=[!SetOption #CURRENTSECTION# SolidColor "255,255,255,150"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# SolidColor "255,255,255,1"][!UpdateMeter "#CURRENTSECTION#"][!Redraw]
DynamicVariables=1

[TitleStyle]
X=0r
Y=7r
W=160
Padding=15,2,15,2

[AddressStyle]
X=190r
Y=0r
W=100
Padding=0,2,15,2
Text=%1

[TextStyle]
H=12
ClipString=1
FontColor=220,220,220
SolidColor=0,0,0,150
FontSize=8
FontFace=Segoe UI
StringStyle=BOLD
StringAlign=LEFTCENTER
AntiAlias=1

[MeasureGMailn]
Measure=Plugin
Plugin=WebParser
Url=https://#UserName#:#Password#@gmail.google.com/gmail/feed/atom
RegExp=(?siU)<title>(.*)</title>.*#Item#.*#Item#.*#Item#.*#Item#.*#Item#.*#Item#.*#Item#.*#Item#
UpdateRate=300

[MeasureTitle1]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=2
IfMatch=^$
IfMatchAction=[!HideMeterGroup "Mail1"]
IfNotMatchAction=[!ShowMeterGroup "Mail1"]

[MeasureAddress1]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=10

[MeasureMailId1]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=3

[MeasureTitle2]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=11
IfMatch=^$
IfMatchAction=[!HideMeterGroup "Mail2"]
IfNotMatchAction=[!ShowMeterGroup "Mail2"]

[MeasureAddress2]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=19

[MeasureMailId2]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=12

[MeasureTitle3]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=20
IfMatch=^$
IfMatchAction=[!HideMeterGroup "Mail3"]
IfNotMatchAction=[!ShowMeterGroup "Mail3"]

[MeasureAddress3]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=28

[MeasureMailId3]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=21

[MeasureTitle4]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=29
IfMatch=^$
IfMatchAction=[!HideMeterGroup "Mail4"]
IfNotMatchAction=[!ShowMeterGroup "Mail4"]

[MeasureAddress4]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=37

[MeasureMailId4]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=30

[MeasureTitle5]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=38
IfMatch=^$
IfMatchAction=[!HideMeterGroup "Mail5"]
IfNotMatchAction=[!ShowMeterGroup "Mail5"]

[MeasureAddress5]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=46

[MeasureMailId5]
Measure=Plugin
Plugin=WebParser
Url=[MeasureGMailn]
StringIndex=39

[MeterBaground1]
Meter=Image
MeterStyle=BackgroundStyle
Y=0
LeftMouseUpAction=["shell:Appsfolder\microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.mail" "https://#UserName#:#Password#@gmail.google.com/gmail/feed/atom/[MeasureMailId1]"]
Group=Mail1

[MeterTitle1]
Meter=STRING
MeterStyle=TitleStyle | TextStyle
MeasureName=MeasureTitle1
Text=1.: %1
Group=Mail1

[MeterAddress1]
Meter=STRING
MeterStyle=AddressStyle | TextStyle
MeasureName=MeasureAddress1
Group=Mail1

[MeterBaground2]
Meter=Image
MeterStyle=BackgroundStyle
Y=15
LeftMouseUpAction=["shell:Appsfolder\microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.mail" "https://#UserName#:#Password#@gmail.google.com/gmail/feed/atom/[MeasureMailId2]"]
Group=Mail2

[MeterTitle2]
Meter=STRING
MeterStyle=TitleStyle | TextStyle
MeasureName=MeasureTitle2
Text=2.: %1
Group=Mail2

[MeterAddress2]
Meter=STRING
MeterStyle=AddressStyle | TextStyle
MeasureName=MeasureAddress2
Group=Mail2

[MeterBaground3]
Meter=Image
MeterStyle=BackgroundStyle
Y=30
LeftMouseUpAction=["shell:Appsfolder\microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.mail" "https://#UserName#:#Password#@gmail.google.com/gmail/feed/atom/[MeasureMailId3]"]
Group=Mail3

[MeterTitle3]
Meter=STRING
MeterStyle=TitleStyle | TextStyle
MeasureName=MeasureTitle3
Text=3.: %1
Group=Mail3

[MeterAddress3]
Meter=STRING
MeterStyle=AddressStyle | TextStyle
MeasureName=MeasureAddress3
Group=Mail3

[MeterBaground4]
Meter=Image
MeterStyle=BackgroundStyle
Y=45
LeftMouseUpAction=["shell:Appsfolder\microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.mail" "https://#UserName#:#Password#@gmail.google.com/gmail/feed/atom/[MeasureMailId4]"]
Group=Mail4

[MeterTitle4]
Meter=STRING
MeterStyle=TitleStyle | TextStyle
MeasureName=MeasureTitle4
Text=4.: %1
Group=Mail4

[MeterAddress4]
Meter=STRING
MeterStyle=AddressStyle | TextStyle
MeasureName=MeasureAddress4
Group=Mail4

[MeterBaground5]
Meter=Image
MeterStyle=BackgroundStyle
Y=60
LeftMouseUpAction=["shell:Appsfolder\microsoft.windowscommunicationsapps_8wekyb3d8bbwe!microsoft.windowslive.mail" "https://#UserName#:#Password#@gmail.google.com/gmail/feed/atom/[MeasureMailId5]"]
Group=Mail5

[MeterTitle5]
Meter=STRING
MeterStyle=TitleStyle | TextStyle
MeasureName=MeasureTitle5
Text=5.: %1
Group=Mail5

[MeterAddress5]
Meter=STRING
MeterStyle=AddressStyle | TextStyle
MeasureName=MeasureAddress5
Group=Mail5
Don't forget to add the username and the password to the [Variables] section, otherwise the skin won't work.
Please let me know if you succeeded and if yes, what is the correct form of those LeftMouseUpAction options.
Darkfall
Posts: 5
Joined: January 1st, 2017, 8:13 pm

Re: Windows live mail

Post by Darkfall »

First of all thank you for taking the time for all this, people like you that makes this place what it is :)

As for the code, works flawlessly, everything is working except the very last bit like you mentioned. When i click a feed entry, livemail opens, but nothing is selected, only a list of all my imap mails like usual, none of them selected. I guess like you said, that the mouseUp action has to somehow feed the id input as an argument to somehow force liveMail to show the specific mail. Hmm. Back to reading the manual for me
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Windows live mail

Post by balala »

Darkfall wrote:First of all thank you for taking the time for all this, people like you that makes this place what it is :)

As for the code, works flawlessly, everything is working except the very last bit like you mentioned. When i click a feed entry, livemail opens, but nothing is selected, only a list of all my imap mails like usual, none of them selected. I guess like you said, that the mouseUp action has to somehow feed the id input as an argument to somehow force liveMail to show the specific mail. Hmm. Back to reading the manual for me
Thanks for the appreciations.
I setup my Mail to can check, but unfortunately I couldn't find a way to open a mail in this app, from a Rainmeter click. Maybe someone else will have a better idea? I haven't, sorry...
Darkfall
Posts: 5
Joined: January 1st, 2017, 8:13 pm

Re: Windows live mail

Post by Darkfall »

Hmm lets hope someone does figure out a way.
In the meantime, any way to do the same but with outlook then maybe?

If not then i guess the only other usable way would be to create a floating panel to display the fetched mail content and format it in a way that is pleasing and looks like a mail view or something.
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Windows live mail

Post by balala »

Darkfall wrote:In the meantime, any way to do the same but with outlook then maybe?
With the Outlook we have the same problems, I think. I have no idea how to access a mail with a known ID.
Darkfall wrote:If not then i guess the only other usable way would be to create a floating panel to display the fetched mail content and format it in a way that is pleasing and looks like a mail view or something.
In Rainmeter? It would be the simplest solution. Do you need help with this?
Darkfall
Posts: 5
Joined: January 1st, 2017, 8:13 pm

Re: Windows live mail

Post by Darkfall »

Well if you dont't mind doing it i would gladly accept it.

Currently im devouring all i can allover the place trying to wrap my head around it all, not only rainmeter but other related things so gonna take me some time until i can manage on my own ;)

(Unrelated to original topic)
While i'm at it, maybe you know the answer to an unrelated question im trying to solve. Is it possible through rainmeter to close a specific folder based on the folder path rather then the title? None of the dos commands i have found works, and another solution i found (nircmd.exe) only supports the folder title and not the path. What i need is to be able to close a folder by path using wildcards, for example "C:\MyFiles\*"

The following works for closing a specific window, but not its children in the path

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
AccurateText=1

[MeasureRun]
Measure=Plugin
Plugin=RunCommand
Parameter=nircmd.exe win close title "Movies"
State=Hide
OutputType=ANSI
OutputFile=#CURRENTPATH#CPUName.txt
RegExpSubstitute=1
Substitute="Name.*#CRLF#":"","#CRLF#":""

[MeterRun]
Meter=String
FontSize=11
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Click to Run
LeftMouseUpAction=[!CommandMeasure MeasureRun "Run"]
[MeterResult]
Meter=String
MeasureName=MeasureRun
Y=10R
FontSize=14
FontColor=255,255,255,255
AntiAlias=1
User avatar
balala
Rainmeter Sage
Posts: 16109
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Windows live mail

Post by balala »

Darkfall wrote:While i'm at it, maybe you know the answer to an unrelated question im trying to solve. Is it possible through rainmeter to close a specific folder based on the folder path rather then the title? None of the dos commands i have found works, and another solution i found (nircmd.exe) only supports the folder title and not the path. What i need is to be able to close a folder by path using wildcards, for example "C:\MyFiles\*"

The following works for closing a specific window, but not its children in the path
Hard stuff. If I'm not wrong, this will be possible only using a third party app (like nircmd), but I can't recomand one.
Post Reply