Page 1 of 2

[TOOL] Borderless window fullscreen macro

Posted: Thu Apr 09, 2015 5:51 am
by Burn
This tool allows the player to tab in and out of windows without minimizing, allowing the player to do other stuff while waiting in lobby, check Instant messages like Skype, Steam or ENT chat, and prevents WC3 minimizing on pop-ups. If you are using this program, don't forget to either thank or comment in this topic for feedback. The more positive feedback I get, the more updates I'll make.

Only tested and coded on Win7, give me a shout-out if you have a problem for XP, Vista or Win10, I can try to fix it.

Download: https://www.dropbox.com/s/yjf5baexlpw9p ... 1.exe?dl=0

HOTKEYS:
Windows + F11 = Borderless window fullscreen mode
Windows + F12 = Windowed mode with borders
Windows + F10 = locks the cursor inside the Warcraft III window.
Windows + F9 unlocks the cursor from the window. (You can also just press windows button or alt tab)

^ symbol = hold control button down
! symbol = hold alt button down
# symbol = hold windows button
+ button = hold shift button down

SETUP GUIDE:

; Version 1.0 by BurnShady
; This script works with any version of Warcraft III and should work for all future and old releases of AHK.
; To download AHK, visit : http://www.autohotkey.com/
; More macros here: viewtopic.php?f=101&t=36923&p=157401&hilit=inventory#p157401
;
; Setup guide for windows:
; 1) Make a shortcut of your Frozen Throne.exe
; 2) Right click shortcut -> properties
; 3) Under target, add -window to the back
; 4) Mine looks like this, but your path should be different (including quotes): "C:\Users\BurnShady\Games\Warcraft III\Frozen Throne.exe" -window
; 5) Load Warcraft III using that shortcut
; 6) Open Borderless Macro.exe as administrator and use hotkeys

Click here to download the macro: https://www.dropbox.com/s/yjf5baexlpw9p ... 1.exe?dl=0
If you want to modify the AHK script, you have to download AHK: http://www.autohotkey.com/

AHK version of this program: https://www.dropbox.com/s/aos3iu7y9vnc3 ... 1.ahk?dl=0

If you don't want to download anything and just want the raw code, go to pastebin, or open spoiler: http://pastebin.com/raw.php?i=TKGx3Fwk

Raw code:
Spoiler!

Code: Select all

; Borderless window macro
; Version 1.0 by BurnShady
; This script works with any version of Warcraft III and should work for all future and old releases of AHK.
; To download AHK, visit : http://www.autohotkey.com/
;
; Setup guide for windows:
; 1) Make a shortcut of your Frozen Throne.exe
; 2) Right click shortcut -> properties
; 3) Under target, add -window to the back
; 4) Mine looks like this, but your path should be different (including quotes): "C:\Users\BurnShady\Games\Warcraft III\Frozen Throne.exe" -window
; 5) Load Warcraft III using that shortcut
; 6) Open Borderless Macro.exe or Borderless Macro.ahk

; Hotkeys:
; Windows + F11 turns any window into borderess fullscreen
; Windows + F12 turns a borderless fullscreen window into windowed mode

; Cursor window lock is mainly for dual screen users
; Windows + F10 locks the cursor inside the Warcraft III window.
; Windows + F9 unlocks the cursor from the window. (You can also just alt tab)

; If you have any questions, PM Burn on entgaming.net

#SingleInstance force
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#Persistent ; Stay open in background

;#################################### USEFUL LITTLE MACROS ############################################

^!r::reload             ;Ctrl + Alt + R = Reloads the script

Break::                ;PauseBreak = button suspends and pauses the script
suspend
pause
return

^!e::edit             ;Ctrl + Alt + E - Edit the script

^SPACE::  Winset, Alwaysontop, toggle, A    ;Control + space = Toggles the window to always be on top

#g::Run http://www.google.com/search?q=%clipboard% ;Windows + G = Googles whatever is copied on your clipboard with your default browser.

#f12::
WinGetTitle, currentWindow, A
IfWinExist %currentWindow%
{
   WinSet, Style, +0x800000
   WinSet, Style, +0x40000
   WinSet, Style, +0xC00000
   WinMove, , , 0, 0, (A_ScreenWidth/2), A_ScreenHeight-42
}
return

#f11:: ;Turns the window into fullscreen with windows + F11
WinGetTitle, currentWindow, A
IfWinExist %currentWindow%
{
WinSet, Style, -0xC00000,a ; remove the titlebar and border(s)
WinSet, Style, -0x40000,a ; remove sizing border
WinMove, a, , 0, 0, A_ScreenWidth,  A_ScreenHeight ; move the window to 0,0 and resizes it to fullscreen width
}   
return


#f10::
LockMouseToWindow("Warcraft III")
Return

#f9::
LockMouseToWindow()
Return


LockMouseToWindow(llwindowname="")
{
  VarSetCapacity(llrectA, 16)
  WinGetPos, llX, llY, llWidth, llHeight, %llwindowname%
  If (!llWidth AND !llHeight) {
    DllCall("ClipCursor")
    Return, False
  }
  Loop, 4 {
    DllCall("RtlFillMemory", UInt,&llrectA+0+A_Index-1, UInt,1, UChar,llX >> 8*A_Index-8)
    DllCall("RtlFillMemory", UInt,&llrectA+4+A_Index-1, UInt,1, UChar,llY >> 8*A_Index-8)
    DllCall("RtlFillMemory", UInt,&llrectA+8+A_Index-1, UInt,1, UChar,(llWidth + llX)>> 8*A_Index-8)
    DllCall("RtlFillMemory", UInt,&llrectA+12+A_Index-1, UInt,1, UChar,(llHeight + llY) >> 8*A_Index-8)
  }
  DllCall("ClipCursor", "UInt", &llrectA)
Return, True
}
return

; ############ ADD YOUR OWN MACROS UNDER HERE #############

; ############ MACROS UNDER HERE WILL ONLY WORK WHEN WAR3 IS AN ACTIVE WINDOW #############
#IfWinActive, Warcraft III ahk_class Warcraft III


;Message macros:

!9::Sendinput {enter}/w clan.enterprise {!}g island defense{Enter}{Enter}/whois entid{Enter}    ;Does /whois and requests lobby status
^!+a::clipboard =                                                           ;copies the apple to clipboard
!2::clipboard = [ENT] island defense #                                              ;copies partial game name to clipboard
!4::sendinput ^{enter}take cover{enter}                                             ;Sends "take cover" to allies
!8::Sendinput {Enter}-cam 180{Enter}{Enter}/fps{Enter}                                 ;Turns on FPS counter + cam macro

#f12::                                                  ;Make borderless window bordered, works for all windows
WinGetTitle, currentWindow, A
IfWinExist %currentWindow%
{
   WinSet, Style, +0x800000
   WinSet, Style, +0x40000
   WinSet, Style, +0xC00000
   WinMove, , , 0, 0, (A_ScreenWidth/2), A_ScreenHeight-42          ;resizes window to half screen width and screen heigh - 42 pixels.
}
return

#f11::                ;Turn window into a borderless window
WinGetTitle, currentWindow, A
IfWinExist %currentWindow%
{
WinSet, Style, -0xC00000,a      ; remove the titlebar and border(s)
WinSet, Style, -0x40000,a       ; remove sizing border
WinMove, a, , 0, 0, A_ScreenWidth,  A_ScreenHeight                 ; move the window to 0,0
}   
return

;Inventory macros

!q::Send {Numpad7}               ;alt + q for inventory top left
!w::Send {Numpad8}             ;alt + w for inventory top right
!a::Send {Numpad4}             ;alt + a for inventory left
!s::Send {Numpad5}             ;alt + s for inventory right
!z::Send {Numpad1}             ;alt + z for inventory bottom left
!x::Send {Numpad2}             ;alt + x for inventory bottom right


EDIT1: Video guide for windowed mode: https://www.youtube.com/watch?v=STBJgsXgUvc
EDIT2: Added inventory macros and other small things that currently only exists in the spoiler

-Burn

Re: [TOOL] Borderless window fullscreen macro

Posted: Wed Apr 29, 2015 1:03 am
by Burn
Changelog for Borderless Window

v1.2
Added inventory macros and message macros to spoiler code

