Page 2 of 2

Re: Help With script.

Posted: 08 May 2024, 19:03
by boiler
I don’t care what the character’s name is. I am pointing out that the window title not matching exactly is the main possible reason the window doesn’t activate when you press the hotkey. What does it show when that window is open and you run the script below?

Code: Select all

MsgBox, % WinExist("Will-shot ahk_exe DofusMod.exe") ? "Found" : "Not found"

Re: Help With script.

Posted: 09 May 2024, 14:14
by drwill
@boiler

I retyped, this is it.

Re: Help With script.

Posted: 09 May 2024, 14:43
by boiler
What does that mean? Did you run the script I showed or not? What did it show?

Re: Help With script.

Posted: 09 May 2024, 15:49
by drwill

Code: Select all

F1::
WinActivate, Willhood ahk_exe DofusMod.exe
return

F2::
WinActivate,  Will-shot ahk_exe DofusMod.exe
Send, {tab}
return
IT WORKED!

But i still need to set the cursor mouse on the middle of the screen of the respective window that F1 or F2 calls. Can you guys help me?

Re: Help With script.

Posted: 09 May 2024, 16:45
by boiler

Code: Select all

F1::
WinActivate, Willhood ahk_exe DofusMod.exe
WinGetPos,,, w, h, Willhood ahk_exe DofusMod.exe
MouseMove, w / 2, h / 2, 0
return

F2::
WinActivate, Will-shot ahk_exe DofusMod.exe
WinGetPos,,, w, h, Will-shot ahk_exe DofusMod.exe
MouseMove, w / 2, h / 2, 0
Send, {tab}
return

Re: Help With script.

Posted: 16 May 2024, 19:22
by drwill
All done here, thank you guys!