It is currently May 3rd, 2024, 7:58 pm

Open Default E-mail Application

Get help with creating, editing & fixing problems with skins
User avatar
eXAKR
Posts: 30
Joined: January 11th, 2012, 12:22 pm

Open Default E-mail Application

Post by eXAKR »

OK, I'm trying to make a mail widget here that will display the number of unread mails you have in your mail application, using the method found here. I plan to have the widget open the default mail application when you click on it. I want to know here if this is possible? Perhaps there is a registry value that it can read?
User avatar
eXAKR
Posts: 30
Joined: January 11th, 2012, 12:22 pm

Re: Open Default E-mail Application

Post by eXAKR »

Derp... I think I just solved my own problem.



Now my only problem is how to read that into an argument for an Execute bang...
Last edited by jsmorley on March 7th, 2012, 12:54 pm, edited 1 time in total.
Reason: Edited to use [hsimg][/hisimg] for large images
User avatar
JoBu
Posts: 271
Joined: February 16th, 2011, 12:46 am
Location: California

Re: Open Default E-mail Application

Post by JoBu »

If GhoseMatrix is right, and that's usually the case, then I'd try something like this:

Code: Select all

[MeasureUnreadMail]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\Microsoft\Windows\CurrentVersion\UnreadMail\something@sympatico.ca
RegValue=MessageCount
UpdateDivider=300

[MeterUnreadMail]
Meter=STRING
MeasureName=MeasureUnreadMail
X=20
Y=20
Update=1000
FontSize=15
FontColor=255,255,255,255
AntiAlias=1
Text="Unread Mail: %1"
Try something like that, hopefully it runs as advertised. Make sure you sub your RegKey="" value for the example here though. :)
I'm not sure about the !Execute that you want to use... how did you want to implement the mail count into the skin?

//JoBu
User avatar
eXAKR
Posts: 30
Joined: January 11th, 2012, 12:22 pm

Re: Open Default E-mail Application

Post by eXAKR »

Basically it will be a simple widget with a mail icon that you can click to launch the application, with the unread mail count beside it. That's what I want it to do.
User avatar
JoBu
Posts: 271
Joined: February 16th, 2011, 12:46 am
Location: California

Re: Open Default E-mail Application

Post by JoBu »

Ah so... then add a few lines, like:

Code: Select all

[MeasureUnreadMail]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\Microsoft\Windows\CurrentVersion\UnreadMail\something@sympatico.ca
RegValue=MessageCount
UpdateDivider=300

[MeterEmailIcon]
Meter=IMAGE
ImageName=
ImageName=AddYourPath\Images\Icons\Thunderbird.jpg
X=20
Y=20
H=34
W=34

[MeterUnreadMail]
Meter=STRING
MeasureName=MeasureUnreadMail
X=5R
Y=r
Update=1000
FontSize=12
FontColor=255,255,255,255
AntiAlias=1
Text="Unread Mail: %1"
LeftMouseupAction=!Execute ["C:\path_to_app\app.exe"][!RainmeterRedraw]
Try something like that... change the file Height, Width and location info though. ;)

Cheers,

//JoBu
User avatar
eXAKR
Posts: 30
Joined: January 11th, 2012, 12:22 pm

Re: Open Default E-mail Application

Post by eXAKR »

Erm... nope. What I mean was using the Execute bang to execute the application defined in the registry value for "Application". I got a measure for that, but I can't find a way to parse it's value into an argument for the Execute bang.
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Open Default E-mail Application

Post by smurfier »

May we see what you have right now?
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
eXAKR
Posts: 30
Joined: January 11th, 2012, 12:22 pm

Re: Open Default E-mail Application

Post by eXAKR »

The code as of now:

Code: Select all

;Rainmeter configuration file

Author=eXAKR

;------------------------------------------------------

[Metadata]
Name=Mail - System
Config=Mail - System
Description=
Instructions=
Version=1.0
Tags=mail
License=
Variant=
Preview=


[Variables]
@include=#ROOTCONFIGPATH#@settings\Variables.inc

;------------------------------------------------------

[Rainmeter]
BackgroundMode=0
Update=1000


-------------------------------------------------------
[MeterBg]
Meter=IMAGE
ImageName=#ROOTCONFIGPATH#images/icon widget - dock left.png

[MeterBack]
Meter=STRING
X=58
Y=105
FontColor=86, 96, 96, 150
FontSize=8
StringAlign=CENTER
StringStyle=Normal
FontFace=Segoe UI
Text=
AntiAlias=1

[MeasureMail]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\Microsoft\Windows\CurrentVersion\UnreadMail\#Email#
RegValue=MessageCount
UpdateDivider=300

[MeasureMailAppName]
Measure=Registry
RegHKey=HKEY_CURRENT_USER
RegKey=Software\Microsoft\Windows\CurrentVersion\UnreadMail\#Email#
RegValue=Application
UpdateDivider=300

[MeterMailIcon]
Meter=IMAGE
ImageName=#SKINSPATH#gaia10/images/e-mail.png
X=12
Y=15
W=30
H=30
LeftMouseDownAction= !Execute ["#AppName#"]
DynamicVaraibles=1

[MeterMail]
Meter=STRING
MeasureName=MeasureMail
X=81
Y=15
;Text="-199°"
ClipString=1
W=70
H=27
FontFace=Segoe UI
FontColor=F6F6F6
StringStyle=BOLD
fontSize=17
StringAlign=CENTER
AntiAlias=1
User avatar
smurfier
Moderator
Posts: 1931
Joined: January 29th, 2010, 1:43 am
Location: Willmar, MN

Re: Open Default E-mail Application

Post by smurfier »

Assuming [MeasureMailAppName] returns the full path to the program, you can simply use this on a meter:
LeftMouseUpAction=!Execute [[MeasureMailAppName]]

Just don't forget to add DynamicVariables=1 to your meter.
GitHub | DeviantArt | Tumblr
This is the song that never ends. It just goes on and on my friends. Some people started singing it not knowing what it was, and they'll continue singing it forever just because . . .
User avatar
eXAKR
Posts: 30
Joined: January 11th, 2012, 12:22 pm

Re: Open Default E-mail Application

Post by eXAKR »

That worked. Thanks!