Jump to content

Help on IfPressed


Recommended Posts

Yes look it up in BETA helpfile :D

--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Link to comment
Share on other sites

  • Moderators

For the record... it's not _IfPressed... it's _IsPressed.... It seems that some people have been getting it wrong lately.

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.

Link to comment
Share on other sites

oooooo okay thx for Is pressed notice grr i still cant find it i have the beta help open..

nvm i found it. is there one for being released?

grr there is almost every key listed cept ~ or `

Edited by Chobyhy
Link to comment
Share on other sites

IsPressed refers to a key being held?

im trying to make a script where if the key is being held it keeps on looping. until key gets released and when it gets released it goes back to some original settings.

Link to comment
Share on other sites

Press and release left mouse button :

#include <Misc.au3>

$pressed = 0

While 1
    Sleep(100)
    
    ; press
    If _IsPressed ("01") And $pressed = 0 Then $pressed = 1
    
    ; release and action
    If Not _IsPressed ("01") And $pressed = 1 Then
        $pressed = 0
        Action ()
    EndIf
    
WEnd

Func Action()
    MsgBox(64, "", "released")
EndFunc
Link to comment
Share on other sites

lol cool but thx for suggestion but i need help with the following

IsPress refers to key being held?

Is there IsPress code for ` which is ~ when shifted.

Is there any functions for key being released?

The reason i need the following is because when ` is pressed, settings for my games change using hotkeys and it does some loops on mouseclicks and holds a different key down and when the key is released, mouse stops clicking and the key that was being held down by ` key will be released along with settings reverse back to way it was.

Link to comment
Share on other sites

lol cool but thx for suggestion but i need help with the following

IsPress refers to key being held?

Is there IsPress code for ` which is ~ when shifted.

Is there any functions for key being released?

The reason i need the following is because when ` is pressed, settings for my games change using hotkeys and it does some loops on mouseclicks and holds a different key down and when the key is released, mouse stops clicking and the key that was being held down by ` key will be released along with settings reverse back to way it was.

If you have the beta helpfile, then enter _IsPressed in the "index" tab (not the "contents" tab), and it should take you right there.
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...