Kip Posted September 12, 2007 Share Posted September 12, 2007 HiHow do I get the desktopheight witout the taskbar:so: i want to get the red arrow, not the blue one.(and the taskbar has with every style a different height, so)Kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
DjDeep00 Posted September 12, 2007 Share Posted September 12, 2007 Here you go.... Opt("WinTitleMatchMode", 4) $get=ControlGetPos("classname=Shell_TrayWnd", "", "ReBarWindow321") $Height_Minus_Taskbar=@DesktopHeight-$get[3] Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 12, 2007 Moderators Share Posted September 12, 2007 (edited) What if the taskbar is on one of the sides? Edited September 12, 2007 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 12, 2007 Moderators Share Posted September 12, 2007 I was thinking about this thread as I was walking out the door, try this and see if you get the results you want (haven't tested it yet):#include <Array.au3> $aDTWH = _DeskTopVisibleArea() _ArrayDisplay($aDTWH) Func _DeskTopVisibleArea() Local $aInfo[2] Local $aCPos = ControlGetPos('[CLASS:Shell_TrayWnd]', '', '') If IsArray($aCPos) = 0 Then $aInfo[0] = @DesktopWidth $aInfo[1] = @DesktopHeight ElseIf $aCPos[2] = @DesktopWidth Then $aInfo[0] = @DesktopWidth $aInfo[1] = @DesktopHeight - ($aCPos[3] - $aCPos[1]) Else $aInfo[0] = @DesktopWidth - ($aCPos[2] - $aCPos[0]) $aInfo[1] = @DesktopHeight EndIf Return $aInfo EndFunc Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Siao Posted September 12, 2007 Share Posted September 12, 2007 (edited) See this link#400358function to get desktop work area rectangle. Then it's a matter of subtracting top from bottom. Edited September 12, 2007 by Siao "be smart, drink your wine" Link to comment Share on other sites More sharing options...
DjDeep00 Posted September 13, 2007 Share Posted September 13, 2007 What if the taskbar is on one of the sides?Good point Smoke_N! From the picture, I figured it would be always on the bottom but the best way would be two figure out where it would and then do the calculation. Link to comment Share on other sites More sharing options...
Kip Posted September 13, 2007 Author Share Posted September 13, 2007 Smoke_N's script doesnt work. is that true or is is just me? (or vista:) MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 13, 2007 Moderators Share Posted September 13, 2007 Smoke_N's script doesnt work. is that true or is is just me? (or vista:)What do you mean by "doesn't" work? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Kip Posted September 13, 2007 Author Share Posted September 13, 2007 what i say: Doesnt work MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 13, 2007 Moderators Share Posted September 13, 2007 what i say: Doesnt workWhy don't you explain what in the world you mean by "doesn't" work... Amazing you actually want help, and you can't even provide any type of details other than "doesn't work" pfft ...ie...Doesn't give any results at all.Doesn't give the right results. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Kip Posted September 13, 2007 Author Share Posted September 13, 2007 ok, it always returned -4 as width but my own version works (not so different) $aCPos = ControlGetPos("[CLASS:Shell_TrayWnd]","","") $Width = @DesktopWidth $Height = @DesktopHeight If $aCPos[3] > $aCPos[2] Then $Width = @DesktopWidth-$aCPos[2] Else $Height = @DesktopHeight-$aCPos[3] EndIf MsgBox(0,"dd", $Width&","&$Height) MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now