Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

spam key script request


  • Please log in to reply
6 replies to this topic
kuzyn007
  • Members
  • 3 posts
  • Last active: May 06 2011 08:34 PM
  • Joined: 05 May 2011
hi,
My English is not good but I hope it will enough to understand me.

Im looking for script to spam key "1" all the time (ofcourse it will start to spam when I will hit "1" once) and it will break when I will hit any key on keyboard or mouse.

I was trying to find this script on forum ofc and:
~$*1::     ;This makes the hotkey, so 1 triggers the script
Loop                 ;loop the script untill broken
{ ;loop start
    GetKeyState 1, P ;Get the state of 1
    Send {1}  ;It hasnt been released so send another Click
    sleep 675  ; This is the time between presses, after its slept it will return to the top of the loop and start again
} ;loop end
it unfortunately would spam 1 all the time.

I just need one click to start the script and any other key would break it. Usually here i was finding scripts with hold down key script but its not what im looking for.

Thx for help!:)
I was trying to find answer in tutorial and in topics on this forum. Maybe my searching was bad but i was trying to find it few hours.

LazyMan
  • Members
  • 587 posts
  • Last active: Oct 21 2014 05:13 PM
  • Joined: 17 Feb 2011
You might find what you want at The definitive autofire thread!.

kuzyn007
  • Members
  • 3 posts
  • Last active: May 06 2011 08:34 PM
  • Joined: 05 May 2011
I was reading this thread and there is not macro what i am looking for. There is macro with hold down key or start/pause click.

I just need to break macro by clicking any key on the keyboard/mouse, is it possible with autohotkey?

LazyMan
  • Members
  • 587 posts
  • Last active: Oct 21 2014 05:13 PM
  • Joined: 17 Feb 2011
;; Hit any key to break



AnyEndKeys =

( LTrim Join

   {LWin}{RWin}{AppsKey}

   {LShift}{RShift}{LControl}{RControl}{LAlt}{RAlt}

   {F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}

   {Left}{Right}{Up}{Down}

   {Insert}{Delete}{Home}{End}{PgUp}{PgDn}

   {Space}{Tab}{Enter}{Escape}{Backspace}

   {CapsLock}{NumLock}{ScrollLock}

   {PrintScreen}{Pause}

   {Numpad0}{Numpad1}{Numpad2}{Numpad3}{Numpad4}

   {Numpad5}{Numpad6}{Numpad7}{Numpad8}{Numpad9}

   {NumpadIns}{NumpadEnd}{NumpadDown}{NumpadPgDn}{NumpadLeft}

   {NumpadClear}{NumpadRight}{NumpadHome}{NumpadUp}{NumpadPgUp}

   {NumpadDot}{NumpadDel}

   {NumpadDiv}{NumpadMult}{NumpadSub}{NumpadAdd}{NumpadEnter}

)



1::

   SendPlay 1

   SetTimer Spam1, 30

   Input AnyKey, L1, %AnyEndKeys%

   SetTimer Spam1, Off

Return



Spam1:

   SendPlay 1

Return



kuzyn007
  • Members
  • 3 posts
  • Last active: May 06 2011 08:34 PM
  • Joined: 05 May 2011
Big thanks!!! this is what i was looking for:)

Again thanks

jcheung
  • Members
  • 1 posts
  • Last active: Sep 10 2011 11:51 PM
  • Joined: 10 Sep 2011
feel kind of stupid, but what about a-z and the rest?

LazyMan
  • Members
  • 587 posts
  • Last active: Oct 21 2014 05:13 PM
  • Joined: 17 Feb 2011

what about a-z and the rest?

The rest are handled by the Input command.