Jump to content

Key held macro


Recommended Posts

By now, I want to say, I'm a total begginer in AutoIt scripting.

I want to make a KEY HELD MACRO.

What I mean by that, is when you hold certain button script will continuously click RMC or LMC.

What I did is:

HotKeySet("up up", "go")
HotKeySet("up down", "stop")

$enable = False

While 1
    if $enable = True Then
            MouseClick("secondary")
        EndIf
WEnd

func go()
    $enable = True
EndFunc

func stop()
    $enable = False
EndFunc

 And, everything works fine, when I change "up up" or "up down" to e.g. "m" and "n" buttons.

But I want it KEY HELD so I made "up up" and "up down". And doesn't work (no errors, just no reaction)

Adding more, I'd like to have this key as MOUSE4 (side mouse button)...

Can someone fix this and send? (it CAN be without MOUSE4, but I preffer with)

 

Thanks.

Link to comment
Share on other sites

  • Developers
50 minutes ago, NorteX said:

lease reply I need that fast, don't want to use these Ns and Ms

No problem, just sign the contract and I will serve you immediately for $200 an hour, else please stick to the rules and don't bump threads within 24 hours.
What is this "urgent" thing anyways for?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

29 minutes ago, Jos said:

No problem, just sign the contract and I will serve you immediately for $200 an hour, else please stick to the rules and don't bump threads within 24 hours.
What is this "urgent" thing anyways for?

Jos

OK I want to order this $200 thingy, payment method: PayPal pless

Link to comment
Share on other sites

6 minutes ago, Juvigy said:

Ok, sooo I have read that, and this is not exactly what I want. IT doesn't have to be the arrow key, can be anything, like letter B.

What I need is, when you hold button, the loop continues. When you stop pressing on button, loop will stop and not do anything. Still not solved!

Link to comment
Share on other sites

  • Developers
5 minutes ago, NorteX said:

OK I want to order this $200 thingy, payment method: PayPal pless

.. and the answer to my second question is?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Just now, Jos said:

meaning what exactly?

ahh i dont understand you you dont understand me... lets give up, someone will help!

 

 

 

 

How to continue loop if the key is held, stop loop when it's released. Easy!

Link to comment
Share on other sites

  • Developers
1 hour ago, NorteX said:

lets give up, someone will help!

lets not and simply give a proper answer or else this thread will be closed forever.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

1 hour ago, NorteX said:

ahh i dont understand you you dont understand me... lets give up, someone will help!

What is the script needed for?  Depending on your answer(s) will determine their response.

Acting suspicious is an answer by the way.

Edited by Somerset
Link to comment
Share on other sites

  • Developers

Ah, so you thought you could simply start a new thread and be done with my question.
Merged and this time the last chance to formulate a proper answer.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

On 5.05.2018 at 12:15 PM, Jos said:

Ah, so you thought you could simply start a new thread and be done with my question.
Merged and this time the last chance to formulate a proper answer.

Jos

I'll hate you to the end of my life... -,-

Link to comment
Share on other sites

  • Moderators

I don't know about the end of your life, but the end of your time on this forum is quickly approaching...

"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

  • Developers
49 minutes ago, NorteX said:

I'll hate you to the end of my life... -,-

no idea what caused that remark as I would think the question was pretty simple and can only imply you do not wish to answer it.
...... your choice and I tend to stick to my word .....  bye

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...