Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv
- #SingleInstance Force
- #MaxThreadsperHotkey 2
- point := True
- point1 := True
- toggle := False
- xx = 1
- Loop, Read, Settings.txt
- {
- if (";" != SubStr(A_LoopReadLine, 1, 1)) {
- yy := StrReplace(A_LoopReadLine, A_Space, "")
- yy := StrSplit(yy, "=")
- if (point1) and (xx = 1) {
- if (yy[2] = 1) {
- issprint := True
- } else {
- issprint := False
- }
- point1 := False
- xx = 0
- }
- else if (xx <= 5) and (point) {
- if (yy[2] = "") {
- if (xx != 5) or (issprint) and (xx = 5) {
- MsgBox, Missing a necessary hotkey, script won't launch. Check the settings.txt file.
- ExitApp
- }
- }
- Hotkey%xx% := yy[2]
- } else if (xx <= 7) and (point) {
- if (yy[2] != "") {
- Hotkey%xx% := yy[2]
- Hotkey := % Hotkey%xx%
- if (issprint) {
- Hotkey, +%Hotkey%, Moonwalk%xx%
- }
- Hotkey, %Hotkey%, Moonwalk%xx%
- }
- } else if (point) {
- point := False
- xx = 1
- if (yy[2] = "") {
- Time%xx% := 0
- } else {
- Time%xx% := yy[2]
- }
- } else if (!point) and (xx <= 11) {
- if (yy[2] = "") {
- Time%xx% := 0
- } else {
- Time%xx% := yy[2]
- }
- }
- xx += 1
- }
- }
- if (Hotkey7 = "") and (Hotkey6 = "") {
- MsgBox, Missing 2 main hotkeys, script won't launch. Check the settings.txt file.
- }
- return
- Moonwalk6:
- if (toggle) {
- toggle := False
- GetKeyState, state, %Hotkey6%
- while (state = "D") {
- GetKeyState, state, %Hotkey6%
- }
- return
- } else if (looping) {
- toggle := False
- GetKeyState, state, %Hotkey6%
- while (state = "D") {
- GetKeyState, state, %Hotkey6%
- }
- return
- } else {
- toggle := True
- GetKeyState, state, %Hotkey6%
- while (state = "D") {
- GetKeyState, state, %Hotkey6%
- }
- }
- if (issprint) {
- sendinput {%hotkey5% down}
- }
- sendinput {%Hotkey3% down}
- sleep %Time1%
- sendinput {%Hotkey3% up}
- sendinput {%Hotkey2% down}
- sleep %Time2%
- sendinput {%Hotkey2% up}
- sendinput {%Hotkey4% down}
- sleep %Time3%
- sendinput {%Hotkey4% up}
- sendinput {%Hotkey1% down}
- sleep %Time4%
- sendinput {%Hotkey1% up}
- sendinput {%Hotkey2% down}
- while (toggle) {
- sendinput {%Hotkey3% down}
- sleep %Time5%
- sendinput {%Hotkey3% up}
- sendinput {%Hotkey4% down}
- sleep %Time6%
- sendinput {%Hotkey4% up}
- }
- if (issprint) {
- sendinput {%hotkey5% up}
- }
- sendinput {%Hotkey2% up}
- return
- Moonwalk7:
- if (toggle) {
- toggle := False
- GetKeyState, state, %Hotkey7%
- while (state = "D") {
- GetKeyState, state, %Hotkey7%
- }
- return
- } else if (looping) {
- toggle := False
- GetKeyState, state, %Hotkey7%
- while (state = "D") {
- GetKeyState, state, %Hotkey7%
- }
- return
- } else {
- toggle := True
- GetKeyState, state, %Hotkey7%
- while (state = "D") {
- GetKeyState, state, %Hotkey7%
- }
- }
- if (issprint) {
- sendinput {%hotkey5% down}
- }
- sendinput {%Hotkey1% down}
- sleep %Time7%
- sendinput {%Hotkey1% up}
- sendinput {%Hotkey3% down}
- sleep %Time8%
- sendinput {%Hotkey3% up}
- sendinput {%Hotkey2% down}
- sleep %Time9%
- sendinput {%Hotkey2% up}
- sendinput {%Hotkey1% down}
- while (toggle) {
- sendinput {%Hotkey3% down}
- sleep %Time5%
- sendinput {%Hotkey3% up}
- sendinput {%Hotkey4% down}
- sleep %Time6%
- sendinput {%Hotkey4% up}
- looping := True
- }
- looping := False
- if (issprint) {
- sendinput {%hotkey5% up}
- }
- sendinput {%Hotkey1% up}
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement