Old 10-15-2020, 03:17 PM   #1
Steviebone
Human being with feelings
 
Join Date: Jul 2018
Posts: 809
Default Closing the Rescript console output window by script

I need a function that closes the ReaScript console output window in lua. I found an example that closes the ReaConsole window and tried to adapt it but couldn't make it work. What's wrong with this code?

Code:
local hwnd = reaper.JS_Window_Find('ReaScript console output', true)
if hwnd then reaper.JS_Window_Destroy(hwnd) end
this is working now, have no idea what was going on...

Last edited by Steviebone; 10-15-2020 at 03:23 PM.
Steviebone is offline   Reply With Quote
Old 10-15-2020, 03:41 PM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,629
Default

What had happened when it did not work?

Btw, when using Ultraschall-Api, you can use CloseReaScriptConsole:
https://mespotin.uber.space/Ultrasch...aScriptConsole
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 10-15-2020, 06:35 PM   #3
Steviebone
Human being with feelings
 
Join Date: Jul 2018
Posts: 809
Default

Quote:
Originally Posted by Meo-Ada Mespotine View Post
What had happened when it did not work?

Btw, when using Ultraschall-Api, you can use CloseReaScriptConsole:
https://mespotin.uber.space/Ultrasch...aScriptConsole
I'm not 100% sure because I moved on but I think it was because there was a lot of windows open and the wrong one may have been in focus when I was compiling and the script was not actually recompiling? Maybe the file was opened somewhere already? When I closed all the superfluous windows and made sure the correct window was in focus and hit control-S it saved and recompiled and ran without incident. Probably user error

I'm constantly trying to balance time between the technical aspects of studio work and actual playtime. It can be a difficult juggling act. Sometimes I'm probably too impatient when coding and I may already be tired from a long day.

I'm going to have to check out that API though... Thanks for reminding me about that! And for your response.
Steviebone 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 02:31 PM.


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