Skip to content

Instantly share code, notes, and snippets.

@mikeshardmind
Created July 8, 2017 01:53
Show Gist options
  • Save mikeshardmind/852f76c3c40ca527ebad699a2514fe2b to your computer and use it in GitHub Desktop.
Save mikeshardmind/852f76c3c40ca527ebad699a2514fe2b to your computer and use it in GitHub Desktop.
;This section makes the flashing dofus window come to front, dont touch this without knowing what you are doing
DetectHiddenWindows, On
Script_Hwnd := WinExist("ahk_class AutoHotkey ahk_pid " DllCall("GetCurrentProcessId"))
DetectHiddenWindows, Off
DllCall("RegisterShellHookWindow", "uint", Script_Hwnd)
OnMessage(DllCall("RegisterWindowMessage", "str", "SHELLHOOK"), "ShellEvent")
ShellEvent(wParam, lParam) {
if (wParam = 0x8006) HSHELL_FLASH
{
WinGet,descobre,ProcessName, ahk_id %lParam%
if(descobre = "Dofus.exe")
WinActivate, ahk_id %lParam%
}
}
;This section lets you switch windows with function keys, can be edited to match your character names
#IfWinExist, Sinbad
{
F1::WinActivate Sinbad
}
#IfWinExist, Guinevere
{
F2::WinActivate Guinevere
}
#IfWinExist, General-Quackery
{
F3::WinActivate General-Quackery
}
#IfWinExist, Viviane
{
F4::WinActivate Viviane
}
@Babyboule
Copy link

Merci pour le script !
https://www.autohotkey.fr/dofus/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment