try this one:
AHK_Midi2Keypress-S1.zip
EDIT: for S1 only 2 functions Record Stop
AHK_Midi2Keypress-S1-Only.zip

When it first runs it will ask for the midi device, this may come up behind the main GUI window.
It will send numpad * for record and spacebar for stop.

You can preset the midi notes with "Choose1" "Choose3"

All the other actions are for Biab, I can remove them if you just want the last 2 functions.

Code:
Gui, Add, Text, x10 y590, Function 7 Midi Note:
Gui, Add, DropDownList, gCheckNote7 vFunction7 Choose1 x10 y610, %RangeNote%

Gui, Add, Text, x150 y610, S1 Record

Gui, Add, Text, x10 y640, Function 8 Midi Note:
Gui, Add, DropDownList, gCheckNote8 vFunction8 Choose3 x10 y660, %RangeNote%

Gui, Add, Text, x150 y660, S1 Stop


		if (data1 = Function7)			
		{
			Winactivate, ahk_exe Studio One.exe
			Send, {NumpadMult}
			Sleep, 200		
		}
		if (data1 = Function8)			
		{
			Winactivate, ahk_exe Studio One.exe
			Send, {SPACE}
			Sleep, 200		
		}


Attached Files (Click to download or enlarge) (Only available when you are logged in)
BB23-AHK-S1-Record.png (18.16 KB, 41 downloads)
BB23-AHK-S1-Record-Only.png (7.17 KB, 38 downloads)