[SOLVED] Taskbar size

Ideas for new features & functions

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
Grovkillen
Automation Wizard
Posts: 406
Joined: Fri Aug 10, 2012 2:38 pm
Location: Hudiksvall, Sweden
Contact:

[SOLVED] Taskbar size

Post by Grovkillen » Thu Oct 06, 2016 8:32 am

Hi,

I have managed to get the taskbar size by running this script and before the 5 second wait is over I click on the taskbar.

Code: Select all

Wait>5
GetActiveWindow>Shell_TrayWnd,X_POS_TASKBAR,Y_POS_TASKBAR,W_POS_TASKBAR,H_POS_TASKBAR
H_POS_TASKBAR is the height of the taskbar.

Could it be done in a simpler way? It would be nice to have all these information in a GetWorkSpace> command since we only get the screen resolution with the GetScreenRes> command.
Last edited by Grovkillen on Mon Oct 31, 2016 12:48 pm, edited 1 time in total.
Let>ME=%Script%

Running: MS14.5.4

User avatar
Marcus Tettmar
Site Admin
Posts: 7125
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Taskbar size

Post by Marcus Tettmar » Thu Oct 06, 2016 1:35 pm

How about:

Code: Select all

FindObject>0,Shell_TrayWnd,,1,hWnd,leftPos,topPos,rightPos,bottomPos,text
Or:

Code: Select all

LibFunc>User32,FindWindowA,h1,Shell_TrayWnd,
Let>WIN_USEHANDLE=1
GetWindowPos>h1,xPos,yPos
GetWindowSize>h1,width,height
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Grovkillen
Automation Wizard
Posts: 406
Joined: Fri Aug 10, 2012 2:38 pm
Location: Hudiksvall, Sweden
Contact:

Re: Taskbar size

Post by Grovkillen » Fri Oct 07, 2016 5:48 am

HERO! :)

Both worked great!
Let>ME=%Script%

Running: MS14.5.4

Post Reply