Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 08, 2016, 10:14:41 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Focus-Unfocus and let me link  (Read 7948 times)

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Focus-Unfocus and let me link
« on: January 11, 2014, 09:51:57 AM »
Focus-Unfocus and let me link

I have an addon or script that give the possibility to make a window over all the other ones.

But I need to activate the window manually with my mouse.

Very often, from Thunderbird, I need to launch links in the messages and sistematically activate the window where the link is. sometimes this is good for me.
But many other times i would like first launch the links i am selecting without lose focus in the TB window.

So. I would like a script able to pin up the window TB, launch the link, and pin down the window (lose focus).
If in the next link i need to go to the browser then i will apply the ordinary launch loosing the focus.
So i will a script able to do this with a configurable hotkey.
Even the executable script without hotkey is useful to me. Because after i can assign a hotkey to the script.

Is this possible ?
Best Regards

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,474
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #1 on: January 11, 2014, 10:38:58 PM »
DeskAngel

2014-01-12 15_37_28.pngFocus-Unfocus and let me link

Right-click the titlebar of any window to enable/disable topmost function.

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #2 on: January 12, 2014, 08:14:58 AM »
DeskAngel
 (see attachment in previous post)
Right-click the titlebar of any window to enable/disable topmost function.
But don't automate. I have a similar solution. I would a script to do that.
I continue trying
best regards
 :-*

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #3 on: January 12, 2014, 10:35:21 AM »
I have this script i have assigned Control+spacebar

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn  ; Recommended for catching common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
^SPACE:: Winset, Alwaysontop, , A

But I would like to know when the pin or force to window on top is active and when not.
How can I do that ?

Best Regards
 :-*

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #4 on: January 12, 2014, 10:39:42 AM »
I have adapte with
#singleinstance off
because when I launched received a message about that condition
The problem to determine if the window is always on top is that the script don't affect instanly in the pin that i have with other addon
 :-*

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #5 on: January 12, 2014, 10:44:49 AM »
ohhh the addon that pins the windows on top in my case is FileBox eXtender
 :-*


Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #6 on: January 12, 2014, 02:58:26 PM »
Rarely i have a window on top occupying all the screen space. So I would like a little command to show in the right side of my screen if a window is on top or not.
How can i do that ?

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 6,141
  • Slartibartfarst
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #7 on: January 12, 2014, 08:17:25 PM »
I have had a similar requirement ("nice-to-have") for ages: Looking at a window, how does one know whether it is topmost (always on top) or not?
I used to have a FREE proggy from ZD-Net that you could use to "Pin" a window and make it topmost, and the window then displayed a small icon in the title bar of a red thumbtack to show that it was topmost.
It doesn't work in modern-day Windows.

Nowadays I use an AHK toggle switch to toggle topmost on/off for any window. The switch briefly displays a message that "Topmost is ON" or "Topmost is OFF", but that is ergonomically not as efficient as having a constantly visible red thumbtack when ON.
I have been meaning to add the red thumbtack to the AHK hotkey, but have not got around to it yet...

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #8 on: January 13, 2014, 04:49:34 PM »
I ask Miles Ahead to try in this thread :

http://www.donationc...?topic=37004.new#new


MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,286
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #9 on: January 13, 2014, 05:08:51 PM »
Take a look at this script.  It changes the program icon to show when topmost is set.
http://www.autohotke...2Bbutton#entry596565

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #10 on: January 13, 2014, 05:22:10 PM »
Take a look at this script.  It changes the program icon to show when topmost is set.
http://www.autohotke...2Bbutton#entry596565

running to try
 :-*

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #11 on: January 13, 2014, 05:29:48 PM »
By the way. Seems use the library COM

f4::
newIcon:="E:\go-top.ico"  ;16x16 icon file

WinGet, winID,id,A

WinGet, ExStyle, ExStyle, ahk_id %winID%
if (ExStyle & 0x8)  ; 0x8 is WS_EX_TOPMOST.
    {
    soundbeep  ;just for debugging
    WinSet, alwaysontop,off,ahk_id %winID%
    SendMessage, 0x80, 0, 0,, ahk_id %winID%  ; (0x80 is WM_SETICON).
    return
    }
