Also, in the Explorer example, is it OK just to replace one object with another, or should I really be clearing the object the first, before I assign the same name to a different object.
Thanks for reading.
Code: Select all
q::
MsgBox, % (oArray := StrSplit("a,b,c,d,e", ",")).Length()
MsgBox, % StrSplit("f,g,h,i,j", ",").Length()
MsgBox, % IsObject(oArray)
oArray := ""
return
w::
WinGetClass, vWinClass, A
if !(vWinClass = "CabinetWClass") && !(vWinClass = "ExploreWClass")
return
for oWin in ComObjCreate("Shell.Application").Windows
if (oWin.HWND = hWnd)
break
vDir := oWin.Document.Folder.Self.Path
for oWin in oWindows := ComObjCreate("Shell.Application").Windows
if (oWin.HWND = hWnd)
break
vDir := oWin.Document.Folder.Self.Path
MsgBox, % IsObject(oWin) " " IsObject(oWindows)
oWindows := oWin := ""
return