thinkpads.com Support Community Forum Index Bill Morrow's thinkpads.com Open Forum - The Original Thinkpad Support Forum
Follow ThinkpadsForum on Twitter
 Support this forum, shop at newmodeus.com
 Support the forum, shop at newmodeus.com
System backups occur about 7:00 am EDT and last about 10 minutes. This will slow performance. RSS feeds have been added to the forum.
Donate if you wish to:
bill at thinkpads dot com

It is currently Tue Jul 29, 2014 9:47 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 26 posts ] 
Author Message
PostPosted: Wed Nov 26, 2008 5:22 pm 
Offline
ThinkPadder
ThinkPadder

Joined: Thu Dec 06, 2007 3:17 pm
Posts: 1256
Location: NRW, Germany
Hi,

I would like to show you how to make the ThinkLight blink when you receive a mail in Thunderbird on Windows.

I had this working before on my T41 with XP using a Thunderbird extension called Yet Another Mail Biff which allows you to run an arbitrary program when an e-mail is received. I have used my own Python script to do the actual blinking.

It also worked on T60/XP. It stopped working when I got Vista. As it turned out, the Python script wasn't able to control the ThinkLight anymore because of a change in Lenovo drivers.

So I had a look at this today and as a result I have a small program, written in C this time, that does the blinking and it works on Vista without problems. It should work on XP too (it has additional code for the older way of doing this) but this is untested as I don't have XP on my ThinkPad anymore to test this.

If anyone with XP could test it, it would be cool.

So, here's how to set it up:

Download the ThinkLightYamb.exe file (this is the tool I wrote) and save it anywhere you like.

You can test the tool right now just by starting it. It should just blink the ThinkLight six times without opening any windows.

Download the Yet Another Mail Biff (YAMB) extension and install it.

Go to the YAMB config, open the file dialog and select the ThinkLightYamb.exe. Now if you press the Test button the ThinkLight should blink. You can now customize the blinking. Add a space and a number after the path. This is the number of times the light will blink. You can also add another number which is the speed (number of blinks per second).

The tool requires the Lenovo System Interface Driver to be installed for Vista or Hotkey utility for XP. If you have OSD for volume, brightness and the rest, you got it already.

Let me know what you think.

Cheers,
yak

BTW, if anyone is interested in ThinkLight control code, let me know. I have C source that can check if the ThinkLight is available, get its state (on/off) and set it of course.

-- EDIT --

A command line utility to control the ThinkLight has also been created:
ThinkLight.exe

Please note that the test release links found in following posts are dead now as the issued they are created to test were resolved.

_________________
ThinkPad™ X201 / AFFS-120
i5-560M 2.67Ghz, 8GB RAM, Samsung 840 Pro 256GB SSD, Win 8 Pro 64-bit, UltraBase X200, ThinkPad Compact USB Keyboard,
Dell U2713HM (2560x1440, IPS), ExpressCard USB 3.0 (2 ports, flush), Nexus 7+10


Last edited by yak on Mon Jan 26, 2009 5:35 pm, edited 2 times in total.

Top
 Profile  
 
PostPosted: Sat Nov 29, 2008 9:58 pm 
Offline

Joined: Wed Oct 26, 2005 8:57 pm
Posts: 5
Location: La Luz, NM
If I understand your post, running your program "Thinklightyamb.exe" should cause the Thinklight to blink 6 times. I'm running XP Pro on a R61i and the program doesn't seem to do anything when I run it.

It sounds like a great idea. I'm sorry it doesn't work on my machine.

John


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 29, 2008 11:02 pm 
Offline
ThinkPadder
ThinkPadder

Joined: Thu Dec 06, 2007 3:17 pm
Posts: 1256
Location: NRW, Germany
Yes, it should. If it doesn't then I've messed up something. Like I said, it was tested on Vista only which does this differently (the tool detects Vista internally). Thanks for the info, I'll investigate.

_________________
ThinkPad™ X201 / AFFS-120
i5-560M 2.67Ghz, 8GB RAM, Samsung 840 Pro 256GB SSD, Win 8 Pro 64-bit, UltraBase X200, ThinkPad Compact USB Keyboard,
Dell U2713HM (2560x1440, IPS), ExpressCard USB 3.0 (2 ports, flush), Nexus 7+10


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 03, 2008 12:36 pm 
Offline
Freshman Member

Joined: Sat Apr 26, 2008 9:09 pm
Posts: 87
Location: Java
I downloaded ThinklightYamb.exe, tested it on T42p and X60.
It doesn't work.
I'm running XP.

