Close

Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: SOT: Nirsoft

  1. #1
    Join Date
    Oct 2009
    Location
    Maple Ridge, BC Canada
    Posts
    3,517
    Blog Entries
    1

    Default SOT: Nirsoft

    Good day,

    For the "super-tweakers" amongst us...there is a nifty Web site provided by "Nir Sofer" - who is the developer of some very useful "tools".

    All of the tools are standalone applications...so no installers.

    The Web site is called: Nirsoft

    One very handy tool is nircmd...which, as described is, "a small command-line utility that allows you to do some useful tasks without displaying any user interface".

    One option that might be of interest to some is the command, "nircmd monitor off" which does exactly as it states. I find this handy as i have disabled all power options as well as the screen saver, and so, I have created a small batch file that permits me to "turn the monitor off" when required. I have added this batch just to the left of the Start button for quick-and-easy access.

    Anyhow, I thought that this information might be of use to some. Any questions...just let me know.

    Update! [07/09/20]: Most Windows commands can be replaced using nircmd...simply by placing nircmd at the beginning of that command. For example, nircmd mkdir [directory_name] and nircmd rd [directory_name]. I must admit that the existing nircmd help file is a bit wanting ... but if you are familiar with existing Windows commands - you should be able to update/replace such commands with the use of nircmd.
    Last edited by mr_es335; 07-19-2020 at 03:48 PM.

  2. #2
    Join Date
    Oct 2009
    Location
    Maple Ridge, BC Canada
    Posts
    3,517
    Blog Entries
    1

    Default Re: SOT: Nirsoft

    Good day,

    As an example, here is a ZIP file of a monitor off routine that I use...[Click_me]

    All that this routine consists of is the following:

    @echo off
    nircmd monitor off
    exit /b

    I have also included an icon for use with the link. I have mine positioned immediately to the left of the Start button on the Quick Launch bar.

    One thing that is particularly handy with nircmd is that the commands are more "graceful" in the way in which they function...so often much better than using standard Windows commands.
    Last edited by mr_es335; 07-10-2020 at 09:13 AM.

  3. #3
    Join Date
    Oct 2009
    Location
    Maple Ridge, BC Canada
    Posts
    3,517
    Blog Entries
    1

    Default Re: SOT: Nirsoft

    Good day,

    "And now for something completely different..."

    The following routine, 1) installs SAC64, 2) exits the application Start Menu folder, 3) deletes the application Start Menu folder, 4) launches SAC, and 5) finally, exits SAC - all without user intervention!! ...and all without using a single Windows command. Pretty slick indeed!!

    @echo off
    :: Launch the installer
    nircmd exec show e:\desktop\SAC64_V1_1b.exe
    :: Select "Run"
    nircmd dlg "sac64.exe" "run" click ok
    :: Select [Enter] ... for [Setup]
    nircmd sendkey enter press
    :: Select [Enter] ... for [Install]
    nircmd sendkey enter press
    :: Select [Enter] ... for [OK] ...as many times as required...
    nircmd sendkey enter press
    nircmd wait 1000
    nircmd sendkey enter press
    nircmd wait 1000
    nircmd sendkey enter press
    nircmd wait 1000
    nircmd sendkey enter press
    nircmd wait 1000
    nircmd sendkey enter press
    nircmd wait 1000
    nircmd sendkey enter press
    :: Close window
    nircmd win close title "C:\Users\RML_User\AppData\Roaming\Microsoft\Windo ws\Start Menu\Programs\Software Audio Console"
    :: Remove the Software Audio Console folder
    nircmd moverecyclebin "C:\Users\RML_User\AppData\Roaming\Microsoft\Windo ws\Start Menu\Programs\Software Audio Console"
    :: Launch SAC...first time...
    nircmd wait 1000
    nircmd exec show C:\SAC64\SAC64.exe
    :: Exit SAC
    nircmd wait 4000
    nircmd win close title "SAC64"
    :: Done
    exit /b

  4. #4
    Join Date
    Oct 2009
    Location
    Maple Ridge, BC Canada
    Posts
    3,517
    Blog Entries
    1

    Default Re: SOT: Nirsoft

    Good day,

    Another one for those that interested...

    @echo off
    :: Launch SAC...then wait 2 seconds...then launch SAW...
    nircmd exec max C:\RML\SAC\SAC64.exe
    nircmd wait 2000
    nircmd exec max C:\RML\SAW\SAWStudio64.exe
    :: -------------------------------------------------
    :: ...now...wait...and adjust a channel fader in SAW...
    :: To invoke the [NOTICE!!] dialog on exit
    nircmd wait 6000
    :: -------------------------------------------------
    :: ...now...bring SAC to the front...
    nircmd win activate title "SAC64"
    :: -------------------------------------------------
    :: ...now...wait...and adjust a channel fader in SAC...
    :: Again, to invoke the [NOTICE!!] dialog on exit
    nircmd wait 6000
    :: -------------------------------------------------
    :: ...next...exit SAC...wait 2 seconds and send the keypress "n"...
    nircmd win close title "SAC64"
    nircmd wait 2000
    nircmd sendkey n press
    :: -------------------------------------------------
    :: ...wait a moment...to allow SAC time to exit...
    nircmd wait 3000
    :: -------------------------------------------------
    :: ...then...bring SAW to the front...
    nircmd win activate title "SAWStudio64"
    :: -------------------------------------------------
    :: ...then...exit SAW...wait 2 seconds and send the keypress "n"...
    nircmd win close title "SAWStudio64"
    nircmd wait 2000
    nircmd sendkey n press
    :: -------------------------------------------------
    :: Done!
    exit /b

  5. #5
    Join Date
    Oct 2009
    Location
    Maple Ridge, BC Canada
    Posts
    3,517
    Blog Entries
    1

    Default Re: SOT: Nirsoft

    Good day,

    This routine is similar to one provided by Brett Brandon using Autohotkey...and all without requiring Autohotkey "to be resident"!

    @echo off
    :: Launch SAC...with a session file
    :: The file extension mxs must be "associated" first
    nircmd shexec "open" "e:\desktop\test.mxs"
    :: Wait a moment
    nircmd wait 1000
    :: Bring SAC to the front
    nircmd win activate title "SAC64"
    :: Position the mouse cursor where the LIVE LED is located
    nircmd setcursor 28 55
    :: Send a single left click...to disable the LED
    nircmd sendmouse left down
    :: Move the pointer to the centre of the display...for 1600*900
    nircmd movecursor 800 450
    :: Done
    exit /b

    The code for the LIVE LED disable is simply this:

    nircmd setcursor 28 55 . . . . . . . . :: Move the cusror 28 pixels to the left and 55 pixels down
    nircmd sendmouse left down . . . :: Send a single left click...to disable the LED

    So, you could have the above stored as a link in your Quick Launch bar to invoke the disabling of the LIVE LED!!
    Last edited by mr_es335; 07-08-2020 at 07:02 AM.

  6. #6
    Join Date
    Oct 2009
    Location
    Maple Ridge, BC Canada
    Posts
    3,517
    Blog Entries
    1

    Default Re: SOT: Nirsoft

    Good day,

    How about 1) opening two windows, 2) tiling them, 3) wait for 4 seconds, and then 4) closing both windows.

    @echo off
    nircmd shexec "open" "E:\Desktop\1"
    nircmd wait 1000
    nircmd shexec "open" "E:\Desktop\2"
    nircmd wait 1000
    nircmd win setsize title "E:\Desktop\1" 0 0 800 900
    nircmd wait 1000
    nircmd win setsize title "E:\Desktop\2" 800 0 1600 900
    nircmd wait 4000
    nircmd.exe win close title "E:\Desktop\1"
    nircmd.exe win close title "E:\Desktop\2"
    exit /b

  7. #7
    Join Date
    Oct 2009
    Location
    Maple Ridge, BC Canada
    Posts
    3,517
    Blog Entries
    1

    Default Re: SOT: Nirsoft

    Good day,

    How about 1) opening two text files, 2) tiling them, 3) wait for 4 seconds, and then 4) closing both text files.

    @echo off
    nircmd shexec "open" "E:\Desktop\Text 1.txt"
    nircmd wait 1000
    nircmd shexec "open" "E:\Desktop\Text 2.txt"
    nircmd wait 1000
    nircmd win setsize title "E:\Desktop\Text 1.txt - metapad" 0 0 800 900
    nircmd wait 1000
    nircmd win setsize title "E:\Desktop\Text 2.txt - metapad" 800 0 1600 900
    nircmd wait 4000
    nircmd.exe win close title "E:\Desktop\Text 1.txt - metapad"
    nircmd.exe win close title "E:\Desktop\Text 2.txt - metapad"
    exit /b

  8. #8
    Join Date
    Oct 2009
    Location
    Maple Ridge, BC Canada
    Posts
    3,517
    Blog Entries
    1

    Default Re: SOT: Nirsoft

    Good day,

    I must admit, I am finding the following two scripts very handy indeed!!:

    @echo off
    :: Turn off monitor
    nircmd monitor off
    exit

    @echo off
    :: Disable LIVE
    :: Bring SAC to the front
    nircmd win activate title "SAC64"
    :: Position the mouse cursor where the LIVE LED is located
    nircmd setcursor 28 55
    :: Send a single left click...to disable the LED
    nircmd sendmouse left down
    exit

    I hope some will find these scripts useful?

  9. #9
    Join Date
    Oct 2009
    Location
    Maple Ridge, BC Canada
    Posts
    3,517
    Blog Entries
    1

    Default Re: SOT: Nirsoft

    Good day,

    In every instance where SAC and SAW are launched form a cmd script - and you want to ensure that both applications are launched with administrative rights, you can use any of the following:

    To launch SAC alone...
    nircmd elevatecmd exec max C:\RML\SAC\SAC64.exe

    To launch SAW alone...
    nircmd elevatecmd exec max C:\RML\SAW\SAWStudio64.exe

    To launch SAC with .mxs
    nircmd elevatecmd shexec "open" "[path\[filename].mxs"

    To launch SAW with .edl
    nircmd elevatecmd shexec "open" "[path\[filename].edl"

    The "key" here is the use the "elevatecmd" command.

    I have created four .bat files which can be used as templates for your own purposes...[Click_me]

    I hope that some will find these useful...'cause I shur'ly do!'

  10. #10
    Join Date
    Oct 2009
    Location
    Maple Ridge, BC Canada
    Posts
    3,517
    Blog Entries
    1

    Default Re: SOT: Nirsoft

    Good day,

    For these that are interested, I have created eleven scripts - for both 32-bit and 64-bit respectively.

    RML Scripts - 32-bit: [Click_me]

    RML Scripts - 64-bit: [Click_me]

    Each ZIP file contains a ReadMe! explaining what each of the scripts does. For example:

    1. Launches SAC only
    2. Launches SAW only
    3. Launches both, with three second pause
    4. Launches SAC, disables LIVE, centres cursor
    5. Launches both, disables LIVE, centres cursor
    6. Launches SAC with .mxs
    7. Launches SAW with .edl
    8. Launches both with session files, enables LIVE
    9. Exits SAC
    10. Exits SAW
    11. Exits Both
    12. Exits Both, disables LIVE
    13. Exits LIVE and SAC

    Three important points:
    1) You will require nircmd for your respective platform
    1) The display used is 1600 x 900
    2) Both .edl files and .mxs files need to be "associated"..if unsure..DuckDuckGo it...

    I hope that some find these scripts of some practicable use?

    PS: If you find this post useful...would you be so kind at to rate this thread? Thanks!
    Last edited by mr_es335; 07-21-2020 at 09:00 PM. Reason: Updated

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •