Jump to content

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

[REQ] "Simple" Toggle loop script



  • Please log in to reply
10 replies to this topic
kalenen
  • Members
  • 7 posts
  • Last active: Oct 07 2013 11:51 PM
  • Joined: 04 Oct 2013

Im playing final fantasy 14 and lvling through fates get very tedious and im looking for a script that will repeat 1-3 spells in a rotation and keep doing that until i hit the keybind again to toggle it off

 

Im as green as you can get when it comes to this program so im asking for some help here cause i tried googling and cant get a working one going

 

 

 

i need it to use keyboard keys: 2  -   3  -   4 with a wait time of 2.5 sec inbetween and the toggle start/stop key to be "§"

 

 

 

Please help me outshocked.png



kalenen
  • Members
  • 7 posts
  • Last active: Oct 07 2013 11:51 PM
  • Joined: 04 Oct 2013

pls have it loop, major gratitude if you help out



kalenen
  • Members
  • 7 posts
  • Last active: Oct 07 2013 11:51 PM
  • Joined: 04 Oct 2013

BUUUUUMP



kalenen
  • Members
  • 7 posts
  • Last active: Oct 07 2013 11:51 PM
  • Joined: 04 Oct 2013

Heeeeeeeelp



DataLife
  • Members
  • 1022 posts
  • Last active: Nov 27 2015 01:09 AM
  • Joined: 27 Apr 2008
Please post your code and I will see If I can help.
Check out my scripts.  (MyIpChanger) (XPSnap) (SavePictureAs) All my scripts are tested on Windows 7, AutoHotkey 32 bit Ansi unless otherwise stated.

kalenen
  • Members
  • 7 posts
  • Last active: Oct 07 2013 11:51 PM
  • Joined: 04 Oct 2013

i dont have any code. deleted them cause they didnt work



DataLife
  • Members
  • 1022 posts
  • Last active: Nov 27 2015 01:09 AM
  • Joined: 27 Apr 2008
I don't play final fantasy, but I will try to help if I can. The code below may give you some ideas.

and the toggle start/stop key to be "§"

What is this character §

With the code below press the End key to start and press the End key to stop. Put your "spells" in the Label called RepeatCode.
BreakLoop = 0
TrayTip,Press the End key to start script,-,30  ;display for 30 seconds
return


End:: 
BreakLoop := !BreakLoop ;sets the value of BreakLoop to the opposite value, 1 to 0 and 0 to 1

if BreakLoop = 1
 {
  TrayTip,RepeatCode label will start in 2.5 seconds,-
  SetTimer,RepeatCode,2500 ;repeats code in label RepeatCode every 2.5 seconds
 }

else
 {
  traytip                     ;turns the below traytip off immediately when the End key is press
  NumberOfTimesRepeatLabelHasRan = 0
  Settimer,RepeatCode,off
 }
return


RepeatCode:

  NumberOfTimesRepeatLabelHasRan++
  ;This code will run every 2.5 seconds
  ;add code to repeat 1-3 spells
  Traytip, Number of times RepeatCode label has ran (%NumberOfTimesRepeatLabelHasRan%), (Press Escape to exit script)(Press End to stop RepeatCode label),
  
return

escape::
exitapp

Check out my scripts.  (MyIpChanger) (XPSnap) (SavePictureAs) All my scripts are tested on Windows 7, AutoHotkey 32 bit Ansi unless otherwise stated.

kalenen
  • Members
  • 7 posts
  • Last active: Oct 07 2013 11:51 PM
  • Joined: 04 Oct 2013

thx for trying but the code isnt working

 

sure it hits 2, waits 2.5 sec, hits 3, waits and then 4 and starts over. but i cannot turn it off with § again

 

the § key is the one to the left of key nr 1

BreakLoop = 0
TrayTip,Press the § key to start script,-,30  ;display for 30 seconds
return


§:: 
BreakLoop := !BreakLoop ;sets the value of BreakLoop to the opposite value, 1 to 0 and 0 to 1

if BreakLoop = 1
 {
  TrayTip,RepeatCode label will start in 2.5 seconds,-
  SetTimer,RepeatCode,2500 ;repeats code in label RepeatCode every 2.5 seconds
 }

else
 {
  traytip                     ;turns the below traytip off immediately when the End key is press
  NumberOfTimesRepeatLabelHasRan = 0
  Settimer,RepeatCode,off
 }
return


RepeatCode:

  Send {2}
  Send {3}
  Send {4}
  Traytip, Number of times RepeatCode label has ran (%NumberOfTimesRepeatLabelHasRan%), (Press Escape to exit script)(Press End to stop RepeatCode label),
  
return

escape::
exitapp


DataLife
  • Members
  • 1022 posts
  • Last active: Nov 27 2015 01:09 AM
  • Joined: 27 Apr 2008
Actually the way the script is written it would send 2, send 3, send 4 then wait 2.5 seconds and do it all over again.

Did the § key start the loop?

I don't have this key on my keyboard.

Maybe we should use the End key until we get the rest of the script done the way you want it.

Try this
SendNumbers = 0

Loop
 {
  if SendNumbers = 1
   {
    Traytip,Loop is running,(Press Escape to exit script)(Press End to stop sending number),8 
	
	Send {2}
        sleep 2500 ;if you want to send 2 3 4 then wait  2.5 seconds take out this sleep
	
	if SendNumbers = 0
	 goto SkipCode
    
	Send {3}
        sleep 2500 ;if you want to send 2 3 4 then wait  2.5 seconds take out this sleep
    
	if SendNumbers = 0
	 goto SkipCode
    
	Send {4}
        sleep 2500 
    
    SkipCode:	
   }
  if SendNumbers = 0
   Traytip
 }
  
return

End::
SendNumbers := !SendNumbers ;sets the value of SendNumbers to the opposite value, 1 to 0 and 0 to 1
return

escape::
exitapp


Check out my scripts.  (MyIpChanger) (XPSnap) (SavePictureAs) All my scripts are tested on Windows 7, AutoHotkey 32 bit Ansi unless otherwise stated.

kalenen
  • Members
  • 7 posts
  • Last active: Oct 07 2013 11:51 PM
  • Joined: 04 Oct 2013
✓  Best Answer

Omfg it actually works! i could kiss you!

 

i just made the start/stop key to "§" and removed the escape close script. cause i use escape alot in the game

 

THaaaaank yooooooooooooooooou :D

SendNumbers = 0

Loop
 {
  if SendNumbers = 1
   {
    Traytip,Loop is running,(Press Escape to exit script)(Press End to stop sending number),8 
	
	Send {2}
        sleep 2500 ;if you want to send 2 3 4 then wait  2.5 seconds take out this sleep
	
	if SendNumbers = 0
	 goto SkipCode
    
	Send {3}
        sleep 2500 ;if you want to send 2 3 4 then wait  2.5 seconds take out this sleep
    
	if SendNumbers = 0
	 goto SkipCode
    
	Send {4}
        sleep 2500 
    
    SkipCode:	
   }
  if SendNumbers = 0
   Traytip
 }
  
return

§::
SendNumbers := !SendNumbers ;sets the value of SendNumbers to the opposite value, 1 to 0 and 0 to 1
return


DataLife
  • Members
  • 1022 posts
  • Last active: Nov 27 2015 01:09 AM
  • Joined: 27 Apr 2008
your welcome
Check out my scripts.  (MyIpChanger) (XPSnap) (SavePictureAs) All my scripts are tested on Windows 7, AutoHotkey 32 bit Ansi unless otherwise stated.