alias treebarinfo {
var %menu = $menubar , %tree = $treebar , %tool = $toolbar
if (%menu) .menubar off
if (%tool) .toolbar off
if (!%tree) .treebar on
var %tree.bw = $window(-2).w - $window(-2).dw , %tree.bh = $window(-2).h - $window(-2).dh
var %tree.w = $window(-2).dw - $window(-3).w , %tree.h = $window(-2).dh - $window(-3).h
var %tree.x = $window(-3).x - $window(-2).x , %tree.y = $window(-3).y - $window(-2).y
var %orientation = $iif(!%tree.w,horizontal,$iif(!%tree.h,vertical))
if (%orientation == horizontal) { var %position = $iif(%tree.y > %tree.bh,top,bottom) }
else { var %position = $iif(%tree.x > %tree.bw,left,right) }
if (%menu) .menubar on
if (%tool) .toolbar on
if (!%tree) .treebar off
return %orientation %position
}
I couldn't really find a good method to figure out where the treebar was located, but by hiding the menubar and toolbar and using some $window() calculations I came up with a method to derive it's docked location and orientation. Because this switches visuals off and on it might not be the most optimal solution, and probably should be cached rather than constantly tested, but I hope this helps some
Code:
//echo -a $treebarinfo
vertical left
on another note: it turns out it is available in the mIRC.ini options section
I had to open and close mIRC each time as the INI file wasn't updated upon moving the treebars location but:
Code:
//echo -a $readini($mircini,options,n8)
1,0,1,168,1,1,0,2,0,0,1,1,0,0,1,0,0,0,0,0,0,0,168,1,0,1,1,1,0,0,0,1,1,0,3,0,0
apparently the 2nd token within the list is the toolbar dock location, 0 = bottom, 1 = top, 2 = left, 3 = right.