blublub Posted May 17, 2009 Posted May 17, 2009 question as in topic how this should look i thought that "!{MOUSE1}" would work :/
Moderators Melba23 Posted May 17, 2009 Moderators Posted May 17, 2009 blublub,HotKeySet only works with keys, not mouse buttons.From that ever useful Help file: "HotKeySet ( "key" [, "function"] ) - Parameters - key - The key combination to use as the hotkey. Same format as Send().", and I cannot see {MOUSE1} in the Send list. :-)If you were to use the Search facility (in the title bar to the right), you would find that this question has been asked many, many times before and the answer is always the same: use _IsPressed.M23 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
blublub Posted May 17, 2009 Author Posted May 17, 2009 (edited) thx btw. ive used search but didnt find anything simillar to that question maybe ive used bad keywords and i thought that in the help file not all keys are listed that actually can be used in send tried it and If _IsPressed("01",$dll) and _IsPressed("12", $dll) Then dosnt work very with loop that has sleep(100) is there anyway better to do it becouse mouse clicks are pretty fast and lowering sleep will make cpu usage to high Edited May 17, 2009 by blublub
Moderators Melba23 Posted May 17, 2009 Moderators Posted May 17, 2009 blublub,Why not use nested EndIfs to speed things up?; Check if Alt presssed If _IsPressed("12", $dll) Then If _IsPressed("01",$dll) Then ; Do whatever you need to EndIf EndIfThen you only check the mouse if the Alt key is pressed. Or reverse the order if you use the Alt key more often than the mouse.As to CPU useage, personally I have found that Sleep(10) is adequate in a tight loop - Sleep(100) is going to make the loop less responsive.Anyway if you want this as a HotKey replacement, why not use Adlib so you can get on with other things in the meantime?M23 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
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