-
Notifications
You must be signed in to change notification settings - Fork 0
installation guide
So, you want to use these scripts?
Alrighty then...let's get started!
- Installation
-
Setting Things Up in
settings.ini - Running The Scripts
- Using The Scripts
First, you'll need to install the scripts. It might be best to install the suite in the same location that I do.
- Start by downloading and installing AutoHotKey. Get the
Current Version- which you find linked after clicking theDownloadbutton. These scripts are not written or tested under V2 ALPHA, so don't go there (unless you know what you are doing). - After installing AutoHotKey, download the full set of files from this repository. (see below)
- Unzip the archive and put the files at this path: C:\BPTV-KB (more below)
- Once you have done that, you should be ready to start using the scripts without too much extra work.
My goal with this suite was to give it as little reliance on a set of specific folders residing in a hierachy that is specific to one of my machines. Also, I wanted it to be flexible enough to handle the small differences I encounter across the 3 or 4 systems I regularly use. The way I have constructed these scripts relies on relative path references as much as possible. I don't think there are too many references to specific paths that no one else is going to have on their systems's.
Regarding Step 1 above - If you are knowledgeable in Git/Github, feel free to Fork my repo and then connect your local version to your forked repository. That way you can make changes for your own setup and add things yourself and keep them backed up on Github. If you think I might find them useful, please feel free to submit them to me for consideration. I'm open to suggestions - particularly if it increases speed, efficiency, and capability.
Regarding the Path from Step 3 above - You should be able to put these scripts into nearly any folder you have permission to read/write in. I haven't tested many alternate paths, but the scripts are written to refer to other elements with relative paths - meaning the name of the root folder shouldn't matter. Keep in mind that some of the filenames are longish, so if you bury the scripts too deep into a hierarchy you could run into problems with Maximum Path Lengths in Windows.
In order for these scripts to work properly, you will need to run MASTER-SCRIPT.ahk and allow it to have Administrator Privileges. The script should ask for this permission whenever it runs (via UAC). I know that may be a bit controversial for some. You can read more about how to disable this down in the [Meta-Concepts] section, but I don't know what may break without Admin Privileges.
Once you've downloaded and installed the script suite, you are almost ready to start using them. You are missing one important file: settings.ini
I haven't included it for two reasons: 1) I run these scripts on multiple systems and each of those systems has a different combination of Scripts & Apps that get run on boot/load. And 2) it's specific to my setup & would break things on your end if you used my settings.ini file. Read on and I will go into how it is configured and how I have mine setup on my systems.
You can auto-create your own settings.ini file by simply running the MASTER-SETTINGS.ahk script. Just double-click it and it should open, create a basic settings.ini file, and then open the settings dialog. Click Save and you should be good to go. It will quit the settings dialog and then open your version of MASTER-SCRIPT.ahk with your settings. There is a example script that it will run & give you some more info about how you can further modify settings.ini.

There are a few things you will want to configure before you can take advantage of the scripts on your system.
Below is the code created in the default settings.ini file.
[Location]
currentSystemLocation=1
systemLocation1=This-PC
[Scripts]
loadScript1=1
pathScript1=settings-made.ahk
nameScript1=settings-made.ahk (auto-created)
[Apps]
loadApp1=1
pathApp1=MASTER-SCRIPT.ahk
nameApp1=Run MASTER-SCRIPT.AHK
[Settings]
timeoutPeriod=15000
splashScreenTimeout=4000
CapsLockToggleTimeoutThreshold=4
CapsLockToggleOffTimeout=8
nameScript1=settings-made.ahk (auto-created)CapsLockCheckPeriod=10000
The settings.ini file is divided into sections. These are indicated by the bracketed entries on lines by themselves. It is super important that you don't change these lines or mess them up. Make sure they stay on a line by themselves and don't change the order of the sections in the file.
The [Location] section selects the current location you are working from and lists the various systems you may have set up. If you wish to add more system locations, simply open settings.ini in a text editor. Add a new line under systemLocation1=This-PC and continue the numbering. The next one would be systemLocation2= and so on. You can also change the name (This-PC) to whatever you'd like. Here is an example of the locations I have on my systems:
[Location]
currentSystemLocation=1
systemLocation1=EDIT-2
systemLocation2=HOME-DESKTOP
systemLocation3=LAPTOP
systemLocation4=LAPTOP-PREONIC
Change the currentSystemLocation to the number of the system you wish to use. That identifier can be used to access different supporting files based on the location number. More on that below.
The [Scripts] section is where you can define a set of scripts to be loaded whenever MASTER-SCRIPT.ahk is run. Here is the [Scripts] section from one of my edit systems:
[Scripts]
loadScript1=1
pathScript1=SCRIPTS-PPRO\PREMIERE-PRO-HOTKEYS.ahk
nameScript1=PPRO Hotkeys
loadScript2=1
pathScript2=SCRIPTS-PPRO\PPRO_Right_click_timeline_to_move_playhead.ahk
nameScript2=PPRO - Right-click to move playhead
loadScript3=0
pathScript3=SCRIPTS-UTIL\Accelerated-Scrolling-1-3.ahk
nameScript3=PPRO - Accelerated Scrolling
loadScript4=0
pathScript4=SCRIPTS-ILLUS\ILLUS-HOTKEYS.ahk
nameScript4=ILLUSTRATOR Hotkeys
loadScript5=1
pathScript5=SCRIPTS-UTIL\ATOM-AHK.ahk
nameScript5=ATOM-AHK Helper
The loadScriptX= lines can be used to enable or disable a given script. Set the value to 1 to enable a script. Set it to 0 to disable. When using the MASTER-SETTINGS.ahk dialog (accessed by pressing CapsLock+F11 or ScrollLock+F11 when MASTER-SCRIPT.ahk is running), you can simply check the boxes to enable or disable the scripts there. pathScriptX= is the path to the script itself. If you are using scripts within the folder hierarchy (C:\BPTV-KB\), you can just enter the path from there (without the preceding C:\BPTV-KB\). See how I've down it above. And nameScriptX= can be used to give a descriptive name to whatever it is that the script does. (In an earlier version, I had just displayed the pathScriptX= value. It got confusing & cluttered.). If you have scripts you'd like to run that are outside of the BPTV-KB hierarchy, you can just enter the full path (with Drive Letter) to them.
If you wish to add or delete entires from this section, you can do so as long as you obey 2 rules:
- Keep the entries in numerical order. If you delete #3, then you need to adjust every line afterwards by subtracting one from each number (on each line for a given item - all #4's become #3's, all #5's become #4's and so on.).
- Make sure you have all 3 items needed for an entry:
loadScriptX=,pathScriptX=, &nameScriptX=for every entry you add.
The easiest way to add entries is to use the MASTER-SETTINGS.ahk dialog. There is an Add Script button. That will ask you for the path to the script and a name and then auto-add it to the settings.ini file. As of Sept. 2019, the Add Script function can only append a new script to the end of the list. I plan to add the ability to change the order & delete scripts in the future. For now, we have to do a little text editing.
The [Apps] section works similarly to the [Scripts] section. Apps defined here will be launched when the script BPTV-Launcher.ahk is executed. This launcher is a handy tool I devised to be run whenever I boot my system (more on that below).

