|
|
|
10-14-2019, 07:39 PM
|
#1
|
Human being with feelings
Join Date: Jan 2009
Location: Ontario, Canada
Posts: 1,459
|
How to close Console window automatically
I want to toggle FX enable within an action.
I found the SWS action "SWS: Open console with 'f' to toggle FX enable".
However, I can't find a way to close the console window immedately after this instruction to move to the next step.
I tried to use Edgemeal's post https://forum.cockos.com/showpost.ph...11&postcount=2 without any luck.
Can anyone help?
__________________
The future ain't what it used to be. Yogi Berra
|
|
|
10-14-2019, 07:57 PM
|
#2
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
You'd need to change the title text to 'ReaConsole', e.g.,.
Code:
function CloseReaConsole()
local title = reaper.JS_Localize('ReaConsole', "common")
local hwnd = reaper.JS_Window_Find(title, true)
if hwnd then reaper.JS_Window_Destroy(hwnd) end
end
Last edited by Edgemeal; 10-14-2019 at 08:23 PM.
|
|
|
10-14-2019, 08:16 PM
|
#3
|
Human being with feelings
Join Date: Jan 2009
Location: Ontario, Canada
Posts: 1,459
|
Thanks Edgemeal for such a quick reply.
I tried your suggestion and although it did close the Console Window, a ReaScript console output window opened instead, which then has to be closed. (I may be missing something though).
__________________
The future ain't what it used to be. Yogi Berra
|
|
|
10-14-2019, 08:27 PM
|
#4
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
That code closes a window, not opens them! Check you code!
On another note, the code above was using 'reaper.JS_Window_FindTop', and that wouldn't work if the window was docked so I changed it to 'reaper.JS_Window_Find'.
|
|
|
10-14-2019, 08:58 PM
|
#5
|
Human being with feelings
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
|
The original example does show a console message if the wait time hasn't been reached yet. Just remove the line with reaper.ShowConsoleMsg.
|
|
|
10-15-2019, 08:42 AM
|
#6
|
Human being with feelings
Join Date: Jan 2009
Location: Ontario, Canada
Posts: 1,459
|
Quote:
Originally Posted by Lokasenna
Just remove the line with reaper.ShowConsoleMsg.
|
Thanks... that did it.
__________________
The future ain't what it used to be. Yogi Berra
|
|
|
10-15-2019, 08:51 AM
|
#7
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by Gerry P
Thanks... that did it.
|
Sorry I missed that.
|
|
|
10-16-2019, 06:39 PM
|
#8
|
Human being with feelings
Join Date: Jan 2009
Location: Ontario, Canada
Posts: 1,459
|
np... I'm just happy you had written this script. Thanks again.
__________________
The future ain't what it used to be. Yogi Berra
|
|
|
10-16-2019, 07:17 PM
|
#9
|
Human being with feelings
Join Date: Jan 2009
Location: Ontario, Canada
Posts: 1,459
|
I am trying complete a custom action that will toggle the selected track's FX enabled using SWS: Open console with 'f' to toggle FX enable but if I follow with the CloseConsole(), the SWS command does not complete.
Prior to running CloseConsole(), how can I send an ENTER key command to accept whatever is in the Console window.
Although I briefly searched the .lua manual, it is a little overwhelming.
__________________
The future ain't what it used to be. Yogi Berra
|
|
|
10-16-2019, 08:41 PM
|
#10
|
Human being with feelings
Join Date: Apr 2016
Location: ASU`ogacihC
Posts: 3,913
|
Quote:
Originally Posted by Gerry P
I am trying complete a custom action
|
I found this in the API docs, seems to do the same thing that sws console thing is doing here,..
Code:
-- (-1) = bypass all if not all bypassed,otherwise unbypass all.
reaper.BypassFxAllTracks(-1)
EDIT
Although there are these actions,
Code:
Track: Bypass FX on all tracks
Track: Unbypass FX on all tracks
So now I'm not sure what you need, I don't even know what SWS console is, maybe it does more?.. never used it LOL!
|
|
|
10-18-2019, 11:55 AM
|
#11
|
Human being with feelings
Join Date: Jan 2009
Location: Ontario, Canada
Posts: 1,459
|
Thanks for the reply.
In the end, I was able to finish my Custom Action using only the Reaper and SWS commands without the need to open the Console window - and therefore no need to close it.
My goal, among others in my Custom Action, was to toggle FX Enable on selected tracks only.
__________________
The future ain't what it used to be. Yogi Berra
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 01:48 AM.
|