News Archives 2020 Q2
2020-06-27
2020-06-26
•
SendKeys.exe is a new batch tool to send keystrokes to the active window.
I wrote it for myself to allow scripted updates of screenshots (with the aid of
PrintWindow.exe) for updated scripts.
Most of its code is command line and error handling, the code that really does the job is a single line:
System.Windows.Forms.SendKeys.SendWait( args[0] );
•
ActivateWindow.exe is a new batch tool to activate the specified window.
Another tool I wrote for myself, for testing and documenting purposes.
It actually is an extremely stripped version of
PrintWindow.exe.
2020-06-24
• A while ago, Francesco reported bugs in
SaveFileBox.exe and
RichTextMessageBox.exe, both involving optional command line argument parsing.
These problems have now been addressed, and the updated versions are available for download.
Thanks Francesco
• Oops... Francesco reported two more bugs in
RichTextMessageBox.exe: the default button was not activated when pressing Enter, and the dialog window didn't close after a specified timeout expired.
The default button issue was easily solved by defining the proper AcceptButton in the dialog form.
The timeout feature worked as intended while debugging, but not in the release version.
This turned out to be a case of "sub-optimal programming practice": trying to close the window created in the main thread from within the timer's seperate thread.
The issue has been solved, and the timeout feature works as intended.
Thanks Francesco
2020-06-19
•
PrintWindow.exe has been updated: the new version tries to correct the measured window dimensions using
GetSystemMetrics, and the new optional
/C
switch can be used to adjust the screenshot location and dimensions in case that correction still isn't acceptable.
2020-06-12
•
PrintWindow.exe is a new command line tool to take a screenshot of the specified window.
2020-06-09
• A minor update for
GetHDDStatusGUI.ps1: its new
-Modal
switch makes the popup window system modal, i.e. always stay on top.
• Likewise,
PrinterSelectBox.exe has also been updated: its new
/M
switch makes the dialog window system modal.
2020-06-07
- its help text is now comment based, i.e. can be viewed with PowerShell's
Get-Help
command (/?
will still work)
- besides the ErrorLevel 0 or 1 it also returns True or False to allow using the script with other PowerShell scripts
- hiding the console while running is no longer default but optional (
-Hide
parameter)
- its
-Debug
parameter will show intermediate results for each physical harddisk drive in the console; if combined with the -Verbose
parameter, details for all volumes will be shown as well
2020-06-04
🇳🇱 Gefeliciteerd, alle geslaagden van Nederland!
2020-06-03
2020-05-21
•
InputBox.exe had an update: the new optional
/O
switch makes the window stay always
On top.
2020-05-19
2020-05-15
2020-05-14
•
MonitorPing.ps1 is a new script I wrote for my wife, so she can quickly check if the network printer upstairs is available.
The script pings a device (in our case a network printer) at a regular interval and shows the connection status in the Notification Area (a.k.a. System Tray).
Optionally the console can be hidden, and a beep generated at every connection status change.
Until now, I usually kept to the old way of showing help for all of my scripts when the
/?
parameter was used.
In PowerShell, that meant maintaining two help text blocks per script.
MonitorPing.ps1 is the first one to implement a new way of showing help on screen: it runs
GetHelp '.\MonitorPing.psp' -Full
when the
/?
parameter is used.
2020-05-13
•
RichTextMessageBox.exe is the latest addition to my DialogBoxes family.
Unlike its MessageBox sibling, it allows full customization of font, text color, window size and position, timeout, modality, show on taskbar, and more.
But unlike its MessageBox sibling, it cannot be used in a scheduled task with credentials different from the logged in user.
2020-05-12
• A new extension script for
AirRegGUI.ps1 has been released:
AirRegOECmd.ps1 can be used to search a downloaded Austrian aircraft registration database for a specific
OE-*** aircraft registration.
The downloaded Austrian database is in PDF format, which cannot be read directly by PowerShell, so the script uses
GhostScript to convert the PDF to plain text when first run.
2020-05-10
2020-05-06
• Jacques Bensimon sent me a clever solution for a
CMD /K quirk.
He found that
CMD /C "somecommand" "argument1" "argument2"
returns an error message like
'somecommand" "argument1" "argument2' is not recognized as an internal or external command, operable program or batch file.
It turns out that if the command line following
CMD /C
or
CMD /K
starts as well as ends with a doublequote, that entire command line is interpreted as a single (command) string.
Jacques' solution is of the category "why-didn't-I-think-of-that": insert an
@
before the first doublequote, i.e.
CMD /C @"somecommand" "argument1" "argument2"
Thanks Jacques
2020-05-01
• A minor update for
AirRegGUI.ps1: a new optional command line switch
/Hide
hides the console, and handling of command line argument has been improved.
2020-04-30
• Getting fed up with the unreliable results when retrieving data with the Internet Explorer object in VBScript, I discontinued
AirReg.hta (VBScript/HTA) and replaced it by my latest
AirRegGUI.ps1 (PowerShell).
The new PowerShell version accepts input from the command line as well as interactively in its GUI.
It is created in Visual Studio Community 2019 with a trial version of Ironman Software's
PowerShell Pro Tools Suite.
2020-04-25
•
NumLockIcon.ps1 is a new PowerShell script derived from my earlier
CapsLockIcon.ps1 script.
As its name suggests, it will monitor and display the NumLock status in the System Tray, a.k.a. Notification Area.
2020-04-22
•
AirRegGUI.ps1 is a new PowerShell demo script to look up an aircraft registration on Airport-Data.com and present the result in a GUI.
2020-04-21
•
PrintWord.ps1 is a new PowerShell demo script that prints a Word document to the selected printer.
2020-04-16
2020-04-14
•
CapsLockIcon.ps1 had a really minor update without any impact at all for the user, but it removes a nagging warning message in Visual Studio Code.
To suppress screen output I had defined a dummy variable
$key
to receive a command's output:
$key = $Host.UI.RawUI.ReadKey( )
VS Code kept reminding me the variable was never used.
By using
[void] $Host.UI.RawUI.ReadKey( )
instead, VS Code is satified.
2020-04-10
•
Disks.ps1 is a new (Windows only) PowerShell script to list all physical harddisks and their manufacturer, model, size, bus type and more.
•
Hardware.hta had a minor update: the external PowerShell script was replaced by VBScript code, and a new setting allows including virtual drives in the inventory.
2020-04-09
•
Hardware.hta had a major update:
- New zoom option (command line switch
/ZOOM:percentage
) to scale the HTA's content.
- Harddisk interfaces are now queried by on-the-fly PowerShell code, making the results more reliable, though still not 100% error-free.
- The number of harddisks, CDROM drive, network and video cards and monitors displayed are no longer limited by a fixed number of table rows, instead table rows will be added on-the-fly when needed.
- Because there is no limit for these devices, the saved tab-delimited export files no longer have a fixed number of columns for each device type, i.e. the number of columns will depend on the specific hardware.
- New dark theme (black background), but no more background gradients
- The download ZIP file also contains an icon and a batch file to embed the icon in the HTA (can only be used once, and HTA can no longer be edited).
page last modified: 2022-11-04; loaded in 0.0075 seconds