Jump to content

Loop when key is down


Margen
 Share

Recommended Posts

When I press the button F I'd like it to get looped until I release it. I tried making this script however it keeps looping even after I release the F button. I'm sorry, I'm a beginner so I don't really understand what's the problem. I'd really appreciate it if somebody would help me.

Quote

#include  <Misc.au3>

While 1
    If _IsPressed(46) Then
        While 1
            Send("f")
            sleep(20)
        WEnd
    EndIf
    sleep(10)
WEnd

 

Link to comment
Share on other sites

Please read forum rules.  And if you still think your issue does not relate to any forbidden topics, then I strongly suggest you make a clear story on what is you want to automate.

1- Show the application thru Au3info.exe tool

2- What is the real issue you are facing, not just 10 lines of useless code

3- Explain a detailed description of the input and the expected output 

Link to comment
Share on other sites

  • Moderators

A couple things here:

@Margen as you state yourself it is is for AMXMODX, which is for half-life scripting, this topic does fall afoul of the rules. I suggest you read them now, especially these two bits, before you post again:

Quote

Launching, automation or script interaction with games or game servers, regardless of the game.

 Do not repost the same question if the previous thread has been locked - particularly if you merely reword the question to get around one of the prohibitions listed above.

 

For those that know better, you all need to review the forum rules as well:

Quote

If you feel a post needs Moderator attention, please use the "Report" button next to the post date at the top.

please do not enter into an argument with the original poster - that is why we have Moderators.

If you are unsure of what you should be doing when you see something out of place, please review this thread. Hopefully we do not, again, have to resort to sanctions to get this point across.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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