Jump to content

_MouseHover UDF


marfdaman
 Share

Recommended Posts

Could you tell me what kind of error you're running into? I still use my udf without any problems.

it's this wmp11 example above that isn't working

what is strange is that it doesn't change the image while hovering, but when you move outside the image (HoverLost) it does change the image :)

*EDIT*

Nevermind, i think i did something wrong, it works now

Edited by YozY
Link to comment
Share on other sites

  • Replies 89
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Nevermind, i think i did something wrong, it works now

Glad it does :)

Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Link to comment
Share on other sites

  • 6 months later...
  • 1 month later...
  • 1 year later...

i know this is most probably me but i just cant get to check for a button being held down :P

#include <WindowsConstants.au3>
#include <pressdetection.au3>

 $rr=GUICreate("My GUI",-1,-1,-1,-1,$ws_sizebox) 
 $tt=GUICtrlCreateButton("",0,0,100,100)
 $ttx=GUICtrlCreateButton("",100,0,100,100)
 GUISetState()

While 1
    ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : _PressDetectAddCtrl($tt) = ' & _PressDetectAddCtrl($tt) & @crlf & '>Error code: ' & @error & @crlf);### Debug Console
    sleep(200)
 WEnd

iv tried Pressdetect() but it just seems to be the same as _isPressed("01") ie no ctrl return

iv tried PressDetectAddCtrl($tt) but it just returns 0

all i want to do i find if a button is being held down and if it is what its ctrlID is, dont know why it's taken me some hours to get this far would have thought there would be a simple command but i cant find it.

anyhow any help would be most appreciated , thx all

Thx all,Jack Dinn.

 

JD's Auto Internet Speed Tester

JD's Clip Catch (With Screen Shot Helper)

Projects :- AutoIt - My projects

My software never has bugs. It just develops random features. :-D

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
  • 1 month later...

I'm using the example from marfdaman to and can't click outside the window, couse the programm/script exits by itself.

Change the function _HoverCheck(). This solve the lost focus exit problem in my script.

marfdaman is alive?

I can post my example script here?

Func _HoverCheck()
    $HoverData = GUIGetCursorInfo()
    If Not IsArray($HoverData) Then;Exit;removed
                Sleep(500);added
    Else; added
    $Temp_Found = 0
    For $i = 1 To UBound($HoverArray)-1
        If $HoverData[4] = $HoverArray[$i] Then
            $Temp_Found = $i
        EndIf
    Next
    Select
        Case $Temp_Found = 0 And $HoverActive = 1 Or $Temp_Found <> 0 And $Temp_Found <> $Global_I And $HoverActive = 1
            $HoverActive = 0
            $Temp_Found = 0
            $szTemp_Array[0] = "LostHover"
            $szTemp_Array[1] = $HoverArray[$Global_I]
            Return $szTemp_Array
        Case $Temp_Found > 0 And $HoverActive = 0
            $Global_I = $Temp_Found
            $HoverActive = 1
            $Temp_Found = 0
            $szTemp_Array[0] = "AcquiredHover"
            $szTemp_Array[1] = $HoverArray[$Global_I]
            Return $szTemp_Array
    EndSelect
EndFunc
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...