Re:UDF _GetTrayBarPos( ), Determine TrayBar Position
"valery_vi" <[email protected]>
| Newsgroups | gmane.comp.windows.autoit.user |
|---|---|
| Message-ID | <[email protected]> |
Someone (bugfix!) from AutoItScript wrote:
http://www.autoitscript.com/forum/index.php?showtopic=39076
"..
In some cases you need the TrayBar position. I've made a solution for
this.
"
His solution isn't valid in my case.
So I wrote other one. It can be called as ShellTrayPos():
Msgbox(0,'', ShellTrayPos())
;Get type of Shell Tray Window position
Func ShellTrayPos()
Opt("WinTitleMatchMode", 4)
$ShellTrayPos = WinGetPos('classname=Shell_TrayWnd', '')
$Left = $ShellTrayPos[0]
$Top = $ShellTrayPos[1]
$Width = $ShellTrayPos[2]
$Height = $ShellTrayPos[3]
if $Left <= 0 then
if $Top <= 0 then
if $Width > $Height then
return 'Top'
else
return 'Left'
endif
else
return 'Bottom'
endif
else
return 'Right'
endif
EndFunc
It isn't symmetric like can be expected at first sight but it works
for my hidden and left-side tray.
Valery