Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER General Discussion Forum

Reply
 
Thread Tools Display Modes
Old 08-22-2019, 09:33 AM   #1
Gerry P
Human being with feelings
 
Gerry P's Avatar
 
Join Date: Jan 2009
Location: Ontario, Canada
Posts: 1,459
Default How to include a keystroke in an Action?

Is there a way to include a keystroke in an Action?

I want to open the fx on slot 1 and feed a "Ctrl-A" to it all as one custom action.

I have the fx open, but I don't see how to include the "Ctrl-A" as a last step.
__________________
The future ain't what it used to be. Yogi Berra

Last edited by Gerry P; 08-22-2019 at 09:52 AM.
Gerry P is offline   Reply With Quote
Old 08-22-2019, 10:33 AM   #2
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

You'd have to use something external like AutoHotKey and have the script trigger that from the command line.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 08-22-2019, 10:53 AM   #3
Gerry P
Human being with feelings
 
Gerry P's Avatar
 
Join Date: Jan 2009
Location: Ontario, Canada
Posts: 1,459
Default

thanks for the tip - I will try to figure out your suggestion.
__________________
The future ain't what it used to be. Yogi Berra
Gerry P is offline   Reply With Quote
Old 08-22-2019, 11:02 PM   #4
MusoBob
Human being with feelings
 
MusoBob's Avatar
 
Join Date: Sep 2014
Posts: 2,643
Default

Here's an example one you can edit to suit, you can add more macros Macro2: Macro3: ...
https://forum.cockos.com/showthread.php?t=224233#2
and a midi editor one https://forum.cockos.com/showthread.php?t=224123#2
or create a GUI with AHK https://forum.cockos.com/showthread.php?p=2167663#15
and clone other app's GUI and menus with SmartGUI & AutoGUI
Quote:
Originally Posted by MusoBob View Post
Not sure how to send keystroke with Lua in Reaper but you can try this,
If you are on Win you can do this:
Install AutoHotKey
Save this as Reaper Dynamic Split Item.ahk
run it

Sleep, 3000 is the delay until Enter is sent, I set it for a long file but you can adjust it to suit.
Ctrl+Shift+d is the hot key, for another hot key
http://xahlee.info/mswin/autohotkey_key_notations.html


Code:
; Only one instance running at a time
#SingleInstance force
 

;Reaper Dynamic Split Item > Ctrl Shift d
~^+D:: 
Macro1:
WinActivate, ahk_exe reaper.exe
Sleep, 100
Send, {d 1} ; Reaper Action key to Dynamic Split Item "d"
Sleep, 3000
Send, {Enter 1}
Return
Alt+I will give active window class, though AHK comes with WindowSpy.ahk to give window info
Code:
~Alt & I::
;Show ahk_class
Macro2:
WinGetClass, class, A
MsgBox, The active window's class is "%class%".
Return
__________________
ReaTrakStudio Chord Track for Reaper forum
www.reatrak.com
STASH Downloads https://stash.reaper.fm/u/ReaTrak

Last edited by MusoBob; 08-22-2019 at 11:33 PM.
MusoBob is offline   Reply With Quote
Old 08-23-2019, 12:12 PM   #5
Gerry P
Human being with feelings
 
Gerry P's Avatar
 
Join Date: Jan 2009
Location: Ontario, Canada
Posts: 1,459
Default

Thanks for this MusoBob. I will give it a try.
__________________
The future ain't what it used to be. Yogi Berra
Gerry P is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:51 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.