_________________
T60p[2.0/4G/MomentusXT/ABG/UXGA/W7]
Past:701c T23 T4 T6 X3 X4 X6s


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 03, 2008 12:55 pm 
Offline
ThinkPadder
ThinkPadder

Joined: Thu Dec 06, 2007 3:17 pm
Posts: 1256
Location: NRW, Germany
Yes, there's a bug when running on XP. I'll post here a new version as soon as I get some free time to make it.

_________________
ThinkPad™ X201 / AFFS-120
i5-560M 2.67Ghz, 8GB RAM, Samsung 840 Pro 256GB SSD, Win 8 Pro 64-bit, UltraBase X200, ThinkPad Compact USB Keyboard,
Dell U2713HM (2560x1440, IPS), ExpressCard USB 3.0 (2 ports, flush), Nexus 7+10


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 03, 2008 3:37 pm 
Offline
ThinkPadder
ThinkPadder

Joined: Fri Feb 29, 2008 2:45 pm
Posts: 1020
Location: Brooklyn, New York
I suppose it's asking too much to have this work for Windows Mail, or Windows Live Mail? ;)

I've tried Thunderbird before, but had issues with adding all my email accounts (mainly the hotmail ones). I also like the WM layout, which is still closer to Outlook Express, which I'm used to.

One other thing...if I had Thunderbird anyhow, is there a way to have the light blink indefinitely until the email is checked?

_________________
T61 - 6465CTO - T9500 - 15.4" LG WSXGA+ - 8GB OCZ- 120GB SSD - X3100 - Win 7 Ult 64-bit


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 03, 2008 4:35 pm 
Offline
ThinkPadder
ThinkPadder

Joined: Thu Dec 06, 2007 3:17 pm
Posts: 1256
Location: NRW, Germany
Here's the second release to be tested on XP. I've already tested on Vista, still works :).

ThinkLightYamb_r2.exe

Please, if you're going to test this, make sure you have the Lenovo Hotkey drivers installed.


Radioguy wrote:
I suppose it's asking too much to have this work for Windows Mail, or Windows Live Mail? ;)

I've tried Thunderbird before, but had issues with adding all my email accounts (mainly the hotmail ones). I also like the WM layout, which is still closer to Outlook Express, which I'm used to.

One other thing...if I had Thunderbird anyhow, is there a way to have the light blink indefinitely until the email is checked?


I've never used Windows Mail, Live Mail or Outlook so I don't know their expandability capabilities. What's needed is a way to start a program when an e-mail is received - that's what the YAMB Thunderbird extension gives us.

Your idea about indefinite blinking is nice but having it stop when the e-mail is read could be difficult. However, I think that blinking until user input is detected but for at least 3 seconds or so should be sufficient.

_________________
ThinkPad™ X201 / AFFS-120
i5-560M 2.67Ghz, 8GB RAM, Samsung 840 Pro 256GB SSD, Win 8 Pro 64-bit, UltraBase X200, ThinkPad Compact USB Keyboard,
Dell U2713HM (2560x1440, IPS), ExpressCard USB 3.0 (2 ports, flush), Nexus 7+10


Top
 Profile  
 
 Post subject: Thinklightyam
PostPosted: Wed Dec 03, 2008 6:13 pm 
Offline

Joined: Wed Oct 26, 2005 8:57 pm
Posts: 5
Location: La Luz, NM
Hi,

I tried version 2 of your program. I still don't get a blinking Thinklight running XP pro (SP-2). I do have the Lenovo System Interface Driver, or at least I have the OSD for volume, brightness and the rest.

Thank you for another attempt.

John


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 03, 2008 6:30 pm 
Offline
ThinkPadder
ThinkPadder

Joined: Fri Feb 29, 2008 2:45 pm
Posts: 1020
Location: Brooklyn, New York
yak wrote:
Your idea about indefinite blinking is nice but having it stop when the e-mail is read could be difficult. However, I think that blinking until user input is detected but for at least 3 seconds or so should be sufficient.


Actually, that's all that I should have asked for. Having it stop only when the mail is read is overkill. :)

I have no idea if WM or WLM have that same functionality, but if you have Vista, you at least have WL already. So do I, but I installed WLM and use that instead since I wanted the option of removing it if I wanted to.

I do know that when new mail is received in WLM, that a different icon appears in the taskbar (replacing the regular program icon). Perhaps that's something you could use to trigger the light?

_________________
T61 - 6465CTO - T9500 - 15.4" LG WSXGA+ - 8GB OCZ- 120GB SSD - X3100 - Win 7 Ult 64-bit


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 04, 2008 6:56 am 
Offline
ThinkPadder
ThinkPadder

