Clear all

Autohotkey Script to add Patch Name, Instrument, Author, etc. from a Text File (or Excel)

3 Posts
2 Users
1 Reactions
Estimable Member
Joined: 4 years ago
Posts: 65
Topic starter  

Good day. I've found some really helpful autohotkey scripts in this forum and want to thank everyone who shared their patches but wanted to see if anyone had a script to pull the patch data from a text file (or Excel), and iterate through the list, one row at a time per patch, as I want to Unify some of my VST Instruments using a list, which includes, for example, the Patch Name in the first column, Instrument in the second column, Author in the third, and so forth. I would really appreciate any info of how this can be done.

Joined: 4 years ago
Posts: 343

Hi @jason_za,

Here is an example how I would loop through a file and extract the separate fields.

#SingleInstance, Force
Pause Off
CoordMode, Mouse, Window
SetTitleMatchMode, 2
!q:: ;Start script with Alt+q
loop, read, C:\Folder\Folder\FileName.txt ; Replace with your filepath
; Split read line to array of fields (metadata)
patch_row :=  A_LoopReadLine
;In this case, the fields in the file are delimited by $-sign. Replace with your choice.
StringSplit, patch_array, patch_row, "$" 
Sleep, 300
patch_name = %patch_array1% ;This is how to get the separate "fields" in the file. First fiels is 1.
sleep, 100
patch_instrument = %patch_array2%
sleep, 100
patch_author = %patch_array3%
sleep, 100
;And so on
;Add your code to update Unify below
MsgBox, Done!

The first four lines are standard settings I use in all my scripts. You can Google them to see what they do. 

Let me know if you need more input.


Win 10 and 11/Cubase Pro 12/Unify/Wavelab 8/Vienna Pro 7/Spectrasonics all/NI 13 Ultimate/Izotope MPS2/Serum/Cthulhu/Scaler 2.5/MusicLab guitar vsts/BIAB 2022/TouchOSC/Metagrid Pro etc

Robert.P reacted
Estimable Member
Joined: 4 years ago
Posts: 65
Topic starter  

Thanks a lot, @thsve - really appreciate it.