I have an old AutoHotKey script I'm trying to figure out how to convert to AutoIt3. A couple of the functions seem easy enough to copy over, but others, such as the Dll ones, I have no clue how to make work in AutoIt3.
#SingleInstance force
GroupAdd, Excludes, Windows Task-Manager ahk_class #32770
GroupAdd, Excludes, ahk_class _As12__TaskSwitchXP_TaskSwitchWnd_
GroupAdd, Excludes, ahk_class Progman
GroupAdd, Excludes, ahk_class Shell_TrayWnd
#IfWinNotActive, ahk_group Excludes
^F11::
Critical
hWnd := WinActive("A")
ToggleFullScreen(hWnd)
Return
ToggleFullScreen(ByRef hWnd)
{
;IniFile := A_ScriptName ".tmp"
;IniRead, Array, %IniFile%, Handles, %hWnd%, Empty
If 1 ;(Array="Empty")
{
hMenu := DllCall("GetMenu", "UInt", hWnd)
WinGet, Maximized, MinMax
DllCall("SetMenu", "UInt", hWnd, "UInt", 0)
WinSet, Style, -0xC00000
WinSet, Style, -0x800000
WinSet, Style, -0x40000
WinMaximize
WinMove, , , 0, 0, 1680, 1038
; (1 680 - 24) / 1 047 = 1.58166189
;IniWrite, %hMenu%`,%Maximized%, %IniFile%, Handles, %hWnd%
}
;Else
;{
;StringSplit, Array, Array, `,
;hMenu := Array1
;Maximized := Array2
;DllCall("SetMenu", "UInt", hWnd, "UInt", hMenu)
;WinSet, Style, +0xC00000
;WinSet, Style, +0x800000
;WinSet, Style, +0x40000
;If !(Maximized)
; {
; WinRestore
; }
;IniDelete, %IniFile%, Handles, %hWnd%
;}
}
Just in case you're curious why I'm trying to do this, it's because I have some other code in AutoIt3, and I want to merge them.
Any help you can provide is greatly appreciated :3