Joined: Thu Dec 06, 2007 3:17 pm
Posts: 1256
Location: NRW, Germany
Another try.

ThinkLightYamb_r3.exe

This one also implements the Radioguy idea. It blinks until a mouse is moved or key is pressed. It can take up to two arguments, minimal number of blinks (default 6) and blinking speed (blinks per second, default 3).

Let me know if it finally works on XP. I really hope to get it working without switching HDDs in my ThinkPad and installing XP + drivers + development environment.

I've also written a small command line utility to control the ThinkLight based on the same control code used by the ThinkLightYamb.exe.

ThinkLight.exe

Just get to the command prompt and start it without any args. It will print out the usage instructions.

It can also help testing this on XP since unlike ThinkLightYamb.exe, it displays some error messages.

Radioguy, I'll try to take a look at Windows Mail if time permits.

_________________
ThinkPad™ X201 / AFFS-120
i5-560M 2.67Ghz, 8GB RAM, Samsung 840 Pro 256GB SSD, Win 8 Pro 64-bit, UltraBase X200, ThinkPad Compact USB Keyboard,
Dell U2713HM (2560x1440, IPS), ExpressCard USB 3.0 (2 ports, flush), Nexus 7+10


Top
 Profile  
 
 Post subject: Re: Thinklight.exe
PostPosted: Fri Dec 05, 2008 12:41 am 
Offline

Joined: Wed Oct 26, 2005 8:57 pm
Posts: 5
Location: La Luz, NM
It looks like the problem is on my end. I'll dig out my old A30 and see if it will work.

Using thinklight.exe I get the following:


C:\download\thinklight>thinklight toggle
Error: could not access the ThinkLight,are the drivers installed?

As my onscreen indicators are working, I'm not sure what drivers I should have installed.


John


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 05, 2008 9:31 am 
Offline
ThinkPadder
ThinkPadder

Joined: Thu Dec 06, 2007 3:17 pm
Posts: 1256
Location: NRW, Germany
I really hope I have this right this time.

ThinkLightYamb_r4.exe
ThinkLight_r2.exe

Let me know. And thanks for testing.

@jworman

The Hotkey drivers which you obviously have installed if you have the on screen indicators. The error you got is a result of a bug in my tool. Please try the new version.

_________________
ThinkPad™ X201 / AFFS-120
i5-560M 2.67Ghz, 8GB RAM, Samsung 840 Pro 256GB SSD, Win 8 Pro 64-bit, UltraBase X200, ThinkPad Compact USB Keyboard,
Dell U2713HM (2560x1440, IPS), ExpressCard USB 3.0 (2 ports, flush), Nexus 7+10


Top
 Profile  
 
 Post subject: Re: Thinklight.exe
PostPosted: Fri Dec 05, 2008 11:40 am 
Offline

Joined: Wed Oct 26, 2005 8:57 pm
Posts: 5
Location: La Luz, NM
You certainly do have it right with V4 (and V2 of Thinklight.exe).

Running ThinklightYamb_r4.exe from windows causes the light to blink about 30 times.

Running ThinklightR_2.exe from the command line with arguments works just as you said it would.

Thank you for fixing these programs so they will work for us old fuddys that refuse to move to Vista.

John


Top
 Profile  
 
 Post subject: Re: Thinklight.exe
PostPosted: Fri Dec 05, 2008 11:46 am 
Offline

Joined: Wed Oct 26, 2005 8:57 pm
Posts: 5
Location: La Luz, NM
Hi,

Now when I run ThinkLightyamb_r4 it blinks 6 times like you originally said it would. I don't know where the 30 times I got earlier came from. It doesn't matter, as it does blink very nicely.

Thanks again.

John


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 05, 2008 3:44 pm 
Offline
ThinkPadder
ThinkPadder

Joined: Thu Dec 06, 2007 3:17 pm
Posts: 1256
Location: NRW, Germany
Finally :). Thanks for testing.

The ThinkLightYamb_r4.exe blinks at least 6 times. If you won't move the mouse or press any keys it will blink until you do so. The minimal number of blinks can be changed by passing a value as argument, for example by running from command line (or from Thunderbird's YAMB extension, as it's supposed to be used). A second argument can also be passed which tells how many times per second should the LED blink, i.e. it is the speed of blinking.

So, since it finally works, I've removed all these various test releases (links won't work anymore). Here are the final ones:

ThinkLightYamb.exe
ThinkLight.exe

_________________
ThinkPad™ X201 / AFFS-120
i5-560M 2.67Ghz, 8GB RAM, Samsung 840 Pro 256GB SSD, Win 8 Pro 64-bit, UltraBase X200, ThinkPad Compact USB Keyboard,
Dell U2713HM (2560x1440, IPS), ExpressCard USB 3.0 (2 ports, flush), Nexus 7+10


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 05, 2008 6:29 pm 
Offline
Freshman Member

Joined: Sat Apr 26, 2008 9:09 pm
Posts: 87
Location: Java
Nice work done...
Tested on X60, XP SP3. Works well.

Thank you

_________________
T60p[2.0/4G/MomentusXT/ABG/UXGA/W7]
Past:701c T23 T4 T6 X3 X4 X6s


Top
 Profile  
 
PostPosted: Tue Sep 15, 2009 4:04 pm 
Offline
ThinkPadder
ThinkPadder

Joined: Thu Dec 06, 2007 3:17 pm
Posts: 1256
Location: NRW, Germany
The ThinkLightYamb.exe file has been updated.

In the new version if no user input (keypress, mouse movement) is detected for 60s, the blinking is slowed down. This means that if you're away, the light won't be blinking in techno-rythm for several hours :).

_________________
ThinkPad™ X201 / AFFS-120
i5-560M 2.67Ghz, 8GB RAM, Samsung 840 Pro 256GB SSD, Win 8 Pro 64-bit, UltraBase X200, ThinkPad Compact USB Keyboard,
Dell U2713HM (2560x1440, IPS), ExpressCard USB 3.0 (2 ports, flush), Nexus 7+10


Top
 Profile  
 
PostPosted: Sat Sep 26, 2009 9:23 am 
Offline
Freshman Member

Joined: Fri Oct 17, 2008 8:43 pm
Posts: 52
Location: Tallahassee, FL
First off, nice app and thanks for sharing.

Second, any ideas/leads on a similar app for firefox (specifically Gmail)?

I remember there was an app that did this exact same thing but it was for Pigdin (IM client) but only worked under Linux. Needless to say, I was pretty jealous of my friend's laptop having the feature.

Hope springs eternal.

D

_________________
Simple is as simple does.


Top
 Profile  
 
PostPosted: Sun Jan 31, 2010 7:25 pm 
Offline
Freshman Member

Joined: Sat Jan 09, 2010 10:40 pm
Posts: 74
Location: Brooklyn NY
the topic is kinda old but... is there any script to integrate it with MSN Messenger

_________________

Today: Apple MacBook Pro 13 (Late 2011)
In past: T400s , X300 , T400 (P8400) , X41 Tablet and R52


Top
 Profile  
 
PostPosted: Sun Jan 31, 2010 9:15 pm 
Offline
ThinkPadder
ThinkPadder

Joined: Thu Dec 06, 2007 3:17 pm
Posts: 1256
Location: NRW, Germany
I don't know. The whole thing consists of a small tool that blinks the ThinkLight and a Thunderbird extension that allows you to run executable files when a mail is received. To make the ThinkLight bink on any other event, you have to find a way to run the blinking tool when this event takes place. I don't know if MSN has such an option, probably not.

_________________
ThinkPad™ X201 / AFFS-120
i5-560M 2.67Ghz, 8GB RAM, Samsung 840 Pro 256GB SSD, Win 8 Pro 64-bit, UltraBase X200, ThinkPad Compact USB Keyboard,
Dell U2713HM (2560x1440, IPS), ExpressCard USB 3.0 (2 ports, flush), Nexus 7+10


Top
 Profile  
 
PostPosted: Tue Feb 02, 2010 5:25 pm 
Offline
ThinkPadder
ThinkPadder

Joined: Fri Feb 29, 2008 2:45 pm
Posts: 1020
Location: Brooklyn, New York
Alas, I still haven't weened myself off WLM to TB. Plus, I still don't know of a way to start a program from within WM or WLM once mail is received, short of the fact they change the taskbar icon once it has.

_________________
T61 - 6465CTO - T9500 - 15.4" LG WSXGA+ - 8GB OCZ- 120GB SSD - X3100 - Win 7 Ult 64-bit


Top
 Profile  
 
PostPosted: Sun Nov 14, 2010 3:16 pm 
Offline
Sophomore Member

Joined: Mon Sep 07, 2009 11:02 am
Posts: 172
Location: Copenhagen, Denmark
first of all, this is an awesome idea, it is beyond me why we don't have more control over the leds on our machine in the first place (eg, the ability to turn off ALL leds for moviewatching as well as setting up LEDS and thinklight to trigger on different events)
Any new development on this topic? I'd love to help but alas my coding skills are very limited..
My intuition tells me that implementing gmail support should be easy since many desktopapps (eg rainmeter) seem to be able to get reads easily?
Either way, I don't really understand the current limits of your programs application?
Does it only work with thunder?
Wanna share the source so I can find someone to develop for it? Do you have time to play with a few other ideas of implementation, such as skype, msn or the likes?
Or perhaps warning blinks on critical temperatures in conjunction with tpfancontrol? Perhaps the auther of the latter could be persuaded to implement thinklight as a feature?

Anyways, thanks alot for the work!

_________________
W530 FHD - 32GB Ram - K2000m - 240GB Intel 520 |
Modded T61| Echo Audiofire4-Phillips IPS | Win7Ux64
---
daybreak broke me loose and brought me back...


Top
 Profile  
 
PostPosted: Sun Nov 14, 2010 4:32 pm 
Offline
Sophomore Member

Joined: Mon Sep 07, 2009 11:02 am
Posts: 172
Location: Copenhagen, Denmark
hmm can't seem to get it to work in conjunction with Thunderbird.. Fresh Thunderinstall, everything seems to work, app launches when I click "test" but not when a new message arrives.. any ideas? Using Win 7 64U with UAC on lvl 2 :)

_________________
W530 FHD - 32GB Ram - K2000m - 240GB Intel 520 |
Modded T61| Echo Audiofire4-Phillips IPS | Win7Ux64
---
daybreak broke me loose and brought me back...


Top
 Profile  
 
PostPosted: Sun Nov 14, 2010 5:16 pm 
Offline
ThinkPadder
ThinkPadder

Joined: Thu Dec 06, 2007 3:17 pm
Posts: 1256
Location: NRW, Germany
As this is not the first time I'm asked for the source of the code controlling the ThinkLight, here it is for anyone to download (published under Apache 2.0 license):
http://arkadiusz.wahlig.eu/download/thinklightlib.zip

This contains a .c and .h files that provide a small set of functions for detecting ThinkLight availability and state as well as changing the state. This code is the result of above tests on different Windows versions and hides a lot of low level communications with drivers.

Now, to notify the user about some event using the ThinkLight, apart from this code one needs a way to detect the actual event. Skype, for example, has an API that lets you set it up to send notifications about incoming calls/messages to your program so it can blink the light. Other apps may lack such an API and thus pose a bigger problem.

The Thunderbird use case I used is based on a slightly different approach. The ThinkLightYamb.exe is just a small program that blinks the light using the above code. In itself, it doesn't have anything to do with Thunderbird. To connect this and Thunderbird I used a special extension (a plugin, just like extensions for Firefox) called YAMB that lets you start any program when mail arrive.

eyeland wrote:
hmm can't seem to get it to work in conjunction with Thunderbird.. Fresh Thunderinstall, everything seems to work, app launches when I click "test" but not when a new message arrives.. any ideas? Using Win 7 64U with UAC on lvl 2 :)

Be sure to check the checkboxes for various folders in the settings. Check them all first, click OK and try sending yourself a mail.

_________________
ThinkPad™ X201 / AFFS-120
i5-560M 2.67Ghz, 8GB RAM, Samsung 840 Pro 256GB SSD, Win 8 Pro 64-bit, UltraBase X200, ThinkPad Compact USB Keyboard,
Dell U2713HM (2560x1440, IPS), ExpressCard USB 3.0 (2 ports, flush), Nexus 7+10


Top
 Profile  
 
PostPosted: Thu Nov 18, 2010 12:10 pm 
Offline
Sophomore Member

Joined: Mon Sep 07, 2009 11:02 am
Posts: 172
Location: Copenhagen, Denmark
Quote:
Be sure to check the checkboxes for various folders in the settings. Check them all first, click OK and try sending yourself a mail.


I looked at the settings, asd everything was checked appart from "only inbox" and "convert to utf-8"
Still doesn't work, odd

_________________
W530 FHD - 32GB Ram - K2000m - 240GB Intel 520 |
Modded T61| Echo Audiofire4-Phillips IPS | Win7Ux64
---
daybreak broke me loose and brought me back...


Top
 Profile  
 
PostPosted: Thu Nov 18, 2010 1:21 pm 
Offline
Sophomore Member

Joined: Mon Sep 07, 2009 11:02 am
Posts: 172
Location: Copenhagen, Denmark
Quote:
Skype, for example, has an API that lets you set it up to send notifications about incoming calls/messages to your program so it can blink the light.

I cannot for the life of me find any such app for skype, mind dropping a link? :)

_________________
W530 FHD - 32GB Ram - K2000m - 240GB Intel 520 |
Modded T61| Echo Audiofire4-Phillips IPS | Win7Ux64
---
daybreak broke me loose and brought me back...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 26 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group