Skip to content Skip to sidebar Skip to footer

Autohotkey to Mash Button Until a Button Is Pressed Again

  • Members
  • one posts
  • Last active: Mar 13 2014 03:23 PM
  • Joined: 12 Mar 2014

Look, I just got the new Southward park game and I am stuck in an area where I need besides press the southward key repeatedly but I cant for the life of me exercise it. Delight can someone make me some script which will repeat the s primal about infinitely similar a turbo part on a controller and then that for the love of god I tin can get out of this scene for the love of god delight!

Dylan.jpg

Edited past AfterLemon, 15 March 2014 - 08:08 PM.
Please utilize a relevant title, thanks

  • Back to tiptop

hachi

  • Members
  • 330 posts
  • Concluding active: Jul 14 2015 02:09 AM
  • Joined: 24 Jan 2010
  • Back to height

WAZAAAAA

  • Members
  • 14 posts
  • Concluding active: Sep thirty 2015 06:34 PM
  • Joined: 25 May 2013

Test your might, examination your strength lol
Try with this script: concord F1 to mash the S button (release F1 to stop mashing)

Simple version:

f1:: loop { if not getkeystate("f1","p") intermission send {south down} send {south up} } render

Optimized version (this i may printing buttons too fast for your computer, and it's not fifty-fifty at max speed)

#NoEnv #KeyHistory 0 #MaxThreads 255 #MaxMem 4095 #MaxThreadsBuffer On #MaxHotkeysPerInterval 99000000 #HotkeyInterval 99000000 ListLines Off Process, Priority, , R SetTitleMatchMode fast SetBatchLines, -1 SetKeyDelay, -1, -ane, -1 SetMouseDelay, -1 SetWinDelay, -1 SetControlDelay, -ane SetDefaultMouseSpeed, 0 sleep(period := 1, Mode := "P") { 	static Frequency, MinSetResolution, PID 	if (Mode = "P") 	{ 		pBatchLines := A_BatchLines 		SetBatchLines, -1 		if !Frequency 			DllCall("QueryPerformanceFrequency", "Int64*", Frequency) 		DllCall("QueryPerformanceCounter", "Int64*", Kickoff) 		Cease := Start + ( Frequency * (period/1000)) 		loop  			DllCall("QueryPerformanceCounter", "Int64*", Electric current) 		until (Current >= Finish) 		SetBatchLines, %pBatchLines% 	} 	return }  $*f1:: loop { if not getkeystate("f1","p") break send {due south down} sleep(one, "P") send {southward upward} sleep(1, "P") } return $*ins::exitapp

  • Back to top

hachi

  • Members
  • 330 posts
  • Final active: Jul 14 2015 02:09 AM
  • Joined: 24 Jan 2010

^^no good for reasons discussed in the linked thread, southward park polls input through keyboard hook rather than windows hotkey api. so they will exist competing for precedence and ahk volition lose, unless you work around it with the hacks posted there.


  • Back to pinnacle

WAZAAAAA

  • Members
  • 14 posts
  • Final active: Sep 30 2015 06:34 PM
  • Joined: 25 May 2013

He asked for a mere script that fires the aforementioned primal fast so I delivered. Too, the $* variable I accept included in the optimized version is actually useful to featherbed certain anti-macro systems.


  • Dorsum to top

hachi

  • Members
  • 330 posts
  • Last active: Jul 14 2015 02:09 AM
  • Joined: 24 Jan 2010

relax, I but don't want yet another to waste their time on a script for this game that has nothing chance of working. it is not anti-macro, just a poorly implemented port. doesn't matter if you utilize keyboard hook when an external hook is already running. like I said the thread posted has a workaround for that, you have to do it that way if you want them to burn at all.


  • Back to meridian

trlkly

  • Members
  • 3 posts
  • Concluding agile: Apr 27 2015 01:09 AM
  • Joined: 17 Jun 2011

The following script, based on the idea in the other thread, works for me. It's a launcher, meaning you put it in the same binder as the South Park exe and change your shortcut to run this script instead. Yous brew Due south by pressing Ctrl-S. If y'all go stuck pushing in a direction you don't want, press that direction button to stop.

#InstallKeybdHook #InstallMouseHook #Persistent #SingleInstance force #NoEnv #UseHook On SetBatchLines, -1   if (!WinExist("ahk_class South Park - The Stick of Truth")) 	Run "S Park - The Stick of Truth.exe"  settimer, hookCheck, yard  lastTick := A_TickCount ; so if (A_TickCount - lastTick > 1500) won't evaluate faux which would occur if lastTick was never assigned return  #if WinActive("ahk_class South Park - The Stick of Truth") ^s:: send s return #if     ; This hotkey will fire if AHKs claw is still ; positioned earlier south parks $vk07:: lastTick := A_TickCount  return   hookCheck: if !WinExist("ahk_class South Park - The Stick of Truth") { 	sleep 2000 	if !WinExist("ahk_class South Park - The Stick of Truth") { 		ExitApp 	} } 		 if !WinActive("ahk_class Due south Park - The Stick of Truth") 		render  sendlevel one SendEvent {VK07} sleep 200 if (A_TickCount - lastTick > 1500) 	sendInput {VK07} ; could supersede this with a reload 	;reload return            

You likewise tin just utilise this quick tool, but you must Alt-tab out and showtime information technology right before you desire to use information technology, then press F12 to reset it and then shut information technology when you are finished.


  • Dorsum to height

riversthempailoved.blogspot.com

Source: https://www.autohotkey.com/board/topic/103049-rapid-press-s-key-for-south-park-stick-of-truth/

إرسال تعليق for "Autohotkey to Mash Button Until a Button Is Pressed Again"