View Single Post
Old 10-27-2012, 03:06 PM   #23
spk77
Human being with feelings
 
Join Date: Aug 2012
Location: Finland
Posts: 2,541
Default

It's much faster if "SendMessage, 0x0111, 40409, 0,, ahk_id %MIDIWinId%" is replaced with "PostMessage, 0x0111, 40409, 0,, ahk_id %MIDIWinId%".
Code:
LoadButton:
WinGet, MIDIWinId, id, ahk_class REAPERmidieditorwnd	; get MIDIwindowID
WinActivate, ahk_id %MIDIWinId%
PostMessage, 0x0111, 40409, 0,, ahk_id %MIDIWinId% ; Load note names from file
Sleep, 1000 ; delay before ControlSetText (more reliable)
ControlSetText, Edit1, %SelectedFile%, Load MIDI note names from file:	; %SelectedFile% contains full path and filename. Edit1 is filename box in "Load MIDI note names from file" -dialog.
return

Last edited by spk77; 10-27-2012 at 03:17 PM.
spk77 is offline   Reply With Quote