Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Multiple Keys


  • Please log in to reply
9 replies to this topic

#1 Orkin

Orkin

    Seeker

  • Active Members
  • 5 posts

Posted 11 December 2010 - 04:28 AM

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







#2 kaotkbliss

kaotkbliss

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 2,416 posts

Posted 11 December 2010 - 04:30 AM

My crystal ball is in the repair shop today :x

8yyxkx.jpg010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My first project  Allin1 Program launcher

Bill Calculator

Got <Insert problem here>? There's an AutoIt script for that!


#3 Realm

Realm

    Lives in a tiny bubble

  • Active Members
  • PipPipPipPipPipPip
  • 627 posts

Posted 11 December 2010 - 04:47 AM

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.
 

728x90.jpg


#4 Orkin

Orkin

    Seeker

  • Active Members
  • 5 posts

Posted 11 December 2010 - 04:52 AM

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, 11 December 2010 - 05:02 AM.


#5 Realm

Realm

    Lives in a tiny bubble

  • Active Members
  • PipPipPipPipPipPip
  • 627 posts

Posted 11 December 2010 - 05:14 AM

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.
 

728x90.jpg


#6 Orkin

Orkin

    Seeker

  • Active Members
  • 5 posts

Posted 11 December 2010 - 05:17 AM

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


#7 IAmTheManYo

IAmTheManYo

    Seeker

  • Active Members
  • 38 posts

Posted 11 December 2010 - 12:32 PM

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?

#8 Orkin

Orkin

    Seeker

  • Active Members
  • 5 posts

Posted 11 December 2010 - 04:48 PM

Essentially, yes.

#9 Orkin

Orkin

    Seeker

  • Active Members
  • 5 posts

Posted 13 December 2010 - 12:16 AM

Bump.

#10 Realm

Realm

    Lives in a tiny bubble

  • Active Members
  • PipPipPipPipPipPip
  • 627 posts

Posted 13 December 2010 - 04:39 AM

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.
 

728x90.jpg





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users