v1.1
Added dual screen support - clipcursor:
Windows + F10 locks the cursor inside the Warcraft III window.
Windows + F9 unlocks the cursor from the window. (You can also just alt tab to break clipcursor)

-Burn

Re: [TOOL] Borderless window fullscreen macro [Win7 only]

Posted: Tue Oct 27, 2015 3:44 pm
by Akitos
Doesn't work for me using Windows 7 64-bit. The only thing that does work is locking the mouse inside of wc3 (windows + f10), but once that's done i can't unlock it and making it borderless doesn't work either.

Re: [TOOL] Borderless window fullscreen macro [Win7 only]

Posted: Thu Dec 17, 2015 7:16 am
by BouncingHitman
Link's dead @burn upload new one please

Re: [TOOL] Borderless window fullscreen macro [Win7 only]

Posted: Fri Dec 18, 2015 9:34 am
by BouncingHitman
@burn i need a new link please

Re: [TOOL] Borderless window fullscreen macro [Win7 only]

Posted: Fri Dec 18, 2015 9:36 am
by Neco
BouncingHitman wrote:@burn i need a new link please

https://github.com/Codeusa/Borderless-Gaming/releases use this, it's better.

Re: [TOOL] Borderless window fullscreen macro [Win7 only]

Posted: Fri Dec 18, 2015 9:40 am
by BouncingHitman
Neco wrote:
BouncingHitman wrote:@burn i need a new link please

https://github.com/Codeusa/Borderless-Gaming/releases use this, it's better.

I assume it's free and that there's no product registration? There's a steam link that requires you to purchase the product.

Re: [TOOL] Borderless window fullscreen macro [Win7 only]

Posted: Fri Dec 18, 2015 11:26 am
by Neco
It's free, Steam version is like a donation link.

Re: [TOOL] Borderless window fullscreen macro [Win7 only]

Posted: Fri Dec 18, 2015 2:52 pm
by Burn
Updated links. Would recommend using wc3 id macro instead of this, since wc3 id macro has more macros built in, including this.

-Burn

Re: [TOOL] Borderless window fullscreen macro [Win7 only]

Posted: Wed Mar 23, 2016 2:35 pm
by Burnt
Works for 1.27 too?

Re: [TOOL] Borderless window fullscreen macro [Win7 only]

Posted: Wed Mar 23, 2016 2:41 pm
by Burn
Yep. Also works for any window, any game. Not just wc3.

-Burn

Re: [TOOL] Borderless window fullscreen macro [Win7 only]

Posted: Wed Mar 23, 2016 3:14 pm
by Burnt
Burn wrote:Yep. Also works for any window, any game. Not just wc3.

-Burn

That's helpful. I've had problem with 2-3 second lags when tabbing out each time (not bad pc with i5 4960K and R9 285).

Thanks BRO

Re: [TOOL] Borderless window fullscreen macro [Win7 only]

Posted: Wed Mar 23, 2016 3:25 pm
by Burn
Np, there's a thank button Imagefor a reason. ;)

-Burn

Re: [TOOL] Borderless window fullscreen macro [Win7 only]

Posted: Thu Mar 24, 2016 5:30 pm
by Burnt
@Burn I tired your app. However nothing happened when I pressed Win + F11 and the alt-tab lag was still there. Is it because I used a tool to adjust the resolution to 1920*1080 when I first installed the game?

Re: [TOOL] Borderless window fullscreen macro [Win7 only]

Posted: Fri Mar 25, 2016 10:52 am
by Burn
Burnt wrote:@Burn I tired your app. However nothing happened when I pressed Win + F11 and the alt-tab lag was still there. Is it because I used a tool to adjust the resolution to 1920*1080 when I first installed the game?

Because your wc3 is still in fullscreen mode. To make it windowed mode, follow the setup guide:

; Setup guide for windows:
; 1) Make a shortcut of your Frozen Throne.exe
; 2) Right click shortcut -> properties
; 3) Under target, add -window to the back
; 4) Mine looks like this, but your path should be different (including quotes): "C:\Users\BurnShady\Games\Warcraft III\Frozen Throne.exe" -window
; 5) Load Warcraft III using that shortcut
; 6) Open Borderless Macro.exe and use hotkeys

-Burn