Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Done HDD Smart status and Window size setting improvement

Mar
12
0
Could you please add function @Smart[X:] which would result 1 or 0 if the smart status for the
drive is ok. Currently it can be done with "wmic diskdrive get status" but native TMC function would be nicer :)

Secondly, could you improve Window /POS function so that it allows resizing the window in current place (by for example, omitting parameter). Currently window size (and position) can be set, but it always results window to be moved.
 
Could you please add function @Smart[X:] which would result 1 or 0 if the smart status for the
drive is ok. Currently it can be done with "wmic diskdrive get status" but native TMC function would be nicer :)
"X:" denotes a logical partition, not a disk drive. You can already, with built-in TCC tools, get information from WMI. This is pretty close to what WMIC is doing.
Code:
v:\> wmiquery /a . "select name, status from win32_diskdrive"
Name = \\.\PHYSICALDRIVE0
Status = OK

Name = \\.\PHYSICALDRIVE1
Status = OK


v:\> echo %@wmi[.,"select status from win32_diskdrive where name = '\\\\.\\physicaldrive0'"]
OK

v:\> echo %@wmi[.,"select status from win32_diskdrive where name = '\\\\.\\physicaldrive1'"]
OK
 
Secondly, could you improve Window /POS function so that it allows resizing the window in current place (by for example, omitting parameter). Currently window size (and position) can be set, but it always results window to be moved.

Hmmm! You can resize it leaving the left/top fixed ... but you have to know where the left/top is. This is a bit clumsy. Maybe there's a better way.

Code:
window /pos=%@word[1,%@winpos[%_wintitle]],%@word[0,%@winpos[%_wintitle]],new_width,new_height

FWIW, my "4CONSOLE" plugin offers CONZIZE.
Code:
v:\> consize /?
Manipulate console screen buffer and window

CONSIZE ...

Options:  /W(indow)   X Y  (characters)
          /B(uffer)   X Y  (characters)
          /P(osition) X Y  (upper-left corner
     (or) /C(anonical)  N  (N=1-9, various centered positions)
          /R(elative) X Y  (pixels [+/-] from current position)
                           (after /P or /C to get to second monitor)
          /Q(uery)

/W, /B: the one spec'd first is enforced; the other
is enforced within the limits imposed by the first.

If /W is missing or X (Y) is 0 the window dimension remains
unchanged or is minimally decreased to match the buffer.

If /B is missing or X (Y) is 0 the buffer dimension remains
unchanged or is minimally increased to match the window.

/B: X (Y) equal to -1 eliminates scrolling in that direction and
forces precedence of the window specification.
 
Secondly, could you improve Window /POS function so that it allows resizing the window in current place (by for example, omitting parameter). Currently window size (and position) can be set, but it always results window to be moved.
And, on a similar-but-different note, to move a window without resizing it.
 
Hello @vefatica, and thanks for the information of CONSIZE. It's better than setting window position via WINDOW /POS.... because consize uses character count (rather than pixel count, which complicates setting appropriate window size).
 
Back
Top