Jump to content

Recommended Posts

Posted

I am trying to make my program user friendly by having an input box that, when it has been clicked in, will capture the keys pressed. Similar to how many other programs do, when you click in the box and then press, say, Ctrl+Alt+K, it will turn the text box into this, and if you take your finger off Alt, it will change to Ctrl+K. I've been searching the forum, and i found that i should probably use the IsPressed function, although i can see this being quite a long piece of code. However, i don't know how to find out when/if the textbox is selected. Is there a blindingly obvious way to do this that i've stupidly missed, or is this something difficult to do? I already have a function that will convert strings with keys stored in the form that the Send() function uses to user-friendly language, incase anyone knows a better way than IsPressed().

Thanks, and sorry if this is obvious and/or has been asked before...

Posted

*feels stupid*

when i couldn't find anything in search, i looked through the commands that start "GUICtrl..." and then "GUI..."... never thought of looking for something that wasn't autoit gui specific...

one thing though... i'm using an onEvent GUI, so would i have to do this in my empty while loop at the top and constantly poll the GUI...? The GUI won't be open for most, if not all, off the time the program is running, so this seems like a slight waste of CPU time... Any ideas...?

Posted

Hey,

thanks for the reply. Those do look useful, but i can't understand them well enough to change them and put them into my own script, and i don't want to have to include it and change the look/workings of my script.

I guess i'll just keep it the way it is... :/

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
×
×
  • Create New...