12/16/2013 - 3:30 AM



#NoEnv  ;Recommended for performance and compatibility with future AutoHotkey releases.
#Warn  ;Recommended for catching common errors.
Process, Priority,, High
SetBatchLines, -1  ;Have the script run at maximum speed

  This script forces VMWare Workstation into a fake full screen mode across two monitors (will only work if the guest OS auto-fits to the window).
  For my setup the left edge of the VMWare window is placed at -1922px.
    I wanted the window to span from my left monitor to my center monitor both of which are 1080p.
    The extra 2px to the left is to move the left window border completely out of view.
  Run VMWare Workstation in windowed mode and hide all panes from view before running this script.

WinGetPos,,, winWidth, winHeight, ahk_class VMUIFrame
if(winWidth != 3844 or winHeight != 1118)
	WinSet, Style, -0xC00000, ahk_class VMUIFrame ;hide title bar
	WinSet, Style, -0x800000, ahk_class VMUIFrame ;hide thin-line border
	WinSet, Style, -0x400000, ahk_class VMUIFrame ;hide dialog frame
	WinSet, Style, -0x40000, ahk_class VMUIFrame  ;hide thickframe/sizebox
	Gui +LastFound
	hwnd := WinExist("ahk_class VMUIFrame") ;get handle
	, "UInt", hWnd ;handle
	, "UInt", 0 ;HWND_TOP
	, "Int", -1922 ;x
	, "Int", -36 ;y
	, "Int", 3844 ;width
	, "Int", 1118 ;height
	, "UInt", 0x0400)

	WinSet, Region, 0-0 3842-0 3842-1116 0-1116 0-0, ahk_class VMUIFrame