References (Requirements)
----------------------------------------------------------------------------------------------------------------------------
1. https://github.com/iseahound/ImagePut (v1.8+)
2. [removed by moderator]
3. AutoHotkey_1.1.34.03_setup+ (https://www.autohotkey.com/)
4. Window Activate/Focus is required.
5. Open Notepad with wintitle as "Untitled - Notepad".
----------------------------------------------------------------------------------------------------------------------------
Timer Skill Cooldown
----------------------------------------------------------------------------------------------------------------------------
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
global wintitleA := "Untitled - Notepad"
Buff(){
if WinExist(wintitleA)
WinActivate ; Use the window found by WinExist.
ToolTip % "Buff"
}
#Persistent
SetTimer, Tick, 1000
Tick(){
static count := 10
ToolTip % count--
if(count < 0){
Buff()
count := 10
}
}
ESC:: ExitApp
Return
Windows Activate
----------------------------------------------------------------------------------------------------------------------------
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
wintitleA := "Untitled - Notepad"
wintitleB := "new 1 - Notepad++ [Administrator]"
OddOrEven(num){
return ((Num & 1) != 0) ? "Odd" : "Even"
}
FocusA(title){
if WinExist(title)
WinActivate ; Use the window found by WinExist.
}
FocusB(title){
if WinExist(title)
WinActivate ; Use the window found by WinExist.
}
counter := 0
Loop{
if(counter >= 10)
ExitApp
if(OddOrEven(counter) == "Odd")
FocusA(wintitleA)
if(OddOrEven(counter) == "Even")
FocusB(wintitleB)
counter++
Sleep 1000
}
Windows Captured
----------------------------------------------------------------------------------------------------------------------------
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#include Lib\ImagePut.ahk
#singleinstance force
wintitle := Untitled - Notepad"
counter := 0
Loop{
if(counter >= 11)
ExitApp
if WinExist(wintitle){
WinActivate ; Use the window found by WinExist.
}
winCaptured := ImagePutBuffer({window: wintitle})
winCaptured.Show()
winCaptured := ""
counter++
sleep 1000
}
Send Keys
----------------------------------------------------------------------------------------------------------------------------
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetKeyDelay, 1000, 700
SetTitleMatchMode 2
wintitle := "Untitled - Notepad"
counter := 0
Loop{
if(counter >= 10)
ExitApp
if WinExist(wintitle)
WinActivate ; Use the window found by WinExist.
Send {1 2}
counter++
Sleep 1000
}
Mod actions:
- Moved topic from “Ask For Help”
- Removed instruction to google site that OP has been spamming.
- Added code tags to last piece of code