GameIDevelp

Does anyone have an Ideea for Count number letter?

14 posts in this topic

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

Share this post


Link to post
Share on other sites



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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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 

Share this post


Link to post
Share on other sites

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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 

Share this post


Link to post
Share on other sites

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (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 by GameIDevelp

Share this post


Link to post
Share on other sites

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#10 ·  Posted

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#11 ·  Posted

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. 

Share this post


Link to post
Share on other sites

#12 ·  Posted

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#13 ·  Posted (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 by GameIDevelp

Share this post


Link to post
Share on other sites

#14 ·  Posted

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
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