MultiEXE

This program will execute any Windows Shell command you rename it to (you have to add .exe to the end)

ie: renaming the file to "runme.exe" will execute the Windows Shell command "runme"

This is made specifically for the Infinitton LCD keypad which supports launching programs, but doesn't let you specify command line arguments

Some characters you might need (Specifically these {}|\^~`#""/:@=&?+!*,<> ) can't be used in a Windows filename, so they have to be converted to safe text

To have the program do it for you, rename the program to "multiexe.exe" and run it, it will ask what command you want to run

Put a ? then the command you want converted, and it'll give you the command converted to safe text. Press "Yes" and it'll copy it to the clipboard for you

ie: "? test~!@#$%^&*()" will give you "test%7E%21%40%23$%25%5E%26%00()"

It has some built in commands for convenience:

    • hibernate - Hibernates the PC

    • suspend - Suspends the PC

    • shutdown - Shuts down the PC

    • reboot - Reboots the PC

    • minimize - minimize the in-focus window

    • maximize - maximize the in-focus window

    • restore - restore the in-focus window

    • close - Close the in-focus window

    • logoff - Logs off from the current user

    • switchmon - Moves the currently in-focus window to your other monitor (if you have multiple monitors)

    • macro - Executes the text after the word macro as a list of keyboard commands (see below for more info)

    • saveas - A macro to save the image under the mouse in Firefox, Chrome or Internet Explorer, with a unique filename

    • WARNING: This command only works if Windows is set to English. May only work on Windows 7 as I can't test with 8 or 10

      • in version 2, this command will check what program is under the mouse, instead of what program is currently in focus

    • listaudiodevices - Shows a list of all available audio devices for use with the setspeaker and setmicrophone command, and copies the list to the clipboard

    • setspeaker [OUTPUT DEVICE NAME] - Sets the default audio playback device of your computer to the output device specified

    • setmicrophone [INPUT DEVICE NAME] - Sets the default audio recording device of your computer to the input device specified

    • version - Shows the internal version number of the EXE

    • shell [PROGRAM NAME] - If the [PROGRAM NAME] is open, the window will be brought into focus, otherwise the program will be started. [PROGRAM NAME] can be:

      • the full path of the EXE file itself (C:\Program Files (x86)\Mozilla Firefox\firefox.exe would need to be converted using the ? command to C%3A%5CProgram Files %28x86%29%5CMozilla Firefox%5Cfirefox.exe)

      • "webbrowser" (without the quotes) specifically to get your default web browser

      • any EXE file in your path environment variable (usually includes directories like C:\Windows\System32 and C:\Windows) ie: notepad.exe

      • any EXE listed in the Windows registry under HKEY_CLASSES_ROOT\Applications that has a shell\open\command value set (ie: iexplore.exe)

      • any EXE listed in the Windows registry under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\ (ie: firefox.exe)

      • a file extension starting with a period, and it'll get the program that is associated with those files (ie: .txt)

Version 2:

    • alwaysontop - sets the program currently in-focus to always on top

    • notontop - sets the program currently in-focus to not be always on top

Macros:

The Infinitton keypad currently supports sending 1 button press, but what if you want to send a bunch of them?

This function lets you do that by typing out the command like so: [RIGHT CLICK][WAITM 50]V[WAIT Save Image][ENTER].exe

which right clicks the mouse, waits 50 milliseconds, presses V, waits for the "Save Image" window to pop up, presses Enter (this is the saveas macro listed above)

The special keys/commands must be inside [SQUARE BRACKETS], must be upper-cased, and these are the ones the program supports:

replace the #s with a number

    • WAIT # - Wait # seconds before executing the next key command.

      • For this command, if # is text instead of a number, it will wait (a maximum of 10 seconds) for a new window to come into focus/pop up

      • Use the name of the window as to wait for a window with that specific name

      • Use the word "window" instead to just wait for any window

    • WAITM # - Wait # milliseconds before executing the next key command

    • LEFT CLICK - Left click where the mouse is

    • LEFT DOWN - Press the left mouse button down, where the mouse is

    • LEFT UP - Release the left mouse button down

    • RIGHT CLICK - Right click where the mouse is

    • RIGHT DOWN - Press the right mouse button down, where the mouse is

    • RIGHT UP - Release the right mouse button down

    • SCROLL # - Scroll the mouse wheel # lines (vertically)

    • SCROLLH - Scroll the mouse wheel # rows (horizontally)

    • MOVETO # # - Move the mouse to X (first #),Y (second #)

    • MOVEBY # # - Move the mouse X (first #),Y (second #) relative to where it currently is

    • CTRL - Makes it so the CTRL button is held for the next key press

    • ALT - Makes it so the ALT button is held for the next key press

    • SHIFT - Makes it so the SHIFT button is held for the next key press

    • BS - Backspace

    • DEL - Delete

    • DOWN - Down arrow

    • END - End

    • ENTER - Enter

    • ESC - Escape

    • HOME - Home

    • INS - Insert

    • LEFT - Left arrow

    • NUMLOCK - Number lock

    • PGDN - Page Down

    • PGUP - Page Up

    • RIGHT - Right arrow

    • SCROLLLOCK - Scroll lock

    • TAB - Tab

    • UP - Up arrow

    • F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12 - The Function buttons

    • PLAY - Presses the Play/Pause multimedia button

    • STOP - Presses the Stop multimedia button

    • NEXT - Presses the Next Track multimedia button

    • PREV - Presses the Previous Track multimedia button

    • MUTE - Presses the Mute multimedia button

    • VOLUP - Presses the Volume Up multimedia button

    • VOLDOWN - Presses the Volume Down multimedia button

    • MEDIA - Presses the Media Select multimedia button

    • MAIL - Presses the Mail multimedia button, which opens your email program

    • APP1 - Presses the App1 multimedia button, which opens whatever program you set Windows to launch

    • APP2 - Presses the App2 multimedia button, which opens whatever program you set Windows to launch

    • BACK - Presses the Back browser button

    • FORWARD - Presses the Forward browser button

    • REFRESH - Presses the Refresh browser button

    • CANCEL - Presses the Stop browser button

    • SEARCH - Presses the Search browser button

    • FAVORITES - Presses the Favorites browser button

    • HOMEPAGE - Presses the Home browser button

    • Any regular key on the keyboard (A-Z, 0-9) is just typed normally without the [square brackets]

Attached below is the most recent version of the program

*Note about MULTIEXE2 (version 2): At some point my harddrive hiccuped and I lost some of the code for MultiEXE, mainly related to how it handles keyboard/mouse macros. I managed to recover some, but since the code is different I can't guarantee version 2 functions the same way. As such, I have kept version 1 here.

MULTIEXE3: Since it's getting larger, I've added a new version with exclusive commands:

    • eval (followed by a mathematical equation) returns the result of the equation in a message box

    • whendone (followed by another full command) when the currently in-focus window is closed, the command will be executed (with a 30 second timer that can be aborted, just in case you change your mind)

    • whendonenow (followed by another full command) same as 'whendone', but without the 30 second abort timer

    • service [filename.exe] (see the second paragraph for the note about filenames) - automatically reopen the EXE file if it closes/crashes (it checks if it's open every 5 seconds)

    • for setspeaker and setmicrophone, the [DEVICE NAME] now accepts wildcards (* = multiple characters, ? = single character) and partial matches because nVidia keeps changing the name of audio devices with every update

    • command (followed by a section name from the command.ini file in the same directory as MultiEXE) executes the key=value pairs from that section in numerical order starting at key 1

      • Also excepts rudimentary programming commands:

        • if (equation) - If the equation evaluates as true, proceed to the next line of code, otherwise proceed to the next 'else'/'elseif'/'end if'

        • else - If the previous 'if' evaluates as false, proceed to the next line of code

        • elseif (equation) - Same as 'if', but is part can only be reached if a previous 'if' evaluated as false

        • end if - If any previous 'if', or 'elseif' evaluated as false, they'll proceed to the next line of code after the 'end if'. If they evaluated as true, they'll just skip this line

        • select (equation) - Proceed to the next line of code after a 'case' where the equation=value, otherwise proceed to the next line of code after 'end select'

        • case (value) - see 'select'

        • end select - see 'select'

        • goto (key name) - proceed to the line of code where key=key name

    • service (followed by a filename) runs forever, opening the filename specified if it's not running

      • Put this file (or if you're using an INI file, put a shortcut to this file otherwise Windows will open the INI file) in your Windows Startup directory to have it start with Windows

      • When multiexe is opened, it will wait 10 seconds before checking (to give Windows time to start up), after that it'll check every 5 seconds

      • The filename does not need the path if it's in the same folder as multiexe (ie: "service filename.exe.exe" will make sure "filename.exe" is always running)

      • If the filename is an INI file, multiexe will check every key in the [services] section that doesn't contain a period (I will use those for changing settings for a given file later)

      • An example INI file (you must use full path names to the file):

        • [services]

        • anything=C:\Program Files\Infinitton\Infinitton Smart Editor.exe

      • This is particularly useful because this program is built mainly for the Infinitton, and the Infinitton program tends to crash making it impossible to use multiexe when it does. Thus the services command can be used to re-open Infinitton automatically when it crashes