Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Auto-raise / mouse hover


  • Please log in to reply
96 replies to this topic
Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
The script does not differentiate between types of pointing devices. If the cursor isn't moving, it's hovering. If it's not hovering, it must be moving. There certainly isn't any way that I know of to detect whether your finger is on the touchpad (except by the fact that the mouse is moving...)

user
  • Members
  • 476 posts
  • Last active: Dec 23 2011 07:18 PM
  • Joined: 05 Oct 2006

The script does not differentiate between types of pointing devices. If the cursor isn't moving, it's hovering. If it's not hovering, it must be moving. There certainly isn't any way that I know of to detect whether your finger is on the touchpad (except by the fact that the mouse is moving...)


mmm, but I have the finger on the touchpad but the cursor doesnt move (I dont move the finger)...

very strange...

unfortunately, it seems the best is not to have this behaviour and to activate a window even if I dont release the touchpad (because since we have to do that, it is almost as if we click it)

can anyone touchpad user confirm this?

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

If it's not hovering, it must be moving.

The script only detects "hover" when the mouse hasn't moved, but I had forgotten that it uses an idle time check to implement the hover delay. Perhaps your touchpad generates some other event besides movement, which is resetting A_TimeIdle. Try running this script:
Loop {

  MouseGetPos, x, y

  ToolTip, %A_TimeIdle%`n%A_TimeIdlePhysical%`n%x%`, %y%

  Sleep, 30 

}
This shows the idle time, physical idle time and mouse position. If the idle time goes above 500 (or whatever you have hover_delay set to) and the mouse position hasn't changed, hover should trigger. Let me know if the idle time doesn't go above 500 while your finger is on the touchpad (assuming the mouse position doesn't change at all.)

user
  • Members
  • 476 posts
  • Last active: Dec 23 2011 07:18 PM
  • Joined: 05 Oct 2006

If the idle time goes above 500 (or whatever you have hover_delay set to) and the mouse position hasn't changed, hover should trigger. Let me know if the idle time doesn't go above 500 while your finger is on the touchpad (assuming the mouse position doesn't change at all.)


the idle time doesn't go above 500 while the finger is on the touchpad (and the cursor position doesn't change at all.)

it goes at the time I release the mouse

PS: however, the touchpad may send some minimal information as the finger is on it (there maybe some microscopical movement as well??)

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
Try replacing hovercheck with this:
hovercheck:
    MouseGetPos, x, y
    if (x != lastx or y != lasty)
    {
        SetTimer, hovering, % -hover_delay
        lastx := x
        lasty := y

        if (remove_ttip_on_move)
        {
            ToolTip
            remove_ttip_on_move := false
        }
    }
return
It uses a timer instead of checking A_IdleTime.

Btw, "microscopic movement" wouldn't be detected, as long as the cursor doesn't move.

user
  • Members
  • 476 posts
  • Last active: Dec 23 2011 07:18 PM
  • Joined: 05 Oct 2006
it works marvelously thanks :)

EDIT1:

mm it should NOT trigger window activation when you click an activated button in order to move it to the background and the cursor stays inside that button (it should trigger it if the cursor moves out of the button and then move inside)

<!-- m -->http://video.tinypic...r.php?v=520mfmf<!-- m -->

as you can see it the above video I click the activated button in order to drop it in the background

while the cursor is still inside the specific button area, it triggers (after hovering) the activation of this specific button

this should not be done

can you fix this please ?

EDIT2:

can you add the feature to minimize the active window (that its button is clicked) or all the windows, when hovering over the empty space of the taskbar? or when hovering somewhere else (eg the show desktop link in the quickstart bar)

the hover time must be bigger than the 'hover to activate the window' time

EDIT3:

there is an annoyance that I cant image how it can be fixed: many times the cursor may move below the button of a window, so the script wont trigger its activation

<!-- m -->http://video.tinypic...p?v=6c4lvk7&s=1<!-- m -->

is there a way to prevent this? either to make the script to trigger the activation when the cursor is there, or to prohibit cursor to be there

EDIT4:

I use this marvelous script with the tweakui's xmouse
this will focus (and activate if you choose the option) when the mouse hovers inside a window (it does nothing to do with its taskbar button)

the way it works is not convenient, because during the time you move the cursor from a resized window, down to the taskbar, it activates the background fullsized window

to prevent this happening, the tweakui is supposed you to adjust the hover time, but this is not a good solution, because it is not implemented well:

the hover time starts counting from the time you are inside a window, while the best would be the hover time starts counting from the time you are inside a window and you stop moving the cursor

also, it would be very nice to trigger window activation (speaking about the windows' area, not their taskbar buttons) when you release the finger from the touchpad inside the window (maybe as an option)

can you implement this please?

this script is and will be the finest xmouse implementation in winxp afaik

thanks

Sridhar
  • Guests
  • Last active:
  • Joined: --
Lexikos, I am here to tell you that script works just fine even for Office 2007 applications. I was earlier hovering over a minimized Word 2007 window and thought the script doesn't work. But after reading your instruction to set "hover_task_min_info = 0", everything works great. I wonder why that setting is not the default.

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

mm it should NOT trigger window activation when you click an activated button in order to move it to the background and the cursor stays inside that button

I agree. This does the trick:
~LButton::
~RButton::
~MButton::
    MouseGetPos, lastx, lasty
return
(Script updated)

can you add the feature to minimize the active window (that its button is clicked) or all the windows, when hovering over the empty space of the taskbar?

Request noted.

I use this marvelous script with the tweakui's xmouse
this will focus (and activate if you choose the option) when the mouse hovers inside a window (it does nothing to do with its taskbar button)

the way it works is not convenient, because during the time you move the cursor from a resized window, down to the taskbar, it activates the background fullsized window

Perhaps you have not noticed the 'hover_any_window' option in the script...

many times the cursor may move below the button of a window, so the script wont trigger its activation

I cannot reproduce this. I expect xmouse is activating the taskbar. The same applied to the 'hover_any_window' option of the script (when not hovering over a button.) I've added an exception for the taskbar, so it's now really 'hover_any_window_except_the_taskbar'. ;)

also, it would be very nice to trigger window activation (speaking about the windows' area, not their taskbar buttons) when you release the finger from the touchpad inside the window (maybe as an option)

That would likely require a separate timer for hover_any_window. I don't have a touchpad, nor do I use the script (despite writing it), so I likely won't implement this feature soon. (Perhaps you should Ask for Help.)

But after reading your instruction to set "hover_task_min_info = 0", everything works great. I wonder why that setting is not the default.

It is now. :) (Script updated.)

user
  • Members
  • 476 posts
  • Last active: Dec 23 2011 07:18 PM
  • Joined: 05 Oct 2006
there is a problem with activating by hovering over a window (not its taskbar button)

the problem is appereared in browser window when there are drop down menus in the webpage

specifically iy doesnt allow you to open the drop down menu and to select an entry (it automatically closes the opened drop down menu when you move the cursor to choose an entry)

the cause of the problem imo is that the script doesnt ignore hovering over the active window, or maybe there is a conflict with my browser window (that has tabs)

I can post video if you like

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

the cause of the problem imo is that the script doesnt ignore hovering over the active window,

Oh, it does.
MouseGetPos,,, win
        [color=red]if (!WinActive("ahk_id " win))[/color] {
            if (hover_keep_zorder)
                JustActivate(win)
            else
                WinActivate, ahk_id %win%
        }
No need for a video. It happens in Firefox. I assume that's what you're using; if not, there are two browsers with the problem.

The cause is that the popup menu is not the active window, or part of it. According to AHK Window Info, it is a window of class MozillaDropShadowWindowClass. (Since Firefox is cross-platform, it doesn't use the standard menu window class.)

I've replaced hover_no_menus with a window group - DisableHover. If any window in this group exists (since menus aren't ever activated), hover will be ignored.

If you're not using Firefox, you may need to add GroupAdd, DisableHover, <your menu class>.

user
  • Members
  • 476 posts
  • Last active: Dec 23 2011 07:18 PM
  • Joined: 05 Oct 2006
mmm but I need to hover over opera's window to activate it :S

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006
How is that a problem? Obviously, add the window class of the menu, not the browser itself. If they have the same class, you'll have to find some other approach...

user
  • Members
  • 476 posts
  • Last active: Dec 23 2011 07:18 PM
  • Joined: 05 Oct 2006
mm the main opera control (where the webpage is displayed) is this:

Class: OpWindow
ClassNameNN: OperaWindowClass24

can you tell me please what I should add? I mean, if I hover over the webpage in opera there will be no activation?

also, is there a way to specify different hover time inside a window than the taskbar button hover time?

Lexikos
  • Administrators
  • 9844 posts
  • AutoHotkey Foundation
  • Last active:
  • Joined: 17 Oct 2006

I mean, if I hover over the webpage in opera there will be no activation?

I assume you mean while a menu is open, since you've already said:

mmm but I need to hover over opera's window to activate it :S

mm the main opera control (where the webpage is displayed) is this:

Class: OpWindow
ClassNameNN: OperaWindowClass24

can you tell me please what I should add?

As I said, add the window class of the menu, not the browser window itself. Window Spy only shows info for the active window (i.e. the owner of the menu), so I suggest you get AHK Window Info. Go to the Options tab, then under "Show window and control data for", select "Window under Mouse Cursor". Switch back to either the Simple tab or Advanced tab, open a menu in Opera, then hover the mouse over it to get the menu's window class.

Alternatively, use this script:
^Space::
MouseGetPos,,, win
WinGetClass, cl, ahk_id %win%
Clipboard = ahk_class %cl%
return

also, is there a way to specify different hover time inside a window than the taskbar button hover time?

No. You could add that by duplicating the existing hovercheck and hovering timers, and moving the if (hover_any_window) block of code.

user
  • Members
  • 476 posts
  • Last active: Dec 23 2011 07:18 PM
  • Joined: 05 Oct 2006
thanks but how can I do this for all webpages menus? is there a universal way or I have to add each menu manually?

also there is another problem, 'recent documents' menu in 'start menu' or winxp seem transparent, when the mouse is there it activates the below window :S

as for the "specify different hover time inside a window than the taskbar button hover time" can you implement it please?

thanks