Sign in to follow this  
Followers 0
amer0612

BlockInput

10 posts in this topic

Hi All :)

I disable my keyboard and mouse using BlockInput(1) at the start of my script...

But what if something went wrong and the script

did not stop executing (BlockInput(0) function was not reached

therefore not executed)?

Other than Ctrl-Alt-Del, is there other way to stop the execution of the script?

Can anyone give me a piece of code? :(

Thanks

Gino

Share this post


Link to post
Share on other sites



I don't think a script will help you. Since you cannot even use your keyboard, because of blocking it.

Maybe you could just restart your pc. but if you already registered it to the registry, try using the safemode.

And manualy delete your application from the registry.

Sorry if i'm wrong

Share this post


Link to post
Share on other sites

Except Ctrl Alt Del, there's no key can break the BlockInput()

if you want to decrease the bad luck, use a function to Disable BlockInput() if the Mouse haven't move for 10 or 20 secs, or similar that

look at MousePos(), it's will be helpful


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

get a loop to make it's easier, but this's the idea

if _Ispress("20") then
sleep(100)
endif

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Except Ctrl Alt Del, there's no key can break the BlockInput()

What about the "Power" key? :)

Edit: you can always create a program to check if the current program is still running somehow - there are multiple ways to accomplish this - none of them quite simple.

Edited by crashdemons

My Projects - WindowDarken (Darken except the active window) Yahsmosis Chat Client (Discontinued) StarShooter Game (Red alert! All hands to battlestations!) YMSG Protocol Support (Discontinued) Circular Keyboard and OSK example. (aka Iris KB) Target Screensaver Drive Toolbar Thingy Rollup Pro (Minimize-to-Titlebar & More!) 2D Launcher physics example Ascii Screenshot AutoIt3 Quine Example ("Is a Quine" is a Quine.) USB Lock (Another system keydrive - with a toast.)

Share this post


Link to post
Share on other sites

What about the "Power" key?

Yes, as it is, it's Powerful

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Share this post


Link to post
Share on other sites

Create an OnAutoitExit Function that will kill blockinput

Opt("OnExitFunc", "KillBlock")

Func KillBlock ()
BlockInput(0)
EndFunc

Share this post


Link to post
Share on other sites

Actually I am looking for a way to monitor the script...

That is if the execution time of the script exceeds a certain

time it should be terminated....

(ex. if the script is running for more than 30 seconds

terminate the program)

Is there a way for this?

Thanks

Share this post


Link to post
Share on other sites

$timer=timerInit()
Do
;your script here
Until TimerDiff($timer)>=30000


[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

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