Sign in to follow this  
Followers 0
cr0x

disable keys with auutoit?

15 posts in this topic

hi i searched with google but did not find any thing mayb some1 here knows if it is possible to disable keys on keyboard/mouse. :o


Learning autoit since 18.02.06

Share this post


Link to post
Share on other sites



whats the purpose??

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

hi i searched with google but did not find any thing mayb some1 here knows if it is possible to disable keys on keyboard/mouse. :o

you can just set a hotkey that doesn't do anything.

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

sometimes at night my cats walk or jump on my keyboard and cancel severel times any processes

looks like this HotKeySet("{Esc}", "")

Edited by cr0x

Learning autoit since 18.02.06

Share this post


Link to post
Share on other sites

I would recommend getting a keyboard with a Fn key. Usually Fn+F11 disables the keyboard. That or unplug the keyboard when you leave. Also HotkeySet() dosn't work for the mouse.

Share this post


Link to post
Share on other sites

I would recommend getting a keyboard with a Fn key. Usually Fn+F11 disables the keyboard. That or unplug the keyboard when you leave. Also HotkeySet() dosn't work for the mouse.

That's when you used _IsPressed() :o

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

That's when you used _IsPressed() :o

Yeah, but _IsPressed doesn't steal keys (or mouseclicks) like HotKeySet, so when you click the mouse you'd still be getting the click plus the result of the _IsPressed.

Share this post


Link to post
Share on other sites

hm but HotKeySet("{ESC}", "a") does not work.

if i try 2 start the script " Unknown function name.: HotKeySet("{ESC}", "a") " appears


Learning autoit since 18.02.06

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

hm but HotKeySet("{ESC}", "a") does not work.

if i try 2 start the script " Unknown function name.: HotKeySet("{ESC}", "a") " appears

HI,

you want something strange like

HotKeySet("{ESC}", "a")

while 1
    sleep(100000000)
WEnd

Func a()
;MsgBox(0,"","jo")
EndFunc

????

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

Has everyone forgotten or just dont know about BlockInput()?

HotKeySet("^!s", "_Start");CTRL+ALT+s starts the block
HotKeySet("^!x", "_End");CTRL+ALT+x ends the block
HotKeySet("{ESC}", "_Exit");ESC exits the program

While 1
    Sleep(10)
WEnd

Func _Start()
    BlockInput(1)
EndFunc

Func _End()
    BlockInput(0)
EndFunc

Func _Exit()
    Exit
EndFunc

@Valuater

If your code uses BlockInput ignore this post hehe.

I hope the above helps with the situation,

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Share this post


Link to post
Share on other sites

I don't like block input because it blocks your mouse too. It comes in handy every once in a while, but other than that, I don't like 100000 hotkeyset's in my scripts.

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

HotKeySet("^!s", "_Start");CTRL+ALT+s starts the block

HotKeySet("^!x", "_End");CTRL+ALT+x ends the block

HotKeySet("{ESC}", "_Exit");ESC exits the program

While 1

Sleep(10)

WEnd

Func _Start()

BlockInput(1)

EndFunc

Func _End()

BlockInput(0)

EndFunc

Func _Exit()

Exit

EndFunc

How should that (HotKeySet("^!x", "_End");CTRL+ALT+x ends the block) work if keybord is already blocked???? :o

So long,

Mega

Edited by th.meger

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

CTRL+ALT+x does not unblock input as you cant input it. The only way to unblock input is to use CTRL+ALT+DEL as it says in the help file.

EDIT - Too slow again.

Edited by BigDod


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

How should that (HotKeySet("^!x", "_End");CTRL+ALT+x ends the block) work if keybord is already blocked???? :o

So long,

Mega

CTRL+ALT+x does not unblock input as you cant input it. The only way to unblock input is to use CTRL+ALT+DEL as it says in the help file.

EDIT - Too slow again.

You both caught me!! lol :geek:

I cant believe I did that. haha

@=sinister=

I thought he wanted the mouse blocked as well.

Anyways... use the CTRL+ALT+DEL to end the BlockInput ;)

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

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
Sign in to follow this  
Followers 0