Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #SingleInstance, Force
- #KeyHistory, 0
- SetBatchLines, -1
- ListLines, Off
- SendMode Input ; Forces Send and SendRaw to use SendInput buffering for speed.
- SetTitleMatchMode, 3 ; A window's title must exactly match WinTitle to be a match.
- SetWorkingDir, %A_ScriptDir%
- SplitPath, A_ScriptName, , , , thisscriptname
- #MaxThreadsPerHotkey, 1 ; no re-entrant hotkey handling
- ; DetectHiddenWindows, On
- ; SetWinDelay, -1 ; Remove short delay done automatically after every windowing command except IfWinActive and IfWinExist
- ; SetKeyDelay, -1, -1 ; Remove short delay done automatically after every keystroke sent by Send or ControlSend
- ; SetMouseDelay, -1 ; Remove short delay done automatically after Click and MouseMove/Click/Drag
- toggleCheck(checkFnName) {
- %checkFnName%active := !%checkFnName%active
- if (%checkFnName%active) {
- SetTimer, % checkFnName, 50
- } else {
- MsgBox Stopping checking of %checkFnName%
- SetTimer, % checkFnName, Off
- }
- }
- checkFlask(activeX, activeY, activeColor, fullX, fullY, fullColor, key, checkFnName) {
- Random, rand, 0, 50
- SetTimer, % checkFnName, Off
- PixelGetColor, flaskIsActive, activeX, activeY
- if (flaskIsActive = activeColor) {
- PixelGetColor, flaskIsFull, fullX, fullY
- if (flaskIsFull == fullColor) {
- ; MsgBox f3 is ready!
- SendInput, % key
- SetTimer, % checkFnName, % 2000 + (rand*10)
- } else {
- ; MsgBox f3 is not full! - %flaskIsFull%
- SetTimer, % checkFnName, % 75 + rand
- }
- } else {
- ; MsgBox f3 is active! - %flaskIsActive%
- SetTimer, % checkFnName, % 25 + rand
- }
- }
- CheckF3active := false
- CheckF3() {
- checkFlask(809, 2148, 0x2C3B5C, 844, 2037, 0x691B50, 3, "CheckF3")
- }
- CheckF4active := false
- CheckF4() {
- checkFlask(901, 2148, 0x283551, 941, 2026, 0x366B32, 4, "CheckF4")
- }
- CheckF5active := false
- CheckF5() {
- checkFlask(993, 2148, 0x1A2438, 1033, 2026, 0x356A32, 5, "CheckF5")
- }
- F3::
- toggleCheck("CheckF3")
- return
- F4::
- toggleCheck("CheckF4")
- return
- F5::
- toggleCheck("CheckF5")
- return
- F7:: ; press control+r to reload
- Msgbox reloading script
- Reload
- return
- F8:: ; Control+Alt+Z hotkey.
- MouseGetPos, MouseX, MouseY
- PixelGetColor, color, %MouseX%, %MouseY%
- MsgBox posx %MouseX%, posy %MouseY%, color: %color%
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement