Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate

Hover Mouse Over File's Icon Action Question


  • Please log in to reply
18 replies to this topic
System_7_Fan
  • Guests
  • Last active:
  • Joined: --
Hi, I would like to know if there is a way for AHK to sense when the mouse is hovering over a file icon on the desktop or within a folder.

I can only assume there is because most files have an info tooltip that pops up on mouse over and would like to know if this same hover over sense mechanism can be accessed for use in an AHK script?

In other words...
Mouse over a blank space on the desktop or with a folder = no action
Mouse over a file's icon = action


If I hover over a files icon I want the script to know of it before human interaction is applied.

BTW.. This is not refering to taskbar icons, just the ones on the desktop and within folders.

Any input would be most appreciated. :wink:

Thanks in advance.

  • Guests
  • Last active:
  • Joined: --
Use/View this script for how to mouseover any window or control
<!-- m -->http://www.autohotke...topic47637.html<!-- m -->

System_7_Fan
  • Guests
  • Last active:
  • Joined: --
[quote]Use/View this script for how to mouseover any window or control
http://www.autohotke...topic47637.html[/quote]

Thank you whoever you are.. I will have a read and cross my fingers.[/quote]

  • Guests
  • Last active:
  • Joined: --
Try this too:


;-------------------------------------------------------------------------------------------
; Ahk Window Spy 1.3.3
; by Decarlo

; shows window info: active, under pointer, hidden, all

; hotkey toggles the following modes:
; press 1x - tooltip
; press 2x - snapshot window, press CapsLock to update
; press 3x - polling window, updates with pointer motion
; press 4x - off
; hold for at least 0.4 sec - show control list of active window, if not in another mode.
; press hotkey from control list mode - display Window Chart, including info on hidden windows.
; press/hold Esc to exit, or press hotkey for 0.4 sec

; other features:
; shows pointer coordinates relative:
;   to screen,
;   to active window, including right/bottom mirror coordinates,
;   to window beneath pointer
; shows various attributes corresponding to both window active & window under pointer.
; handles tooltip bugs related to one or more of the following:
;   hovering over the tooltip,
;   hovering over irretrievable/non-existent control,
;   AutoHotkey.ini string present in window title,
;   re-size cursors,
; shows win-drag coordinates indicating new window position after dragging
; temporary deactivation of tooltip/mode3 by holding LCtrl, to highlight/double-click.
; Alternatively, 3+ click or select/Enter to activate/Open during navigation.

; add: option to monitor user-specified controls

; history, recent topmost:
; fixed exit-related bugs due to conversion to function form
; converted to function form to reduce global variable list and avoid naming conflicts
; replaced some unnecessary variables with reusable temp var
; added automatic control-size scaling on window re-size
; added window chart mode, which includes info on hidden windows
; changed code for exiting and fixed exiting from tooltip mode using Esc
; added holding of RShift+RCtrl for 2 sec restores to default window size & position
; added remembering of window position
; changed code for toggling AlwaysOnTop and fixed related window activation bug
; changed default snapshot key to CapsLock
; simplified the code
; changed toggle of window AlwaysOnTop to RShift+RCtrl
; fixed bug of snapshot window disappearing on toggling AlwaysOnTop
; added option to show control list: press hotkey for 0.4 sec if not in another mode
; fixed tooltip reappearing in window mode when applying LShift
; added pressing RCtrl toggles AlwaysOnTop
; added pressing LShift refreshes Snapshot
; fixed bug of tooltip reappearing on Monitoring exit
; fixed Ctrl to properly deactivate monitoring to allow highlight/copy
; added right/bottom-border window coordinates relative to within screen
; added right/bottom pointer coordinates relative to within active window
; added Esc as alternative to exit without hotkey toggle
; fixed bug of tooltip reappearing on Snapshot exit.
; added win-drag coordinates
; added window modes
; added PID, process name, colour, & pointer fields
; added display of attributes of window beneath pointer, tooltip mode
; added various modifications to handle specific tooltip peculiarities
; basic active window info in tooltip


#!w::   
AhkWindowSpy()
return


AhkWindowSpy()
{

static flagWindowInfo            ; remember last mode used
global ws_xGui, ws_yGui, ws_wGui, ws_hGui   ; remember last window position & size

DetectHiddenWindows, off
SetTitleMatchMode, 2
CoordMode, Mouse
intervalPointerWindowInfo = 300

ifWinExist, Window Chart 1
{
   WinClose, Window Chart 1
   flagWindowInfo =
   KeyWait, w
   EXIT
}
ifWinExist, Control List 1
{
   winListIDsVisible =
   winListIDs =
   winListPIDs =
   winListTitles =
   winListClasses =
   winProcessList =
   

   WinClose, Control List 1,, 3
   flagWindowInfo = W
   WinGet, Win#, List

   Loop %Win#%
   {
      winListItem := win#%A_Index%
      winListIDsVisible = %winListIDsVisible%%winListItem%`r`n
   }

   DetectHiddenWindows, on
   WinGet, Win#, List

   Loop %Win#%
   {
      winListItem := win#%A_Index%
      winListIDs = %winListIDs%%winListItem%`r`n
   }

   Loop, parse, winListIDs, `n, `r
   {
      WinGet, winPID%A_Index%, PID, ahk_id %A_LoopField%
      winListItem := winPID%A_Index%
      winListPIDs = %winListPIDs%%winListItem%`r`n      ; pid's with windows

      WinGetTitle, winTitle%A_Index%, ahk_id %A_LoopField%
      winListItem := winTitle%A_Index%
      winListTitles = %winListTitles%%winListItem%`r`n   ; titles of windows

      WinGetClass, winClass%A_Index%, ahk_id %A_LoopField%
      winListItem := winClass%A_Index%
      winListClasses = %winListClasses%%winListItem%`r`n   ; classes of windows

   }

   Loop, parse, winListPIDs, `n, `r
   {
      if A_LoopField =
         CONTINUE
      WinGet, processName%A_Index%, ProcessName, ahk_pid %A_LoopField%
      winListItem := processName%A_Index%
      winProcessList=%winProcessList%%winListItem%`r`n   ; processes with windows
   }

   Sort, winListIDs
   Sort, winListPIDs, NU
   Sort, winListTitles, U
   Sort, winListClasses, U
   Sort, winProcessList, U

   sleep 400
   if GetKeyState("LWin","p")
   {
      KeyWait, w
      msgbox %Win#% windows found
      msgbox,, Windows Chart 1, window id's`r`n`r`n%winListIDs%
      msgbox,, Windows Chart 1, pid's owning windows`r`n`r`n%winListPIDs%
      msgbox,, Windows Chart 1, titles of windows`r`n`r`n%winListTitles%
      msgbox,, Windows Chart 1, classes of windows`r`n`r`n%winListClasses%
      msgbox,, Windows Chart 1, processes with windows`r`n`r`n%winProcessList%
   }

   ; Create the ListView
   Gui, Add, ListView, AltSubmit r33 w700 gWindowChart , Item|ID|PID|Class|Process|win type|Title
      
   Loop, %Win#%
   {
      LV_Add("", 1, win#%A_Index%, winPID%A_Index%, winClass%A_Index%, processName%A_Index%, "", winTitle%A_Index%) ; 1st param=options
      temp_LV_1 := win#%A_Index%
      IfNotInString, winListIDsVisible, %temp_LV_1%
         LV_Modify(A_Index, "Col6", "hidden")
   }
   
   LV_ModifyCol()  ; Auto-size each column
   LV_ModifyCol(1, "33 Integer Left")   ; column heading 33 pixels; left-justification
   LV_ModifyCol(3, "Integer")   ; For sorting purposes - PID is an integer
   LV_ModifyCol(5, "Sort")      ; sort rows by Process
   LV_ModifyCol(6, 53)      ; column heading 53 pixels

   Loop, %Win#%
      LV_Modify(A_Index, "", A_Index)      ; number the sorted rows

   Gui, +Resize
   Gui, Show,, Ahk Window Spy - Window Chart 1
   return

   KeyWait, w
   EXIT
}
Loop 8
{
   sleep 50
   if not GetKeyState("w","p")
      BREAK         ; continues with thread
   if A_Index=8         ; display control list
   {
      if flagWindowInfo <>   ; exit the current mode
      {
         GoSub ws_GuiClose
         KeyWait, w
         EXIT
      }
      WinGet, controlList, ControlList, A
      Gui Destroy
      Gui, Font, 0x183CE7
      Gui, Color, 0xD6D3D6
      Gui, +Resize w300
      Gui, Add, Edit, +AutoSize +VScroll +HScroll w165 h600 ReadOnly, %controlList%
      Gui, Show, x-2 y100 w175, Control List 1
      ControlSend, Edit1, {end}, Control List 1
      flagWindowInfo = C
      KeyWait, w
      EXIT
   }
}


If flagWindowInfo=3            ; toggle to off
{
   GoSub ws_GuiClose
   EXIT
}
else If flagWindowInfo=2         ; toggle to window Monitoring
{
   Gui, Show, NoActivate, Ahk Window Spy - auto-refresh   ; similar effect as above
   ControlSetText, Edit1, %Info1Tips%%tooltip1Info%, Ahk Window Spy -
   flagWindowInfo=3
}
else If flagWindowInfo=1         ; toggle to Snapshot
{
   flagWindowInfo=2
   Tooltip
   GuiTopmost=1
   Gui, +AlwaysOnTop +Resize +VScroll +HScroll
   Gui, Font, 0x183CE7 ;s6, Courier   ; blue
   Gui, Color, 0xD6D3D6        ; <light grey; 0xFFFFA5 yellow
   Gui, Add, Edit, +VScroll +HScroll w301 h400 ReadOnly, %Info1Tips%%tooltip1Info%
   if ws_xGui =
      Gui, Show, x-2 y301, Ahk Window Spy - snapshot
   else
      Gui, Show, x%ws_xGui% y%ws_yGui%, Ahk Window Spy - snapshot
   WinWaitActive, Ahk Window Spy - ,, 1      ; this improves responsiveness
   ControlSend, Edit1, ^{home}, Ahk Window Spy -
}
else
{
   flagWindowInfo=1         ; activate Tooltip
   SetTimer, PointerWindowInfo, %intervalPointerWindowInfo%
}
KeyWait, w
return


PointerWindowInfo:

SetTitleMatchMode, 2

Info1Tips = LCtrl pauses for select/copy/double-clicking.`r`nCapsLock updates info in snapshot mode.`r`nRShift+RCtrl toggles AlwaysOnTop.`r`n`r`n
tooltipInfo = pointer x`,y = `t(%xC%`,%yC%)   to screen`r`npointer x`,y = `t(%xCA%`,%yCA%`,%xCAm%`,%yCAm%)   to win active`r`npointer x`,y = `t(%xCU%`,%yCU%)   to win under`r`ncolour, rgb`t%color%`r`nwin active x`,y =`t(%xWinActive%`,%yWinActive%`,%xWinActiveM%`,%yWinActiveM%)`r`nwin under x`,y =`t(%xWinUnder%`,%yWinUnder%)`r`nwin drag x`,y =`t(%xWinDrag%`,%yWinDrag%)`r`nwin active w`,h =`t%widthWinActive%`,%heightWinActive%`r`nwin under w`,h =`t%widthWinUnder%`,%heightWinUnder%`r`nTitle active`t%titleActive%`r`nTitle under`t%titleUnder%`r`nPID active =`t%PIDActive%`r`nPID under =`t%PIDUnder%`r`nprocess active =`t%procActive%`r`nprocess under =`t%procUnder%`r`nwin cnt hidden`ttoggle for info`r`nwin class active`t%classActive%`r`nwin class under`t%classUnder%`r`nwin id active`t%idActive%`r`nwin id under`t%id%`r`npointer`t`t%A_Cursor%`r`ncontrol active`t%controlActive%`r`ncontrol under`t%controlUnder%`r`ncontrol under, text:`t
tooltip1Info = %tooltipInfo%`r`n%controlText%
tooltip2Info = %tooltipInfo%-bypassed-

if ( GetKeyState("RShift","p") AND GetKeyState("RCtrl","p") )   ; toggle window AlwaysOnTop
{
   timeRShiftRCtrl = %A_TickCount%
   WinGet, IDActive, ID, A

   if GuiTopmost
   {
      Gui, -AlwaysOnTop
      GuiTopmost=

      WinW("Ahk Window Spy - ", 3)      ; max of 3 sec
      WinActivate, ahk_id %IDActive%
   }
   else
   {
      Gui, +AlwaysOnTop
      GuiTopmost=1
   }
   KeyWait, RCtrl
   if ( A_TickCount - timeRShiftRCtrl > 1200 )   ; holding RShift+RCtrl restores default window position
   {
      ws_xGui =
      ws_yGui =

      ifWinExist, Ahk Window Spy - snapshot
         Gui, Show, x-2 y301 w329 h439 AutoSize NoActivate, Ahk Window Spy - snapshot
      else
         Gui, Show, x-2 y301 w329 h439 AutoSize NoActivate, Ahk Window Spy - auto-refresh
   }
}
if GetKeyState("CapsLock","p")      ; refresh Snapshot
ifWinExist, Ahk Window Spy - snapshot
{
   ControlSetText, Edit1,, Ahk Window Spy -
   sleep 70
   ControlSetText, Edit1, %Info1Tips%%tooltip1Info%, Ahk Window Spy -
   ControlSend, Edit1, ^{home}, Ahk Window Spy -
}
if GetKeyState("LCtrl","p")      ; temporary deactivate
{
   Tooltip      ; tooltip off
   Loop      ; prevents updating of values
   {
      sleep 100
      if not GetKeyState("Ctrl","p")
         BREAK
   }
}
if GetKeyState("Esc","p")
{
   SetTimer, PointerWindowInfo, off
   {
      GoTo ws_GuiClose   ; avoid GoSub since this timer is turned off ***
      ; will EXIT
   }
}

MouseGetPos, xC, yC, id, controlUnder   ; relative to screen
WinGet, idActive, ID, A
ControlGetFocus, controlActive, ahk_id %idActive%
WinGetTitle, titleUnder, ahk_id %id%
WinGetTitle, titleActive, A
WinGetClass, classUnder, ahk_id %id%
WinGetClass, classActive, A
WinGetPos, xWinUnder, yWinUnder, widthWinUnder, heightWinUnder, ahk_id %id%
WinGetPos, xWinActive, yWinActive, widthWinActive, heightWinActive, A
WinGet, PIDUnder, PID, ahk_id %id%
WinGet, PIDActive, PID, A
WinGet, ProcUnder, ProcessName, ahk_id %id%
WinGet, ProcActive, ProcessName, A
if flagWindowInfo=1
{
   ifNotInString, titleUnder, AutoHotkey.ini -
      ControlGetText, controlText, %controlUnder%, ahk_id %id%
}
else
   ControlGetText, controlText, %controlUnder%, ahk_id %id%
xCU := xC-xWinUnder   ; relative to window under pointer
yCU := yC-yWinUnder   ; relative to window under pointer
xCA := xC-xWinActive   ; relative to window active
yCA := yC-yWinActive   ; relative to window active
xCAm := xWinActive + widthWinActive - xC      ; mirror coordinate
yCAm := yWinActive + heightWinActive - yC      ; mirror coordinate
xWinActiveM := A_ScreenWidth - xWinActive - widthWinActive   ; mirror coordinate
yWinActiveM := A_ScreenHeight - yWinActive - heightWinActive   ; mirror coordinate
PixelGetColor, color, xC, yC , RGB
;---------------------------------------------
GetKeyState, ksLButton, LButton, p
GetKeyState, ksRButton, RButton, p
if (ksLButton="D" OR ksRButton="D")   ;ok
{
   if xD=
   {
      xD = %xC%
      yD = %yC%
      xWin2 = %xWinUnder%
      yWin2 = %yWinUnder%
   }
   xWinDrag := xWin2 - xD + xC   ; new window position x
   yWinDrag := yWin2 - yD + yC   ; new window position y
}
else
{
   xD=
   yD=
   xWinDrag=
   yWinDrag=
}

;---------------------------   ; Display window-info in window edit-control

if flagWindowInfo = 2         ; skip tooltip in window mode
   RETURN

if flagWindowInfo = 3
{
   ControlSetText, Edit1, %Info1Tips%%tooltip1Info%, Ahk Window Spy -
   RETURN
}                        
;----------------------------; Display window-info in tooltip
if classUnder=tooltips_class32
   Tooltip
else
IfWinActive AutoHotkey.ini -      ; handle tooltip-related bugs
{
   typeTooltip=
   IfInString, titleUnder, AutoHotkey.ini -
      typeTooltip=2         ; sets which tooltip format
   StringLeft, PointerType, A_Cursor, 4
   if PointerType=Size
      typeTooltip=2
   if controlUnder=
      typeTooltip=2
   if classUnder=Shell_TrayWnd
   {
      if controlUnder<>
         typeTooltip=
      else
         typeTooltip=2
   }
   if typeTooltip=2
      ToolTip, %tooltip2Info%
   else
      ToolTip, %tooltip1Info%
}
else
{
   IfInString, titleUnder, AutoHotkey.ini
   {
      IfWinNotActive, ini - AutoHotkey
         ToolTip, %tooltip2Info%
   }
   else
      ToolTip, %tooltip1Info%
}

Return

;---------------------------------

ws_GuiClose:      ; cannot GoTo external subroutine from Function

if WinExist("Ahk Window Spy - ") AND NOT WinExist("Ahk Window Spy - Window Chart")
   WinGetPos, ws_xGui, ws_yGui, ws_wGui, ws_hGui, Ahk Window Spy -      ; remember win position & size
SetTimer, PointerWindowInfo, off
sleep 300
Gui, Destroy
flagWindowInfo=
Tooltip
return


WindowChart:

if A_GuiEvent = RightClick
{
   LV_GetText(LV_winId, A_EventInfo, 2)
   msgbox %LV_winId%
   ;WinHide, ahk_id %LV_winId%
}
else if A_GuiEvent = DoubleClick ;DoubleClick
{
   LV_GetText(LV_winId, A_EventInfo, 2)
   LV_GetText(isHidden, A_EventInfo, 6)
   if isHidden
      RETURN
   ;msgbox %LV_winId%
   ;WinShow, ahk_id %LV_winId%
   WinRestore, ahk_id %LV_winId%
   WinActivate, ahk_id %LV_winId%
}
return   

} ;----------------------- End Function: Ahk Window Spy


GuiSize:  ; Allows the control to grow or shrink in response to user's resizing of window.
if A_EventInfo = 1  ; The window has been minimized.  No action needed.
   return
ControlGetFocus, gui_control_ID, A
if gui_control_ID contains Edit,SysListView
   GuiControl, Move, %gui_control_ID%, % "W" . (A_GuiWidth - 17) . " H" . (A_GuiHeight - 8) ; xm=x at margin
return


WinW(windowTitleElement="", secToWait=30)   ; WinWait,WinActivate,WinWaitActive
{
   SetTitleMatchMode, 2
   WinWait %windowTitleElement%,, %secToWait%
   WinActivate
   WinWaitActive,,, %secToWait%      ; default 30 sec maximum
   ifWinNotActive %windowTitleElement%
      Msgbox, Target window did not activate within %secToWait% sec.`n`nThe originating thread may cause problems if it continues.
   return
}


GuiClose:  ; Indicate that the script should exit automatically when GUI window is closed.
GuiEscape:
; NEXT 2 LINES REPLACE THOSE FROM PREVIOUS VERSION
if WinExist("Ahk Window Spy - ")
   CloseGUI = 1      ; let ws_GuiClose function subroutine handle this
Gui Destroy
Tooltip
return


/*
THIS ROUTINE FROM PREVIOUS VERSION MAY BE DELETED

PointerWindowInfoOff:

WinGetPos, ws_xGui, ws_yGui, ws_wGui, ws_hGui, Ahk Window Spy -
Gui, Destroy
sleep 300
flagWindowInfo=
Tooltip

return
*/

;----------------------------------------------------------------


  • Guests
  • Last active:
  • Joined: --
LitlMinSpy

; LitlWinSpy

;----------------------------------------------------------------
;--- Shift+Win+S: run a mini-WinSpy

DetectHiddenWindows, On
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. 
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. 
#Persistent 
#SingleInstance

#+s::
   If bMiniWinSpy
   {
      SetTimer WatchCursor, Off
      ToolTip
      Hotkey ^c, Off
   }
   Else
   {
      SetTimer WatchCursor, 200
      Hotkey ^c, MWS_Snapshot
   }
   bMiniWinSpy := not bMiniWinSpy
Return

WatchCursor:
	 WinGet hWnd, ID, A 
   ; Get relative coordinates, and additional data
   MouseGetPos xr, yr, MouseWindowUID, MouseControlID
   ; Get absolute coordinates
   CoordMode Mouse, Screen
   MouseGetPos xs, ys, MouseWindowUIDA, MouseControlIDA ; Gets the ClassNN  "MouseControlID" of Control or use the next line
   MouseGetPos xs, ys, MouseWindowUIDB, MouseControlIDB, 2 ; gets the ControlHwnd instead ClassNN of Control
   ; Restore default
   CoordMode Mouse, Relative
   ; Get other information: window level
   WinGetTitle, title, ahk_id %MouseWindowUID%
   WinGetTitle, title, ahk_id %MouseWindowUIDA%
   WinGetTitle, title, ahk_id %MouseWindowUIDB%
   WinGetClass, class, ahk_id %MouseWindowUID%
   WinGetClass, class, ahk_id %MouseWindowUIDA%
   WinGetClass, class, ahk_id %MouseWindowUIDB%
   WinGetText, windowText1, ahk_id %MouseWindowUID%
   WinGetText, windowText2, ahk_id %MouseWindowUIDA%
   WinGetText, windowText3, ahk_id %MouseWindowUIDB%
   ;FileAppend, hWnd = %hWnd%`ntitle = %title% class = %class% windowText = %windowText%, %A_SCRIPTDIR%\Document1 - Properties.txt
	;MsgBox    hWnd = %hWnd%`ntitle = %title% class = %class% windowText = %windowText%
   ;***************************************************************
   MouseGetPos,,,,ControlHwnd	; Either this command or next line		
   ;MouseGetPos, MouseScreenX, MouseScreenY, MouseWindowUID, MouseControlID
   WinGet,ControlHwnd, ID, ahk_id %MouseWindowUID% ; NOTE: May Need to use this command to get "ControlHwnd" or
   WinGet,ControlHwndA, ID, ahk_id %MouseWindowUIDA% ; NOTE: May Need to use this command to get "ControlHwnd" or
   WinGet,ControlHwndB, ID, ahk_id %MouseWindowUIDB%
   ControlGet, ControlHwnd, Hwnd,, ahk_id %ControlHwnd%		; this command to get "ControlHwnd"
   ControlGet, ControlHwndA, Hwnd,, ahk_id %ControlHwndA%
	ControlGet, ControlHwndB, Hwnd,, ahk_id %ControlHwndB%	
	SendMessage, 0x01E1, , , , ahk_id %ControlHwnd% 
   ControlGet, ActiveTABnum, Tab, , SysTabControl322, ahk_class Afx:00400000:8:00010003:00000000:033128E9
   ControlGetText, ActiveTABname, SysTabControl322, ahk_class Afx:00400000:8:00010003:00000000:033128E9
;***************************************************************
   ShortenAndCleanUp(windowText1)
   WinGetPos xw, yw, ww, hw, ahk_id %MouseWindowUID%
   ; Get other information: current control level
   ControlGetText controlText, %MouseControlID%, ahk_id %MouseWindowUID%
   ShortenAndCleanUp(controlText)
   ControlGetPos xc, yc, wc, hc, %MouseControlID%, ahk_id %MouseWindowUID%
   MWS_Info =
(
hWnd: %hWnd%
Window: %title%
WindowText: (%windowText1%)
ahk_id: %id% - ahk_class: %class%
%ww%x%hw% at %xw%, %yw%
ControlID: %MouseControlID% 
ControlText:(%controlText%)
ClassNN: %ControlHwnd%
ControlHwnd: %ControlHwndA%			
ControlHwndA: %ControlHwndB%		
ControlHwndB: %MouseControlIDB%		
ActiveTABnum:%ActiveTABnum%	
ActiveTABname:%ActiveTABname%	
%wc%x%hc% at %xc%, %yc%
Cursor: (relative) %xr%, %yr% (screen) %xs%, %ys%
)
   ToolTip %MWS_Info%
Return

MWS_Snapshot:
   Clipboard = %MWS_Info%
Return

ShortenAndCleanUp(ByRef text, length=64)
{
   StringReplace text, text, `r, ``r, All
   StringReplace text, text, `n, ``n, All
   StringReplace text, text, `r, ``t, All
   StringLeft text, text, length
}


ESC::ExitApp


System_7_Fan
  • Guests
  • Last active:
  • Joined: --
Cheers for your responses but so far no joy with the first 2 scripts... in fact it doesnt give me anything more than AHK's winSpy can.

I will try the third one and again fingers X.

System_7_Fan
  • Guests
  • Last active:
  • Joined: --
Zilch effect unfortunately on all the above scripts!

Could it be something related to a DLL ??

Where does Windows (Vista in my case) recognise that the mouse is hovering over a file's icon?

If AHK can't work it out then this may be a feature to be raised in their Wish Lists dept.

  • Guests
  • Last active:
  • Joined: --
This is the last Spy script that provides lots of details
<!-- m -->http://www.autohotke...pic.php?t=44561<!-- m -->

System_7_Fan
  • Guests
  • Last active:
  • Joined: --
There all good but for what I want they're useless in gaining access to windows' icons info tooltips. :|

If there are any other takers on my query I will be back later.

Cheers.

System_7_Fan
  • Guests
  • Last active:
  • Joined: --
There all good but for what I want they're useless in gaining access to windows' icons info tooltips. :|

If there are any other takers on my query I will be back later.

Cheers.

System_7_Fanatic
  • Guests
  • Last active:
  • Joined: --
WoooHooooooooo! I may have found something here!!!!!!!

Believe it or not I only stumbled across this beauty doing a search under Google...
http://www.autohotke.../topic8976.html
This has to be the king of kings when it comes to AHK Windows Spies!!!!
I will rumage through its massive lists and see what I can find...
The list is found under the Advance tab and then click on the More Info button...

System_7_Fanatical
  • Guests
  • Last active:
  • Joined: --
The best I can find at this stage is the class for the info tooltip itself... ie/ tooltips_class32

This is close but not quite what I'm after.
BAsically what is it that makes explorer sense that the mouse is over an icon? *Why does the file or folders icon highlight when you hover the mouse over it? And then a second or so later followed by a file info tooltip.

*I'm sure I'm repeating myself but just to clarify I want to get hold of the bit in explorer that grabs the part where I mentioned in bold type above.

txquestor
  • Members
  • 294 posts
  • Last active: Jul 24 2015 08:12 PM
  • Joined: 22 Aug 2009
What is it you want to do once you sense you are over an explorer file or desktop icon?

Here is how to determine each condition
You'll need to add what happens after condition is detected

^#e::

WinGetClass, wClass, A   ; gets the Class of the Active Window
If (wClass = "CabinetWClass" AND "SysListView32") 
    {
      MsgBox Vista  Explorer - Class: %wClass% 
    }
Else If (wClass = "ExploreWClass" AND  "SysListView32")
    {
      MsgBox XP  Explorer - Class = %wClass%  
    }    	  
Else If (wClass = "Progman" AND "SysListView32")
    {
      MsgBox Desktop - Class: %wClass% 
    }

return


Posted Image
"Man's quest for knowledge is an expanding series whose limit is infinity"

System_7_Fanatically
  • Guests
  • Last active:
  • Joined: --

What is it you want to do once you sense you are over an explorer file or desktop icon?

Hi txquestor, thanks for acknowledging this.

Basically
LButton : Other than for opening a file it will have full block to files only! ie/ NOT blank desktop area, blank folder area or any other object, button etc... (ie/ everything but file icons)
MButton : it will have full exclusive rights to the LButton functionality, but to files only

Why? As a safety feature which will prevent accidental file edit/delete/move/copy/paste etc.. but still have access to right click context menu to do these or using the generic shortcut keys. Otherwise the MButton will be able to pick up a file, relocate it, double click on it etc...

Scenario: Hovering the mouse over a files icon (on the desktop in this case) The script recognises that its over the file, as opposed to over the desktop. Now suppose an accidental (by human error) slow double click takes place over this icon, you would get a file rename prompt occuring unwillingly, this can be most annoying at times.
If the script could distinguish between being over either the desktop or file would solve this problem as you could give exclusive rights for a slow double click to the desktop or the icon and still be able to pick up the icon. (i hope this isnt confusing you).

To simplify my problem how do you block a simple file name edit box from popping up as a rename prompt from a slow double click?

txquestor
  • Members
  • 294 posts
  • Last active: Jul 24 2015 08:12 PM
  • Joined: 22 Aug 2009
You want to disable quite a few normal functions of either XP or Vista

You told me what you want it to do, but not why you want to do this.
Is this to block a child from doing these things but allow them usinig the MButton. Or what?

If it is a Child blocker of some sort. or for someone who can't control the
mouse and buttons very easily? There are many other things they can accidetntly activate.

It would be easier to limit tthe keyboard except a-z and 0-9
and create either hotkeys or gui's to perform the other functions.

Let me know it's real purpose instead of designing what you want it to do.
It can be done, but it's complicated and not something to be done right away.

Here is a template to perform those functions is something like this.
Without the actual code yet to Limit the LButton and allow MButton functions.
Although this is AHk code. I'ts like Pseudo code to describe what is does.

LButton::GoSub Limited_LButton
MButton:GoSub New_MButton
	
Limited_LButton:		
	
WinGetClass, wClass, A   ; gets the Class of the Active Window
If (wClass = "CabinetWClass" AND "SysListView32") 
    {
        while GetKeyState("LButton", "P")  ; While the LButton key is being held down physically. 
        {
            MsgBox Vista  Explorer - Class: %wClass% LButton Limited
            ADD CODE HERE ==> to perform LButton Actions	
        }   
 }
Else If (wClass = "ExploreWClass" AND  "SysListView32")
    {
        while GetKeyState("LButton", "P")  ; While the LButton key is being held down physically. 
        {
            MsgBox XP  Explorer - Class = %wClass%   LButton Limited
            ADD CODE HERE ==> to perform LButton Actions	
        }
}
    	
Else If (wClass = "Progman" AND "SysListView32")
    {
        while GetKeyState("LButton", "P")  ; While the LButton key is being held down physically. 
        {
            MsgBox Desktop - Class: %wClass% LButton Limited
            ADD CODE HERE ==> to perform LButton Actions
        }
}
return

New_MButton:
; ADD CODE HERE ==> for new MButton Functions
Return	

Posted Image
"Man's quest for knowledge is an expanding series whose limit is infinity"