1st script is,
Code: Select all
^W::
DetectHiddenWindows on
SetTitleMatchMode, 2
DetectHiddenText, On
VM_Cls=ahk_class VMUIFrame
VM_Prcs=vmware.exe
; This toggle the Hidden status of the VMWare window
If ProcessExist(VM_Prcs)
{
WinGet, hw_VMware, ID, %VM_Cls%
WinWait %VM_Cls%
WinHide
WinSet, ExStyle, ^0x80; 0x80 is WS_EX_TOOLWINDOW
WinShow
WinMaximize, ahk_id %hw_VMware% ; Window is Maximized
}
Return
ProcessExist(Name)
{
Process,Exist,%Name%
return Errorlevel
}
Code: Select all
^W::
SetTitleMatchMode RegEx
DetectHiddenWindows, On
DetectHiddenText, On
;Change here
VM_Cls=ahk_class VMUIFrame
VM_Prcs=vmware.exe
if !WinExist(VM_Cls)
{
; Failure to WinGet VMWare ID!
If ProcessExist(VM_Prcs)
{
DllCall( "SetParent", "uint", hw_VMware, "uint", hw_parent )
WinMaximize, ahk_id %hw_VMware%
Return
}
}
WinGet, hw_VMware, ID, %VM_Cls%
hw_parent := DllCall( "GetParent", "uint", hw_VMware )
WinGet, hw_progman, ID, Program Manager ahk_class Progman
DllCall( "SetParent", "uint", hw_VMware, "uint", hw_progman )
WinMaximize, ahk_id %hw_VMware%
Return
ProcessExist(Name)
{
Process,Exist,%Name%
return Errorlevel
}
This script is particularly useful when running virtual machine in duel monitor working 2 person in one CPU. This removes the taskbar window from host monitor.