Sign in to follow this  
Followers 0
Chobyhy

Help on IfPressed

10 posts in this topic

i cant find this topic in manual does anyone wanna tell me details to find it? and is there such coding for when the key was released?

Share this post


Link to post
Share on other sites



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]

Share this post


Link to post
Share on other sites

i did. which category even tried searching..

Share this post


Link to post
Share on other sites

IsPressed is a UDF that is in the betas only. Download the newest and there you go..

Share this post


Link to post
Share on other sites

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


[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

#6 ·  Posted (edited)

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

Share this post


Link to post
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.

Share this post


Link to post
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

Share this post


Link to post
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.

Share this post


Link to post
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.

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