On the forum you can find examples how to overwrite or modify existing classes like Gui.
viewtopic.php?f=83&t=86124&hilit=gui+ext+v2
It is possible to overwrite original ahk functions, but can we still use the native functions?
Example use case: Let the WinGetPos return empty variables if the window is not found.
(Similar to V1 behaviour)
This example below does not work, as the recusive limit is exeeding.
Code: Select all
#Requires AutoHotkey v2.0
WinGetPos(&X, &Y,&Width, &Height,"ahk_exe notepad.exe")
MsgBox(x)
WinGetPos(&X:="", &Y:="", &Width:="", &Height:="", WinTitle:="", WinText:="", ExcludeTitle:="", ExcludeText:=""){
try{
WinGetPos(&X, &Y, &Width, &Height, WinTitle, WinText, ExcludeTitle, ExcludeText)
}catch {
X:=""
Y:=""
Width:=""
Height:=""
}
}