Jump to content

Multiple Keys


Orkin
 Share

Recommended Posts

Hello Orkin,

First, Welcome to the AutoIt Forums :x

What kaotkbliss is trying to convey, is that it is difficult to assist you with very little information to go on. It's like going to an automotive forum, and saying 'My car won't start, How do I fix it?' Without knowing your fuel level, battery charge, or any other information about your vehicle how can they help?

With that in mind, there are 3 things one should do to find a proper solution here.

1. Describe What results you expect of you code.

2. Describe what problem/error you are getting.

3. Show your code, or atleast an example of it.

These 3 details allow advanced members to better find the problem and give you a proper solution, rather than guessing a solution from thousands of possibilities.

Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Link to comment
Share on other sites

Well I want it to hit spacebar lots of times. I have everything working perfectly, except, it works a little too well. I can't seem to hit any other keys because it's going to fast! I tried sleep() but it's inaccurate :x Here's the code snippet:

While $running = True & _IsPressed("{space}") 
         HotKeySet("{space}", "_onoff")              
         ControlSend("","","", $JUMP)
     Wend

Sorry for being ambiguous.

Edited by Orkin
Link to comment
Share on other sites

Orkin,

Still missing some critical information

Where is your _onoff function?

If I understand what your attempting to do, you should'nt have the HotKeySet function inside the loop.

Look at the examples in the Help File under HotKeySet()

Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

Link to comment
Share on other sites

Orkin,

Still missing some critical information

Where is your _onoff function?

If I understand what your attempting to do, you should'nt have the HotKeySet function inside the loop.

Look at the examples in the Help File under HotKeySet()

Realm

Okay. It all seems to work though. The hotkeyset is just a toggler. When it toggles on I can't press any keys while it presses spacebar lots of times. New snippet.
func _onoff() 
    if $running = True Then
        $running = False                                                                                                                          
        Else
        $running = True                                                                                    
        _cs()
    EndIf       
EndFunc
Link to comment
Share on other sites

Well I want it to hit spacebar lots of times. I have everything working perfectly, except, it works a little too well. I can't seem to hit any other keys because it's going to fast! I tried sleep() but it's inaccurate :x Here's the code snippet:

While $running = True & _IsPressed("{space}") 
         HotKeySet("{space}", "_onoff")              
         ControlSend("","","", $JUMP)
     Wend

Sorry for being ambiguous.

Basically what you're trying to do is make an old school "turbo button", correct?
Link to comment
Share on other sites

Orkin,

The reason that members here are no longer helping you is because game automation is a no discussion topic here as you can see in the announcement at the top of this forum.

Sorry!

Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry. 

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