Help With script. Topic is solved

Ask gaming related questions (AHK v1.1 and older)
User avatar
boiler
Posts: 17206
Joined: 21 Dec 2014, 02:44

Re: Help With script.

Post by boiler » 08 May 2024, 19:03

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"
drwill
Posts: 12
Joined: 05 May 2024, 12:38

Re: Help With script.

Post by drwill » 09 May 2024, 14:14

@boiler

I retyped, this is it.
User avatar
boiler
Posts: 17206
Joined: 21 Dec 2014, 02:44

Re: Help With script.

Post by boiler » 09 May 2024, 14:43

What does that mean? Did you run the script I showed or not? What did it show?
drwill
Posts: 12
Joined: 05 May 2024, 12:38

Re: Help With script.

Post by drwill » 09 May 2024, 15:49

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?
User avatar
boiler
Posts: 17206
Joined: 21 Dec 2014, 02:44

Re: Help With script.

Post by boiler » 09 May 2024, 16:45

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
drwill
Posts: 12
Joined: 05 May 2024, 12:38

Re: Help With script.

Post by drwill » 16 May 2024, 19:22

All done here, thank you guys!
Post Reply

Return to “Gaming Help (v1)”