Jump to content

How to close tree list and expand row in HwMonitor


Recommended Posts

Hi!

Can you help me with close tree list and adjust colum size in HwMonitor.

Each time you run the program, you need to re-set the width of the colum and close unnecessary blocks.

I tried something, but each time the program window opens with different coordinates and clicking the mouse button does not fall into the desired area.

I need close RED selection and expand GREEN.

My code

Global $hWnd, $WINDOWS_ONTOP, $MOUSE_CLICK_LEFT

;Open HWMonitor
Run("explorer.exe D:\Portable\Info\hwmonitor_1.45\HWMonitor_x64.exe")

;Show program window on top
WinSetOnTop($hWnd, "", $WINDOWS_ONTOP)

;Pause 13ms to open main window of program
Sleep(13000)

;Check for title of window
WinWait("CPUID HWMonitor","")

;Position of window
WinMove($hwnd, "", 0, 0, 800, 600)

;Click left mouse button
MouseClick($MOUSE_CLICK_LEFT, 56, 333, 2)

 

Original.jpg

Link to post
Share on other sites
Posted (edited)

Without waiting for advice, I wrote himself.
It may not be the best implementation, but it does what is needed.

Code

Global $hWnd, $WINDOWS_ONTOP, $MOUSE_CLICK_LEFT

;Open HWMonitor
Run("explorer.exe D:\Portable\Info\hwmonitor_1.45\HWMonitor_x64.exe")

;Show program window on top
WinSetOnTop($hWnd, "", $WINDOWS_ONTOP)

;Pause 7ms to open main window of program
Sleep(7000)

;Check for title of window
WinWait("CPUID HWMonitor","")

;Maximaze the window
WinSetState("CPUID HWMonitor", "", @SW_MAXIMIZE)

;Pause 1ms
Sleep(1000)

;Click left mouse button
MouseClick("left",48,542,1)

;Pause 1ms
Sleep(1000)

;Click left mouse button
MouseClick("left",49,560,1)

;Pause 1ms
Sleep(1000)

;Click left mouse button
MouseClick("left",48,633,1)

;Pause 1ms
Sleep(1000)

;Click left mouse button
MouseClick("left",48,651,1)

;Pause 1ms
Sleep(1000)

;Click left mouse button
MouseClick("left",48,686,1)

;Pause 1ms
Sleep(1000)

;Click left mouse button
MouseClick("left",48,758,1)

;Pause 1ms
Sleep(1000)

;Click left mouse button
MouseClick("left",49,326,1)

;Pause 1ms
Sleep(1000)

;Click left mouse button
MouseClick("left",48,632,1)

;Pause 1ms
Sleep(1000)

;Click left mouse button
MouseClick("left",49,651,1)

;Pause 1ms
Sleep(1000)

;Click left mouse button
MouseClick("left",28,667,1)

;Pause 1ms
Sleep(1000)

;Click left mouse button
MouseClick("left",29,687,1)

;Pause 1ms
Sleep(1000)

;Click left mouse button
MouseClick("left",47,92,1)

;Pause 1ms
Sleep(1000)

;Click left mouse button
MouseClick("left",48,199,1)

;Pause 1ms
Sleep(1000)

;Click left mouse button
MouseClick("left",48,109,1)

;Pause 1ms
Sleep(1000)

;Click left mouse button. Change width Value end
MouseClickDrag($MOUSE_CLICK_LEFT,327,57,349,56)

;Pause 1ms
Sleep(1000)

;Click left mouse button. Change width Min end
MouseClickDrag($MOUSE_CLICK_LEFT,437,56,458,59)

;Pause 1ms
Sleep(1000)

;Click left mouse button. Change width Max end
MouseClickDrag($MOUSE_CLICK_LEFT,545,57,570,54)

;Pause 1ms
Sleep(1000)

;Restore state window
WinSetState("CPUID HWMonitor", "", @SW_RESTORE )

;Pause 1ms
Sleep(1000)

;Hide window to taskbar
WinSetState("CPUID HWMonitor", "", @SW_MINIMIZE )

 

Edited by funproject
Update script
Link to post
Share on other sites
Posted (edited)

What script do?

1) Open program on top of all windows

2) Expands the window to full screen to determine the exact coordinates of objects that will not change the next time you open the program.

3) Manipulation of blocks, rows and columns

4) Returns the size of the program window to the previous state

5) Collapse and place on the taskbar

Edited by funproject
Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...