martin Posted April 18, 2009 Share Posted April 18, 2009 Thanks for this udf MrCreatoR, I like it and it's very useful. Why did you use a timer though rather than use WM_MOUSEMOVE which would mean your function would only get called when there is a need to call it? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
GEOSoft Posted April 18, 2009 Share Posted April 18, 2009 Thanks for this udf MrCreatoR, I like it and it's very useful.Why did you use a timer though rather than use WM_MOUSEMOVE which would mean your function would only get called when there is a need to call it?Take a look at the date of the original post. I don't think anyone was really making much use of WM_MOUSEMOVE back then. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
martin Posted April 18, 2009 Share Posted April 18, 2009 Take a look at the date of the original post. I don't think anyone was really making much use of WM_MOUSEMOVE back then.True, at least not GuiRegisterMsg which I was thinking off. Also, to get the WM_MOUSEMOVE over controls you need to sub-class the control as well which was probably even less common.Maybe I should put it another way. MrCreator, if you are ever at a loss for something to do, maybe changing this udf to use WM_MOUSEMOVE rather than a timer might make it more efficient. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
AutoBert Posted June 1, 2009 Share Posted June 1, 2009 (edited) Hello MrCreator, the GUICtrlSetOnHover.zip in Post #1 is damaged. Please load it up again, thanks (Auto)Bert Edited June 1, 2009 by AutoBert Link to comment Share on other sites More sharing options...
froufrou Posted June 10, 2009 Share Posted June 10, 2009 Just wondering if this is working with AutoIt v3.3.0.0 Link to comment Share on other sites More sharing options...
KaFu Posted June 10, 2009 Share Posted June 10, 2009 ??? Works fine for me on XP32 AU3.3... OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
froufrou Posted June 10, 2009 Share Posted June 10, 2009 Well i love this idea but it just doesn't work for me.I can't even get the examples in the zip to work for me.Anybody have an idea what could be the problem? Link to comment Share on other sites More sharing options...
KaFu Posted June 11, 2009 Share Posted June 11, 2009 Well i love this idea but it just doesn't work for me.I can't even get the examples in the zip to work for me.Anybody have an idea what could be the problem?In the other thread you mentioned you recently switched to vista... maybe that's the reason? Add a #RequireAdmin to the top of the UDF to see if it's related to UAC.Or try ProgAndy's update here#617400 OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
froufrou Posted June 11, 2009 Share Posted June 11, 2009 Thanks for tryin.I had already tried that one too.And I have UAC turned off.What you mentioned was my thoughts as well,that it could be Vista and it's x64 as well.Thanks though. Link to comment Share on other sites More sharing options...
KaFu Posted June 11, 2009 Share Posted June 11, 2009 ...that it could be Vista and it's x64 as well.Hmm, what happens if you compile it and let it run in the "program files 32" folder ? OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 11, 2009 Author Share Posted June 11, 2009 Maybe I should put it another way. MrCreator, if you are ever at a loss for something to do, maybe changing this udf to use WM_MOUSEMOVE rather than a timer might make it more efficient.Sorry for late reply, i lost the subscription for this thread (due to lack of answers here for long time) About the question. Well, i prefer to use timers because of WM_* limitations with unfocused GUI. For now, the hover process is triggered even if the GUI is not focused (active), but still visible to the eye (to mouse pointer actualy ). You can not get this behaviour with WM_MOUSEMOVE.I also could use a mouse hook to prevent unneccessary function calls, but this can cause few problems with mouse clicks and similar events. So timers imo, is the best solution for now. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
froufrou Posted June 11, 2009 Share Posted June 11, 2009 Hmm, what happens if you compile it and let it run in the "program files 32" folder ? Well I compiled and ran at "program files 32" and nothing . Am i doing this right? $CloseBtn = GUICtrlCreatePic($CloseBtn0, $width - 40, 3, 32, 32) _GUICtrlSetOnHover(-1,"hover","nohover",-1,-1) GUICtrlSetOnEvent(-1, "close") GUICtrlSetTip(-1, "Exit", "", 1) Func hover() GUICtrlSetImage ( $CloseBtn,$CloseBtn1) EndFunc ;==>hover Func nohover() GUICtrlSetImage ( $CloseBtn,$CloseBtn0) EndFunc ;==>nohover Link to comment Share on other sites More sharing options...
KaFu Posted June 11, 2009 Share Posted June 11, 2009 Am i doing this right? I'm not sure , compile one of the provided examples, they worked for me... OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
froufrou Posted June 11, 2009 Share Posted June 11, 2009 (edited) KaFu OH YEAH!!! Compiled example works,I'll go from there. Thank-You,.Thank-You,.Thank-You,.Thank-You,.Thank-You,.Thank-You I would have gave-up without your replies. EDIT: I wanted to add it works in my project too . I just needed to compile first. @everyone If somewhere in this topic if it stated "must compile first"then just overlook me,i missed it. Edited June 11, 2009 by froufrou Link to comment Share on other sites More sharing options...
froufrou Posted June 12, 2009 Share Posted June 12, 2009 Is there a way to repeat "$sHover_Func" until "$sLeaveHover_Func" is called? Thanks Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 12, 2009 Author Share Posted June 12, 2009 (edited) Is there a way to repeat "$sHover_Func" until "$sLeaveHover_Func" is called? ThanksYes, you can try something like this: #include <GUIConstantsEx.au3> #include <GUICtrlSetOnHover_UDF.au3> ; Global $iCounter = 0 $hGUI = GUICreate("Keep Calling Hover_Func Example", 280, 200) $Hand_Pic = GUICtrlCreateButton("Hover me", 55, 35, 60, 20) _GUICtrl_SetOnHover(-1, "_Hover_Proc", "_Leave_Hover_Proc") GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _Hover_Proc($iCtrlID) If IsDeclared("iCtrlID") Then AdlibEnable("_Hover_Proc", 10) Else $iCounter += 1 ConsoleWrite("Hovering... " & $iCounter & @CRLF) EndIf EndFunc Func _Leave_Hover_Proc($iCtrlID) AdlibDisable() EndFunc P.S This exactly behaviour that i was trying to avoid at the begining, but now i think it can be usefull as optional parameter, i will see what i can do about it... Edited June 12, 2009 by MrCreatoR Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
froufrou Posted June 12, 2009 Share Posted June 12, 2009 Thank-You I'll see if I can get that to work.AdlibEnable("_Hover_Proc", 10) Throws a wrong # of arguments error. But Thank-You it gives me a place to start looking.and i'll keep trying.And please post if you find a easier way. Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 12, 2009 Author Share Posted June 12, 2009 UDF update! History Version: [v1.6] - [12.06.2009] * Now the UDF compatible with scripts (or other udfs) that uses OnAutoItExit function. ------i.e: "OnAutoItExit" function that was *previously* set by user will be called as well. + Added new parameter $iKeepCall_Hover_Func. If this parameter = 1, ------then the $sHover_Func function *Will* be called constantly untill the control is no longer been hovered ------(default is 0, do not call the function constantly). + Added new arguments to calling function... ------The OnPrimaryDown/Up function now can recieve one more argument: ------------------------$iClickMode - Defines the Click mode (1 - Pressed, 2 - Released) * Changed return value - function will return 2 when $iCtrlID is redefined (ReSet, already exists in the controls list). * Fixed incorrect documentation parts. * Fixed "onclick" handeling. When using multiple GUIs, the active gui was not recognized properly. * Fixed(?) bug with "dimension range exceeded" when trying to UnSet a Control. Please see the first post. Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 12, 2009 Author Share Posted June 12, 2009 Throws a wrong # of arguments errorReplace _Hover_Proc($iCtrlID) with _Hover_Proc($iCtrlID=0).And see the last changes Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
froufrou Posted June 13, 2009 Share Posted June 13, 2009 @MrCreatoR Thank-You The new update fixes all my questions,Perfect! 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