As you can see above, the launcher pulls in the values from the settings.ini file for the Apps to run. Checkboxes show which are enabled and disabled. You can Add App with the button. Sadly the Delete App button isn't working just yet (I had thought it would be easier to add than it turned out - stay tuned!). There's also a handy button to open the settings.ini file in a text editor. You can also change the value of the timeout (the time it waits before launching the Apps). And you can save any changes you make (checking/unchecking boxes). The default timeout value is set to 15 seconds. You will probably want to change that. I have mine set to 7 seconds.
All the same rules apply to adding or deleting entries in the settings.ini file as in the [Scripts] section. Keep them in numerical order. Make sure you have all 3 items, in the correct order. Don't skip any numbers.
Finally, in order to get the scripts launched, there are a few ways to go about doing that.
First, you can just double-click on the MASTER-SCRIPT.ahk file directly. If you have AutoHotKey installed, it should associate .AHK files with AutoHotKey and launch them. You can do the same with the BPTV-Launcher script as well.
If you're like me, however, you probably don't want to be bothered with manually clicking on anything to get started. That's where the BAT-FILES folder comes in handy. I've left all of the files I use to launch things on my system in the repo - so you can see what I do & how.
On my system at Post-Op Media, I have an encrypted volume (VHD via Bitlocker) that I use to store personal stuff. Now, I want to mount that volume and unlock it for use, but only when I'm the one starting up the system.
The user_files_VHDMount_to_X.cmd file does that for me. Essentially, when launched does this:
- Ask to be granted Admin access (via UAC)
- Run itself over again with that Admin Access
- Runs a check to check mounted volumes & log them (I have a lot of Network Mounts)
- Check to make sure that the
X:drive is not mounted. It will warn you if it already exists. - If
X:is not mounted, it will mount the VHD file and prompt for the password - After mounting & unlocking
X:, it will launch theBPTV-Launcher.ahkscript (see above).
My script is based on a couple sources I found - the Admin elevation parts came from here and the VHD mounting part came from here.
FYI, .CMD are pretty much the same thing as .BAT files. There are a few minor differences. Good info here. The main reason I've switched over to using .CMD is the Elgato StreamDeck - you can't launch .BAT files (properly) from a StreamDeck key press. .CMD will work though. I did discover that you need to set the working directory (where you launch the script from) to get it to work properly. Here is what the launch BPTV-LAUNCHER.cmd contains:
cd C:\BPTV-KB
BPTV-LAUNCHER.ahk
Just a simple cd command and then the name of the script to run.
The files that start with MapDrives are a work-around I found & modified slightly from here. They will poll the mapped drives and display that info. I then log that info to a text file which I display in the user_files_VHDMount_to_X.cmd. This helped resolve an issue I had been having where Network Mounts would not show up until after boot was complete and I opened an Explorer window. It was odd, but this seems to fix it most of the time.
In order to get things to launch at boot, you just need to pick which file you wish to have auto-launch and put a copy in this folder: C:\Users\{USERNAME}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup. The script run-at-startup.ahk is my current autorun at boot. I went the extra step of compiling it into an exe through AutoHotKey - this makes it a little more friendly with the other apps that run at boot.
Modify the startup files to work with your system and set things up the way you want.
Now that you have it installed, let's go over what my scripts do. Follow the link below: