Sign in to follow this  
Followers 0

Multiple Keys

10 posts in this topic

#1 ·  Posted

In my script, it presses one key, but it won't allow me to press a different key. Any way to help?

Share this post


Link to post
Share on other sites



#2 ·  Posted

My crystal ball is in the repair shop today :x


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

#3 ·  Posted

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.  

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#5 ·  Posted

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.  

Share this post


Link to post
Share on other sites

#6 ·  Posted

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

Share this post


Link to post
Share on other sites

#7 ·  Posted

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?

Share this post


Link to post
Share on other sites

#8 ·  Posted

Essentially, yes.

Share this post


Link to post
Share on other sites

#9 ·  Posted

Bump.

Share this post


Link to post
Share on other sites

#10 ·  Posted

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.  

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