I want that only the alphabet keyboards will work, when i use this script, but in a hungarian keyboard ...
Im a hungarian poet, and im a mess when im writing so ... im always end up writing to the ..ing nowhere, in the middle of the night, and there is nothing in the monitor, because an hour ago i pushed some not alphabetic keyboard, probably the worst one, and after that some other, so, thats the problem.
can i use v1 or v2 for this?
i need a script for only the alphabet
Re: i need a script for only the alphabet
Welcome to this AutoHotkey forum!
Are you really referring to keyboards, or just keys?
Well, I don't know, but this seems like a pretty tough way to write poetry. On the other hand, I'm not a poet!
Are you really referring to keyboards, or just keys?
Code: Select all
#Requires AutoHotkey v2.0
ih := InputHook('V')
ih.KeyOpt('{All}', 'S')
ih.KeyOpt('abcdefghijklmnopqrstuvwxyz{LShift}{RShift}', '-S')
ih.Start
Re: i need a script for only the alphabet
hi! thanx to the answer!
yeh, i mean the alphabet keys in the keyboard ...
and yeh u are right, i need the enter and the space key too, and this three ? , .
maybe thats enough
and some hungarian alphabet caracter too: ö,ü,ó,é,á,ű,í,ú
thanx for the help!
yeh, i mean the alphabet keys in the keyboard ...
and yeh u are right, i need the enter and the space key too, and this three ? , .
maybe thats enough
and some hungarian alphabet caracter too: ö,ü,ó,é,á,ű,í,ú
thanx for the help!
Re: i need a script for only the alphabet
I think you can just add them to the list that Mike already made... Like this:
I think braces need to go around the comma {,} but I'm not sure. Try it and see if it works.
Here is the help section:
https://www.autohotkey.com/docs/v2/lib/InputHook.htm#KeyOpt
EDIT: I tried it, and the comma does work. Here, I added Ctrl and Esc, to make it easier to end the script if you need to. Also Enter, so you can make new paragraphs. LOL. You can add/remove different keys that you need/don't need.
Code: Select all
ih.KeyOpt('abcdefghijklmnopqrstuvwxyz{LShift}{RShift}{Space}?{,}öüóéáűíú.', '-S')
Here is the help section:
https://www.autohotkey.com/docs/v2/lib/InputHook.htm#KeyOpt
EDIT: I tried it, and the comma does work. Here, I added Ctrl and Esc, to make it easier to end the script if you need to. Also Enter, so you can make new paragraphs. LOL. You can add/remove different keys that you need/don't need.
Code: Select all
#SingleInstance
#Requires AutoHotkey v2.0
ih := InputHook('V')
ih.KeyOpt('{All}', 'S')
ih.KeyOpt('abcdefghijklmnopqrstuvwxyz{LShift}{RShift}{Space}{Enter}{Ctrl}{Esc}?{,}öüóéáűíú.', '-S')
ih.Start
^Esc::ExitApp ; Ctrl+Esc exits script
name := "ste(phen|ve) kunkel"
Re: i need a script for only the alphabet
thx, i will try it!
Re: i need a script for only the alphabet
so i tried the program , the "enter" for some reason doesnt work, and maybe the arrows will be good, if they will be in active mode, but dont know how to write it in the script
other than that the sript works fine ...
sorry for the late answer, but didnt have too much "good mood" to do anything till now ...
other than that the sript works fine ...
sorry for the late answer, but didnt have too much "good mood" to do anything till now ...
Re: i need a script for only the alphabet
and i noticed that the "í" doesnt work, despite the fact that, that is in a script ...
Re: i need a script for only the alphabet
This is odd... Do the other accented characters öüóéáűú work?
name := "ste(phen|ve) kunkel"
Re: i need a script for only the alphabet
the other caracters are working, the enter and the "í" doesnt
Re: i need a script for only the alphabet
Sorry, I don't know why it's not working... I can't test it, because I only have an English setup.
name := "ste(phen|ve) kunkel"
Re: i need a script for only the alphabet
ok i understand, but the enter?
Strange behavior of "Enter" with inputHooks.
Very strange... I tried the code and Enter doesn't work for me either. On a related note: Check out the code here:
viewtopic.php?p=564175#p564135
Enter also doesn't work as expected with that inputHook code.
It makes me think I'm doing the code wrong(???) I checked the documentation, and I does appear right. It's just {Enter}. Also interesting, is that one of the examples at the bottom of the docs/help page has Enter as an end key, and that code does work. So I don't know what the problem is. I'm going to experiment more.
Edit: An interesting test...
Try this code:
Code: Select all
#SingleInstance
#Requires AutoHotkey v2.0
^Esc::ExitApp ; Ctrl+Esc to Exit.
Loop 100 ; <-- Arbitrary value so it doesn't loop forever.
{
ih := InputHook("L1")
ih.Start()
ih.Wait()
tooltip(myStr .= ih.Input)
}
EDIT again:
With the below code, Enter is working as expected. Type some characters, then 'space' or one of the other end keys.
Code: Select all
#SingleInstance
#Requires AutoHotkey v2.0
;===================
!+i:: ; alt shift i
{
ih := InputHook(,"{Space}{Tab}{Enter}{Esc}")
ih.Start()
ih.Wait()
ih.OnChar := charFunc()
ih.OnEnd := endFunc()
charFunc(*)
{ Global myStr .= ih.Input
}
endFunc(*)
{ msgbox('input:`t' myStr '`nendkey:`t' ih.EndKey)
}
}
^Esc:: ExitApp()
name := "ste(phen|ve) kunkel"
Re: i need a script for only the alphabet
Thx, ok, so whats the solution? The first script was interesting, i tryed it, the second ... i dont know. But what can i change in the "alphabet script" to make work the enter? I dont mind, if it works that way, what your first script showed me. Its ok. But how can i write it to the "alphabet script"? (sorry im not an expert in this matter, and my english not perfect too)
Re: i need a script for only the alphabet
so? anyone has some idea?
Re: i need a script for only the alphabet
Sorry, I don't know how to make it work.
name := "ste(phen|ve) kunkel"
Re: i need a script for only the alphabet
Code: Select all
#Requires AutoHotkey v2.0
ih := InputHook('V')
ih.KeyOpt('{All}', '+S')
ih.KeyOpt('abcdefghijklmnopqrstuvwxyz{LShift}{RShift}{Enter}', '-S')
ih.KeyOpt('{Enter}', '+V')
ih.Start
ih.Wait
MsgBox ih.EndReason
Re: i need a script for only the alphabet
thanx mikeyww! its almost perfect now:
i added the arrow keys to the the script, but they doesnt work for some reason, i dont know why ... maybe someone can tell whats the problem ... and how can i put it in the script ...
thanx everyone for the help!
[Mod edit: Added [code][/code] tags. Please use them yourself when posting code!]
Code: Select all
ih := InputHook('V')
ih.KeyOpt('{All}', '+S')
ih.KeyOpt('abcdefghijklmnopqrstuvwxyzöőüóéáűíú{LShift}{Space}{RShift}{Up}{Down}{Left}{Right}?.-{Enter}', '-S')
ih.KeyOpt('{Enter}', '+V')
ih.Start
ih.Wait
MsgBox ih.EndReason
thanx everyone for the help!
[Mod edit: Added [code][/code] tags. Please use them yourself when posting code!]
Re: i need a script for only the alphabet
@vanove, please use code tags when posting code! Thank you.
Re: i need a script for only the alphabet
I guess you could try making those keys "visible" along with Enter. In the bugs forum, lexikos has recently posted about the real nature of the issue having to do with how the InputHook handles VK and SC keys.