Universal Sortcut Parser
Version 1.0
Universal Sortcut Parser.rar
- Launch multiple applications from one shortcut.
- Call usp.ahk with launch parameters and it will run sortcuts and scripts for this parameters.
I tryed to divide command line arguments parsing, app starting and scripts. That way scripst may be more clean and reusable and you can ran many independent scripts and files for each option.
I haven't compiled it, so AutoHotkey shold be installed.
So it now works like
- you call this proxy with command line arguments,
- proxy launches files, links, scripts with predefined commandline arguments.
Easiest way to create new option myOpt (if you will call scripts without any args) is to create dirs myOpt in both scripts and shortcuts dirs (or only one of them if you don't care, division of scrips and other files is made for scripts reusage in different options) and place your shortcuts, files and scripts there. And then create shortcut for usp.ahk and add command line argument myOpt in Object value like "usp.ahk" myOpt
I now have 3 normal sortcuts (.lnk) on desctop for (Object values bellow):
- Downlord's FAF Client
"D:\Program Files\Universal Sortcut Parser\usp.ahk" faf
- Supreme Commander Forged Alliance
"D:\Program Files\Universal Sortcut Parser\usp.ahk" sc
- FAForever Map Editor
"D:\Program Files\Universal Sortcut Parser\usp.ahk" maps
Note:
"D:\Program Files\Universal Sortcut Parser\usp.ahk" faf sc maps
- this will call all 3 options at once
Options may be written in file and/or inerpreted from file names: files (and all files in folders) named for option in shortcuts and scripts folders will be called.
Example for options.txt:
test script blank testArg1 arg2
test run C:\Program Files\Notepad++\notepad++.exe --help
faf file D:\Program Files\Downlord's FAF Client\downlords-faf-client.exe
faf script borderlessOptimisation ForgedAlliance.exe downlords-faf-client.exe
sc run steam://rungameid/9420
sc script borderlessOptimisation SupremeCommander.exe -
maps file D:\Program Files\fafmapeditor_alpha_v0704_WIP1\FAForeverMapEditor.exe
maps script borderlessOptimisation ForgedAlliance.exe FAForeverMapEditor.exe
About options in file:
- file will test if file (or dir) exsists and call it (or all files in dir),
- run will just call anything, USE IT to call files with command line arguments,
- scripts will search for all matching files and folders in scripts folder and can run them with normal and "additional" command line arguments.
Note:
- base script name can't contain spaces because spaces are dividers in string parsing, but it does not mater for files in folders.
For example I have adapted my old script and placed it in
scripts/borderlessOptimisation 0 0 1920 1080 folder and I'm calling it for sc option by string
sc script borderlessOptimisation SupremeCommander.exe -
This means that in scripts folder will be called all files named like borderlessOptimisation.exe, borderlessOptimisation second file.ahk, etc. and all files in directories named like borderlessOptimisation and borderlessOptimisation more args.
If I have borderlessOptimisation second file.ahk it will be called with 2 args SupremeCommander.exe - (game and client proccees names for my script, "-" as second arg is to make it run normally if more args are added later).
I have SC FAF borderleess ARGS.ahk in folder named borderlessOptimisation 0 0 1920 1080 so it will be called with 4 more args (6 args total), same as
sc run scripts/borderlessOptimisation 0 0 1920 1080/SC FAF borderleess ARGS.ahk SupremeCommander.exe - 0 0 1920 1080
and same may be done by copy-pasting original Supreme Commander Forged Alliance.lnk shortcut to shortcuts dir and remnaming it into "sc borderlessOptimisation SupremeCommander.exe -.lnk" or just placing shortcut in folder named this way.
Read README.txt for more understending about the naming and some other things.