GameIDevelp Posted January 10, 2017 Share Posted January 10, 2017 The ideea was to count 1 + 1 if a letter is pressed ,, i made this ,, but the problem get's that the keyboard if the letter is pressed and keept pressed it's count milions times so in end i not get only 1 for that letter ... 1 Does anyone have an ideea somehow i can do this ? 2 To disable double press letter , 3 It must count 1 only first time the letter is pressed and ignore all others double,, 4 i remain out of my ideeas arhhht Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 10, 2017 Moderators Share Posted January 10, 2017 GameIDevelp, That sounds very much like you are coding a keylogger - please read this announcement and convince me that you are within the rules before we go any further. 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 Link to comment Share on other sites More sharing options...
GameIDevelp Posted January 10, 2017 Author Share Posted January 10, 2017 not so, it's count 1 number , only if a fix Letter is pressed like K ,, i use it to count a movement using my keyboard ,, if what i am doing is named keylogger then i give up Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 10, 2017 Moderators Share Posted January 10, 2017 GameIDevelp, Quote only if a fix Letter is pressed like K So how many keys are you tracking? 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 Link to comment Share on other sites More sharing options...
GameIDevelp Posted January 10, 2017 Author Share Posted January 10, 2017 only 1 , any key ,, i just need an imput so i can read if is a movement on a mecanical part ,, so any letter is fine Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 10, 2017 Moderators Share Posted January 10, 2017 GameIDevelp, Quote so i can read if is a movement on a mecanical part Are you just looking for user input to the keyboard or mouse? If so, then _Timer_GetIdleTime might be useful. 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 Link to comment Share on other sites More sharing options...
GameIDevelp Posted January 10, 2017 Author Share Posted January 10, 2017 (edited) ahh i see,, it's a new think,, didin't know , i will try think how to use it ,, thx Melba23 Trayed but hmm i think i do not know how to use it ,, i only get differite results with it , each time else value of _Timer_GetIdleTime Edited January 10, 2017 by GameIDevelp Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 10, 2017 Moderators Share Posted January 10, 2017 GameIDevelp, If you need to check for user input, you keep checking the value returned by the function in a loop or in an Adlib function. Then when the value drops, it means the user has made an input. Something like this: #include <Timers.au3> Global $nIdleTimer = 0 HotKeySet("{ESC}", "_Exit") AdlibRegister("_Check_For_Input", 1000) ; Check for input every second While 1 Sleep(10) WEnd Func _Check_For_Input() ; Get time idle $nIdleSince = _Timer_GetIdleTime() ; Now check against last reading If $nIdleSince < $nIdleTimer Then ; User has actioned mouse or keyboard ConsoleWrite("User action at: " & @SEC & @CRLF) EndIf ; Store current idle return $nIdleTimer = $nIdleSince EndFunc Func _Exit() Exit EndFunc Please ask if you have any questions. 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 Link to comment Share on other sites More sharing options...
GameIDevelp Posted January 10, 2017 Author Share Posted January 10, 2017 so i understand that at each second less then a second will check if ,, well adapting to my need ,, check if i get an input from any ,,, and count as 1 but after the time expire and make again the check and the button is keep pressed and after the time expire will count as 2 ,, it's wrong again becauze it's count 2 and so one after each period, but the key pressed was pressed only 1 time only was keep pushed for loong time, ,, i am wrong?,, I did found something ,, the Control panel Keyboard filter do exactly what i need , i turned on and off and it allow only 1 time to be count ,, even if i press many times or is keept pressed a letter , so is what i need ,, but now i dunno how to open the filter from control panel with autoit and turn it on and off , cuz i get no exe to the control panel application ,,, i use win 10, dunno how to get the handle of it ,, o.o Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 10, 2017 Moderators Share Posted January 10, 2017 GameIDevelp, I am afraid that you have now confused me completely. Your last post makes it sound as though you are really looking to count key presses - which makes what you are doing unacceptable as it is a de facto keylogger. Please explain why you are trying to do this - what are you trying to achieve? We obviously have a serious language barrier here and I am not at all sure that we are even in the same book, let alone on the same page. 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 Link to comment Share on other sites More sharing options...
GameIDevelp Posted January 10, 2017 Author Share Posted January 10, 2017 1 hour ago, Melba23 said: I am afraid that you have now confused me completely. Your last post makes it sound as though you are really looking to count key presses - which makes what you are doing unacceptable as it is a de facto keylogger. i think yes i confused you, but no i only needed the keyboard for get an event outside of pc , i like robotics staff ,, i only need a button , keyboard key button to trigger an event so i could use it with autoit , i no need to know what letter button is pressed and even if is a number or simbol, just needed the event , on and off ,, but i see is not a good ideea, thx for the trays i apreciated, And english is not my native language , apologise for that. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 10, 2017 Moderators Share Posted January 10, 2017 GameIDevelp, Determining when any key is pressed and released is, alas, exactly what is prohibited. if you can limit the requirement to a specific key then _IsPressed should be what you need. 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 Link to comment Share on other sites More sharing options...
GameIDevelp Posted January 11, 2017 Author Share Posted January 11, 2017 (edited) that's really really exactly what i need , you are the men Melba 23 Thank youuuuuuuuuuuuuuuuuuuuuuuuuuuu. I could save few days if i was ask you since begin. Edited January 11, 2017 by GameIDevelp Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 11, 2017 Moderators Share Posted January 11, 2017 GameIDevelp, Glad we got there in the end. 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 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