QAP Groups are nice.....
This is a tip on how to create some menu entries (Groups) in QAP for quickly displaying some text.
In this example I use ShowTx by Horst Schaeffer,
Website, a tiny, tiny text editor/viewer.
It can easily be adjusted for Notepad, Visual Studio Code or any other text editor/viewer.
I use Visual Studio Code all the time, but for this setup I prefer ShowTx, it's tiny, requires no installation, pretty much runs everywhere, and have some nice command line switches.
(I start it with a black background, yellow text, without a menu/toolbar, in read-only mode and in the same place on-screen everytime, using X,Y coordinates)
1. Quick list with environment variables
a. Create a QAP group.
In
Advanced Settings I set the "Delay between favorites to restore" to 3000 (3 sec).
b. In the group, create a favorite of type application
Short name for favorite: CMD list vars
Application (path and file name): cmd
Parameters: /c "set >%temp%\cmdOut.txt"
c. Create another favorite of type application below the first one
Short name for favorite: ShowTX64 (open cmd vars)
Application (path and file name): C:\Tools\showtx64\showtx.exe
Parameters: "%temp%\cmdOut.txt" /ro /wrap /auto /XY:0,0 /font:2 /QuickQuit
d. Run the Group
2. Some other examples with PowerShell 7 as the first favorite in a group
a. List powershell variables
Short name for favorite: List PowerShell vars
Application (path and file name): pwsh
Parameters: -c Get-Variable | Out-File -Path $env:temp\pwshOut.txt
b. List all services w/format-list including the command line
Short name for favorite: List service
Application (path and file name): pwsh
Parameters: -c Get-Service | select Displayname,Status,ServiceName,BinaryPathName | format-list | Out-File -Path $env:temp\pwshOut.txt
c. List content of folder selected in your file manager (CUR_LOC)
Short name for favorite: List folder
Application (path and file name): pwsh
Parameters: -c Get-ChildItem -Path "{CUR_LOC}" | Out-File -Path $env:temp\pwshOut.txt
d. List content of folder selected in your file manager with wildcard (CUR_LOC)
Short name for favorite: List folder - wildcard
Application (path and file name): pwsh
Parameters: -c Get-ChildItem -Path "{CUR_LOC}\*" -Include {Input:Enter wildcard} | Out-File -Path $env:temp\pwshOut.txt
Note1:
In the above example you have to insert a backslash and an asterisk between the ending curly bracket and the double quote in CUR_LOC.
This is just how the Get-ChildItem cmdlet works when using the -Include option.
Note2:
I use pwsh aka PowerShell Core aka PowerShell 7.
But this should also work with the older PowerShell included with Windows.
Just replace "pwsh" with "powershell" in the examples above.
Microsoft PowerShell 7: Get-ChildItem
Microsoft PowerShell 7: Get-Service
Regards,
joeNOR