Using Scrolllock as Message Notifier (no blink)

General discussion about PopTray. You love it? You hate it? Talk about it here.

Moderators: KY Dave, jojobear99, Rdsok

Post Reply
p.parker
First Timer
Posts: 1
Joined: Sun Mar 01, 2009 11:42 pm

Using Scrolllock as Message Notifier (no blink)

Post by p.parker » Sat Mar 14, 2009 9:02 pm

First of all: I love PopTray :D
And sry for bad english...

I searched a solution, that my scrolllock LED will turn on if i receive an mail.
I know there is a plugin... but i don't like the flashing...

So i found a way to simulate the keypress with a tiny VB-Script.
Then i made 2 small batch scripts to get it work.

Because i have no idea how to turn the LED off, if there is no mail stored in PopTray, you have to run a script to do it.

Now the codes:

(Create files with Right-Click -Y New -> Text File , then rename)
1. Create the VB-Script "scrollock.vbs"

Code: Select all

dim WshShell
set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "{SCROLLLOCK}"
2. Batch-Script "Email.bat"

Code: Select all

IF exist D:\Programs\newmail.txt GOTO END
D:\programs\scrolllock.vbs
Mail>>D:\Programs\newmail.txt
:END
3. Batch-Script "Email off.bat"

Code: Select all

IF exist D:\Programs\newmail.txt GOTO DOIT
GOTO END
:DOIT
del D:\Programs\newmail.txt
D:\programs\scrolllock.vbs
:END
You can edit the Paths as you like... Make sure scrolllock.vbs is stored there...

Now you have to set a Rule in PopTray like this:
Image

To turn LED off you have to run the Script "Mail off.bat".
Do not just press the Scrolllock Button ;)

I know it's not the best solution, but so far its a good way for me.
If you have any improvement suggestions let me know :)

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests