Improvement requests :  K-Meleon Forum
Use this forum to talk about a feature you're missing. Use the bug tracker to report it if necessary. 
Flash newly opened window
Posted by: Garth
Date: April 25, 2011 11:01PM

Hello,

K-Meleon is a wonderful piece of software and many thanks to the developers.

I would like the ability to write a macro that flashes newly opened windows in the taskbar. By flashing, I mean what the download progress dialog does when the download is complete (there is a "Flash the progress dialog" setting under "File Handling" in the preferences).

I think I could write this macro if I had a new macro Command ID to tell a window to flash. I could include this macro in $OnOpenWindow.

I don't want to the window to flash on and off, but simply change color and stay that way until it receives focus, just like the download progress dialog.

Thank you for any help or suggestions.

Garth

Options: ReplyQuote
Re: Flash newly opened window
Posted by: Garth
Date: April 25, 2011 11:05PM

By the way, I will obviously use this for windows opened in the background.

Options: ReplyQuote
Re: Flash newly opened window
Posted by: JamesD
Date: May 02, 2011 07:21PM

I don't think we have the ability to change colors. Could an audible notification help? I have an old system in the MacroLibrary http://kmeleon.sourceforge.net/wiki/KmmPgLdSound.

I think there is also a newer system in Extensions, but I forget its name.

Options: ReplyQuote
Re: Flash newly opened window
Posted by: Garth
Date: May 02, 2011 09:51PM

Thanks for the reply. By change color I simply mean become highlighted in the taskbar. I don't mean change different colors.

Windows does this for windows that want your attention.

K-Meleon asks Windows to do it for the download progress dialog when the download is complete. The taskbar item turns orange, notifying me that the download is complete. It becomes transparent again when I give the window focus.

You see, I use K-Meleon as an SDI application: no tabs. I use the Windows taskbar, oriented vertically, as my "tab bar." If I could cause newly opened background windows to flash, I would know which windows I hadn't viewed since opening them.

If someone could point me to the part of the source that causes the download progress dialog to flash, maybe I could figure this out myself and submit a patch creating a new Command ID.

Thanks.

Options: ReplyQuote
Re: Flash newly opened window
Posted by: disrupted
Date: May 03, 2011 06:29PM
Options: ReplyQuote
Re: Flash newly opened window
Posted by: Garth
Date: May 04, 2011 03:37AM

Thank you for the reply.

I copied the files you sent into my 1.6.0 alpha 4 installation.

This is encouraging and a really excellent start. The comments below are meant in a purely constructive way.

1) The decision about which window to flash appears to be done by a string match on the window title. This means that if I open a new background window and the title of the new page is the same as the page I'm on, my *current* window will flash briefly, and the new one will not flash at all. I might be wrong about why this is occuring, but is there some other way to decide which window to flash?

2) The trigger for the flashing appears to be the loading or rendering of documents *within* the window, not the actual *creation* of the window. This means that on web sites with lots of iframes or other subcomponents, like nytimes.com, the flashing behavior will start and stop sporadically for many seconds until all the iframes or other subcomponents are loaded. On simple web sites without iframes or other subcomponents, like this forum, the flashing works perfectly. I would prefer that the flashing be triggered by the creation of the window.

3) The test version creates real flashing: on off on off on off then finally on/highlighted. I would prefer the kind of "flashing" of the download progress: on/highlighted immediately, with no on-off. Is there a way to control the number of flashes before the final "on"?

Number 2 might be fixed automatically if number 3 is fixed, because if there is no on-off to see, then the effect in (2) might not be visible.

Thanks again.

Options: ReplyQuote
Re: Flash newly opened window
Posted by: disrupted
Date: May 04, 2011 03:54AM

no. 3 is fixable easily, no.2 is linked to number 1 because it's using autoit we need the window title to know which one to flash so it's triggered after pageload and not on opennewiwndow because otherwise the title will not be fetched before it's passed to autoit and then it won't know what window to flash or flash the main one from which the link was originally opened, as you have noticed the drawback is that if 2 windows have same title, the script will flash the first instance.

i'm not sure yet how to fix no.1 by using title and instances but it's doable , we will need to get winhandle as well..that will fix the error of same title windows. might also be a way to trigger on creation and not wait for title to be passed from kmeleon by combining instance and handle but will require some brainstorming, i will try to work on it tomorrow or at weekend... but it's a start as you said, that's why it's in pends folder, not final

Options: ReplyQuote
Re: Flash newly opened window
Posted by: sirfoobar
Date: May 04, 2011 06:42AM

Sounds great. I understand the issues. Looking forward to your next version. Thanks for taking this on.

(This is Garth - signed up for a forum username.)

Options: ReplyQuote
Re: Flash newly opened window
Posted by: disrupted(unlogged)
Date: May 05, 2011 02:22AM

slight update http://kmext.sourceforge.net/pends/kmwinflash.7z
this just fixes no.3. clear cache before downloading

Options: ReplyQuote


K-Meleon forum is powered by Phorum.