scila1996 Posted February 16, 2014 Share Posted February 16, 2014 Hi All - I have 1 simple as following GUIDE code #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("AForm1", 187, 131, 193, 115) $Icon1 = GUICtrlCreateIcon("C:\Windows\System32\notepad.exe", 0, 80, 24, 32, 32, BitOR($SS_NOTIFY,$WS_GROUP)) GUICtrlSetCursor ($Icon1, 0) $Label1 = GUICtrlCreateLabel("Windows 7", 64, 72, 57, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd if the mouse is moved to the notepad icon ---> Change Label Windows 7 ---> Notepad Thank All Link to comment Share on other sites More sharing options...
JohnOne Posted February 16, 2014 Share Posted February 16, 2014 You could try setting an event for $GUI_EVENT_MOUSEMOVE and handling somehow so it does not keep occuring. I'm unsure if AutoIt has $GUI_EVENT_MOUSEOVER or $GUI_EVENT_MOUSEHOVER.Of course it would mean you have to use Opt(guioneventmode) instead of GuiGetMsg() AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
scila1996 Posted February 17, 2014 Author Share Posted February 17, 2014 (edited) You could try setting an event for $GUI_EVENT_MOUSEMOVE and handling somehow so it does not keep occuring. I'm unsure if AutoIt has $GUI_EVENT_MOUSEOVER or $GUI_EVENT_MOUSEHOVER. Of course it would mean you have to use Opt(guioneventmode) instead of GuiGetMsg() I usually opt to use ("GuiOnEventMode", 1) 1 Can you tell me some examples using the syntax $GUI_EVENT_MOUSEMOVE Edited February 17, 2014 by scila1996 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 17, 2014 Moderators Share Posted February 17, 2014 scila1996,Perhaps something like this might be suitable: #include <GUIConstantsEx.au3> Opt("GuiOnEventMode", 1) $Form1 = GUICreate("AForm1", 187, 131, 193, 115) GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit") $Icon1 = GUICtrlCreateIcon("C:\Windows\System32\notepad.exe", 0, 80, 24, 32, 32) GUICtrlSetCursor ($Icon1, 0) $Label1 = GUICtrlCreateLabel("Windows 7", 64, 72, 57, 17) GUISetState() While 1 Sleep(10) $aCInfo = GUIGetCursorInfo($Form1) If $aCInfo[4] = $Icon1 And GUICtrlRead($Label1) = "Windows 7" Then GUICtrlSetData($Label1, "Notepad") ElseIf $aCInfo[4] <> $Icon1 And GUICtrlRead($Label1) = "Notepad" Then GUICtrlSetData($Label1, "Windows 7") EndIf WEnd Func _Exit() Exit EndFuncM23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
scila1996 Posted February 17, 2014 Author Share Posted February 17, 2014 Thank Melba23 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now