Jump to content

Does AutoIt have an IsPressed Function?


Recommended Posts

why the delete key? thats the most useful of the three of them, break off ALT...

Anyway, Lockup the Enter Key, so if Enter is pressed, it also Mousetraps so he cant log you off, the worst thing he could do is open task manager and have a locked up mouse, which only you can unlock with another key...

At my school, we use Novel, and some people around me like to piss me off by logging me off, so I made a little script that disabled the "logoff" button (ControlDisable())

Edit: Doh! Then you cant use the enter key XD, well, make it do this: if ALT + ENTER are pressed, it sends enter normally XD

P.S. Well met, asian.

Edited by VindicatorOmega

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Link to comment
Share on other sites

hotkey the L key too? lol

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Link to comment
Share on other sites

While 1 
    If WinExists('Windows Task Manager') then 
        WinClose('Windows Task Manager')
    EndIf 
    Sleep(20)
WEnd

Edit: How does "Ctrl + Alt + Delete Enter Enter" log you out? It doesn't do anything for me... But this will still keep the task manager closed.

Edit: Perhaps a better alternative which requires no constant looping:

Run(@SystemDir & '\taskmgr.exe', '', @SW_HIDE)
Edited by Achilles
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

Just write a script to run using 2 mouse button functions, 1 to run and the other to stop the script. Then use the BlockInput() function.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

How does "Ctrl + Alt + Delete Enter Enter" log you out? It doesn't do anything for me... But this will still keep the task manager closed.

If you have enabled it, there is a screen showing you some alternatives when ctrl+alt+del is pressed, and amongs them are logout.

Broken link? PM me and I'll send you the file!

Link to comment
Share on other sites

Whats funnier is setting a beep in a loop onto one of the school's computer catalog thingies hehe... sure, they can simply turn off the computer, but it sure pisses off librarians...

ANYWAY, if you have a school like mine with a box with a bunch of buttons (thus, when enter is pressed, you log out)) I would simply disable that button using ControlDisable()

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...