Jump to content
NorteX

Key held macro

Recommended Posts

NorteX

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.

Share this post


Link to post
Share on other sites
NorteX

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

Share this post


Link to post
Share on other sites
Jos
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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
NorteX
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

Share this post


Link to post
Share on other sites
NorteX
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!

Share this post


Link to post
Share on other sites
Jos
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?


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
NorteX
36 minutes ago, Jos said:

What is this "urgent" thing anyways for?

IDK

Share this post


Link to post
Share on other sites
NorteX
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!

Share this post


Link to post
Share on other sites
Jos
Posted (edited)
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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Somerset
Posted (edited)
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

 

Spoiler

shoot_zpsfd329d66.png
dontbelieveeverythingyouthink_zps0e1e900

Madness is the first step to understanding...

Share this post


Link to post
Share on other sites
NorteX
Posted (edited)

How can I make a bind, that if the button is pushed, loop continues, if I release it loop stops and doesn't do anything.

Edited by NorteX

Share this post


Link to post
Share on other sites
Jos

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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
NorteX
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... -,-

Share this post


Link to post
Share on other sites
JLogan3o13

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


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
Jos
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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×