else
    {
    WinSet, alwaysontop,on,ahk_id %winID%
    hIcon := DllCall("LoadImage", uint, 0, str, newIcon,uint, 1, int, 0, int, 0, uint, 0x10)  
    SendMessage, 0x80, 0, hIcon,, ahk_id %winID%  ; (0x80 is WM_SETICON).
    }
return


I was trying this afternoon to obtain the COM library for facebook logins, but the links were broken.....

I tell for DllCall. I am not sure of course. ....

 :-[

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #12 on: January 13, 2014, 05:32:59 PM »
I don't see changes with the script above truly .... :(

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,286
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #13 on: January 13, 2014, 06:00:37 PM »
I don't see changes with the script above truly .... :(

It changes the system menu icon(left corner of title bar) but of course you must use a path to a real .ico file. It probably doesn't check for errors as it's just a bare shell.

Edit: I ran it on my system using desktop.ico as the icon and it changed the system menu icon for me.


f4::
newIcon:="C:\Program Files\AutoHotkey\Scripts\Desktop.ico"

WinGet, winID,id,A

WinGet, ExStyle, ExStyle, ahk_id %winID%
if (ExStyle & 0x8)  ; 0x8 is WS_EX_TOPMOST.
    {
    soundbeep  ;just for debugging
    WinSet, alwaysontop,off,ahk_id %winID%
    SendMessage, 0x80, 0, 0,, ahk_id %winID%  ; (0x80 is WM_SETICON).
    return
    }
else
    {
    WinSet, alwaysontop,on,ahk_id %winID%
    hIcon := DllCall("LoadImage", uint, 0, str, newIcon,uint, 1, int, 0, int, 0, uint, 0x10)  
    SendMessage, 0x80, 0, hIcon,, ahk_id %winID%  ; (0x80 is WM_SETICON).
    }
return

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #14 on: January 13, 2014, 06:08:04 PM »
Owwww. I was looking for the COM library, but seems is in Autohotkey_L from several years ago.

Running to try Miles.
Can i use any ico file ?

 :P

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #15 on: January 13, 2014, 06:10:20 PM »
Mmmmmm. I observ another problema before trying to change the icon.
I have so many autohotkey standard residents with the H icon that usually don't are in the icon tray .

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #16 on: January 13, 2014, 06:17:37 PM »
Can you show me an screenshot of that icon ?

 :-[

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #17 on: January 13, 2014, 06:20:59 PM »
Ohhh i see i see.
but only when press F4
and always do. Even if the pin is off . For that purpose I have FileBox eXtender
But really all this is because when I put a window on top FileBox eXtender don't react quickly and don't show me the change.
That because i need a truly effective indicator. Filebox eXtender goes well when click the pin on the right side of the title bar with a mouse click.
 :-[

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #18 on: January 13, 2014, 06:25:00 PM »
And is always a hotkey more.....
F4
or a mouse click
what I am really trying to get is with only one hotkey - by example launching the link selected in TB email client - will active the window on top and launch in the browser the link selected and when finished let the window normal......
If I use again the hotkey to launch maintaining on top the active window i will obtain other launched link in the browser remaining in the window on top.
But when i only want o launch the link, then simply i will click the mouse to launch the link. And i need the window not in top.

Can you understand me please ?

Best Regards
 :-[

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 6,141
  • Slartibartfarst
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #19 on: January 13, 2014, 07:11:05 PM »
@MilesAhead: Thanks for the link re AHK AlwaysOnTop discussion.
I think I might have read that ages ago, and come to the conclusion that what I wanted to do wouldn't be simple, so dropped it into the "Later" basket.

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #20 on: January 13, 2014, 07:35:45 PM »
@MilesAhead: Thanks for the link re AHK AlwaysOnTop discussion.
I think I might have read that ages ago, and come to the conclusion that what I wanted to do wouldn't be simple, so dropped it into the "Later" basket.

But is an additional help. I am using from now. Even I would like a different beep when activate. Not only the deactivation beep.
In seven the new icon remain always in the task bar until the program represented is closed.
So you can have several icons in the task bar representing the window on top at the same time.


MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,286
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #21 on: January 14, 2014, 09:20:48 AM »
Quote
So you can have several icons in the task bar representing the window on top at the same time.


Right.  The thing with that board is it's not obvious when the posts are posted.  From reading I got the impression they were still working on a fix. But since the last post was by someone last active back in June I guess not.  I wish they would just put the date of the post in bold and make it easy on me. :)

Edit: the trouble with adding custom buttons to the titlebar is there is nearly always some side-effect that makes something unstable.  Plus Windows has weird ideas of what "on top" means.  Some jazz to do with the group the window is in or the process that owns it or some non-obvious complication that makes what should be simple, not so...   :)

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 6,141
  • Slartibartfarst
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #22 on: January 14, 2014, 10:10:11 AM »
Just out of interest, and for information, the proggy from ZD-Net that I was thinking of (see above in thread) was DeskPins. I had uninstalled it a while back and put it in the "Obsolete" archive, as it did not seem to run on dual CPUs under XP.
EDIT 2014-01-15 0539hrs: Here's the program and Help etc. (freely distributable per licence) -  DeskPins v1.30.zip

Here's a screenshot:

Deskpins OnTop screenshot.jpg


From the Readme.txt file:
Quote
                           DeskPins v1.30
                            --------------
            Freeware, Copyright © 2002-2004 by Elias Fotinis
                        Released on 2004.05.03

                    Email: efotinis@pat.forthnet.gr
             Website: http://users.forthnet.gr/pat/efotinis/


Description
-----------
DeskPins can be used to make any application topmost, that is, to keep it
above all other windows. Just grab a pin from the DeskPins icon in the system
notification area (a.k.a. taskbar tray) and click on any window. This
functionality is identical to the "Always on Top" setting found in some
programs. With DeskPins you can add this feature to any program!

Features
--------
* Unlimited number of pins available.
* Intelligent handling of various application types.
* Powerful wildcard-based automatic pin support.
* Global hotkeys.
* Negligible system resources usage.

System Requirements
-------------------
DeskPins is not a demanding program and will run on practically any system
with Windows installed.

* Windows 95, 98, ME, NT, 2000, XP, 2003.
* 386/10MHz class CPU or higher
* 4 MB RAM
* less than 200 KB of free disk space
* 4 bpp (16 colors) minimum - 8 bpp (256 colors) or more recommended

Installation
------------
Launch the setup EXE. The installer will guide you through the installation
process.

Uninstall
---------
To uninstall DeskPins, select the Uninstall item in the DeskPins program group
in the Start menu, or use the DeskPins entry in the Add/Remove Programs applet
of the Control Panel.

The uninstaller will remove the program folder and the following Registry
keys:
  HKEY_LOCAL_MACHINE\Software\Elias Fotinis\DeskPins
  HKEY_CURRENT_USER\Software\Elias Fotinis\DeskPins
___________________________
« Last Edit: January 14, 2014, 10:45:13 AM by IainB, Reason: Gave link to download DeskPins proggy. »

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #23 on: January 14, 2014, 10:56:33 AM »
Quote
So you can have several icons in the task bar representing the window on top at the same time.


Right.  The thing with that board is it's not obvious when the posts are posted.  From reading I got the impression they were still working on a fix. But since the last post was by someone last active back in June I guess not.  I wish they would just put the date of the post in bold and make it easy on me. :)

Edit: the trouble with adding custom buttons to the titlebar is there is nearly always some side-effect that makes something unstable.  Plus Windows has weird ideas of what "on top" means.  Some jazz to do with the group the window is in or the process that owns it or some non-obvious complication that makes what should be simple, not so...   :)

So. Nothing to do ?
 :-[

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,286
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Focus-Unfocus and let me link
« Reply #24 on: January 14, 2014, 11:27:24 AM »
Quote
So. Nothing to do ?

Taskbar is notorious for not responding to changes is displayed programs.  That's probably why it was never fixed.  Another reason why I don't like to alter windows and just put the Tooltip when I did my stay on top.  All the features are nice until Explorer crashes.