[TOOL] Borderless window fullscreen macro

General discussion about Warcraft III and Enterprise.
Burn
Protector of Nature
Posts: 2588
Joined: Thu May 02, 2013 6:29 am
Location: Clan BTI @ East
Has thanked: 18 times
Been thanked: 54 times
Contact:

[TOOL] Borderless window fullscreen macro

Postby Burn » Thu Apr 09, 2015 5:51 am

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
Last edited by Burn on Sat Apr 14, 2018 6:29 am, edited 12 times in total.
These users thanked the author Burn for the post (total 2):
Burnt (Wed Mar 23, 2016 3:31 pm) • Deadly (Sat Aug 08, 2015 3:23 pm)

Burn
Protector of Nature
Posts: 2588
Joined: Thu May 02, 2013 6:29 am
Location: Clan BTI @ East
Has thanked: 18 times
Been thanked: 54 times
Contact:

Re: [TOOL] Borderless window fullscreen macro

Postby Burn » Wed Apr 29, 2015 1:03 am

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
These users thanked the author Burn for the post:
Deadly (Wed Mar 23, 2016 3:26 pm)

User avatar
Akitos
Treant Protector
Posts: 627
Joined: Thu Oct 03, 2013 10:17 am
Has thanked: 10 times
Been thanked: 21 times

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

Postby Akitos » Tue Oct 27, 2015 3:44 pm

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.
LTD 1 & 2 veteran | full-time streamer @twitch/akitos

BouncingHitman

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

Postby BouncingHitman » Thu Dec 17, 2015 7:16 am

Link's dead @burn upload new one please

BouncingHitman

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

Postby BouncingHitman » Fri Dec 18, 2015 9:34 am

@burn i need a new link please

User avatar
Neco
Treant Protector
Posts: 818
Joined: Thu May 16, 2013 2:13 am
Location: New Zealand
Has thanked: 73 times
Been thanked: 54 times

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

Postby Neco » Fri Dec 18, 2015 9:36 am

BouncingHitman wrote:@burn i need a new link please

https://github.com/Codeusa/Borderless-Gaming/releases use this, it's better.
Former Editor of Island Defense - ENTID Rules

BouncingHitman

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

Postby BouncingHitman » Fri Dec 18, 2015 9:40 am

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.

User avatar
Neco
Treant Protector
Posts: 818
Joined: Thu May 16, 2013 2:13 am
Location: New Zealand
Has thanked: 73 times
Been thanked: 54 times

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

Postby Neco » Fri Dec 18, 2015 11:26 am

It's free, Steam version is like a donation link.
Former Editor of Island Defense - ENTID Rules

Burn
Protector of Nature
Posts: 2588
Joined: Thu May 02, 2013 6:29 am
Location: Clan BTI @ East
Has thanked: 18 times
Been thanked: 54 times
Contact:

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

Postby Burn » Fri Dec 18, 2015 2:52 pm

Updated links. Would recommend using wc3 id macro instead of this, since wc3 id macro has more macros built in, including this.

-Burn

User avatar
Burnt
Treant Protector
Posts: 672
Joined: Tue Oct 27, 2015 6:59 pm
Location: Toronto, CA
Has thanked: 55 times
Been thanked: 56 times

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

Postby Burnt » Wed Mar 23, 2016 2:35 pm

Works for 1.27 too?
GOTEM

Burn
Protector of Nature
Posts: 2588
Joined: Thu May 02, 2013 6:29 am
Location: Clan BTI @ East
Has thanked: 18 times
Been thanked: 54 times
Contact:

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

Postby Burn » Wed Mar 23, 2016 2:41 pm

Yep. Also works for any window, any game. Not just wc3.

-Burn

User avatar
Burnt
Treant Protector
Posts: 672
Joined: Tue Oct 27, 2015 6:59 pm
Location: Toronto, CA
Has thanked: 55 times
Been thanked: 56 times

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

Postby Burnt » Wed Mar 23, 2016 3:14 pm

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
GOTEM

Burn
Protector of Nature
Posts: 2588
Joined: Thu May 02, 2013 6:29 am
Location: Clan BTI @ East
Has thanked: 18 times
Been thanked: 54 times
Contact:

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

Postby Burn » Wed Mar 23, 2016 3:25 pm

Np, there's a thank button Imagefor a reason. ;)

-Burn

User avatar
Burnt
Treant Protector
Posts: 672
Joined: Tue Oct 27, 2015 6:59 pm
Location: Toronto, CA
Has thanked: 55 times
Been thanked: 56 times

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

Postby Burnt » Thu Mar 24, 2016 5:30 pm

@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?
GOTEM

Burn
Protector of Nature
Posts: 2588
Joined: Thu May 02, 2013 6:29 am
Location: Clan BTI @ East
Has thanked: 18 times
Been thanked: 54 times
Contact:

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

Postby Burn » Fri Mar 25, 2016 10:52 am

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


Return to “General Discussions”

Who is online

Users browsing this forum: No registered users and 13 guests