Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 04-29-2019, 02:53 AM   #1
BryanChi
Human being with feelings
 
Join Date: Jan 2019
Location: Taiwan
Posts: 432
Default (Noob Needs Help!) How to get EEL to show numbers(variable) in console?

Hi,
I must be missing something super obvious, but I just can't get console to show numbers, except when I enclose it with "".
For example if I input:

track = GetSelectedTrack(0, 0);
ShowConsoleMsg(track );

The console show up blank.

Help please!!Thanks!!
BryanChi is offline   Reply With Quote
Old 04-29-2019, 02:59 AM   #2
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by BryanChi View Post
Hi,
I must be missing something super obvious, but I just can't get console to show numbers, except when I enclose it with "".
For example if I input:

track = GetSelectedTrack(0, 0);
ShowConsoleMsg(track );

The console show up blank.

Help please!!Thanks!!
use sprintf(#str, "%d", track) within the ShowConsoleMsg function call.

Or something along those lines.

However - note - GetSelectedTrack returns a media track - not track number - so it wouldn't work in this case (I'm assuming you're wanting to display the track number?).
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 04-29-2019, 06:27 AM   #3
BryanChi
Human being with feelings
 
Join Date: Jan 2019
Location: Taiwan
Posts: 432
Default

Quote:
Originally Posted by lb0 View Post
use sprintf(#str, "%d", track) within the ShowConsoleMsg function call.

Thanks! I was fiddling with sprintf for so long actually, just didn't know how to format it correctly since the documentation is so concise..


Quote:
Originally Posted by lb0 View Post

However - note - GetSelectedTrack returns a media track - not track number - so it wouldn't work in this case (I'm assuming you're wanting to display the track number?).
Yes, I meant to make it show integers, shouldn't have used GetSelectedTrack.


btw lb0, I've been playing with your Chaos Engine script, it's so freakin' sick!! I've been wondering, it's not possible to automate a slider on Lua's gui is it? But it's possible on EEL because you can somehow connect it with jsfx?
BryanChi is offline   Reply With Quote
Old 05-10-2019, 05:27 AM   #4
lb0
Human being with feelings
 
Join Date: Apr 2014
Posts: 4,171
Default

Quote:
Originally Posted by BryanChi View Post
Thanks! I was fiddling with sprintf for so long actually, just didn't know how to format it correctly since the documentation is so concise..




Yes, I meant to make it show integers, shouldn't have used GetSelectedTrack.


btw lb0, I've been playing with your Chaos Engine script, it's so freakin' sick!! I've been wondering, it's not possible to automate a slider on Lua's gui is it? But it's possible on EEL because you can somehow connect it with jsfx?
Sorry - just seen this. Thanks,

Both Lua and EEL can get controller values via JSFX. I've found that to be the easiest way.

If you mean automate the crossfader in Chaos Engine - there's a script that's in the github folder that lets you do just that. This doesn't use the JSFX method though IIRC.
__________________
Projects - Reascripts - Lua:
Smart Knobs 2 | LBX Stripper | LBX Floating FX Positioner
Donate via Paypal | LBX Tools Website
lb0 is offline   Reply With Quote
Old 05-16-2019, 09:31 PM   #5
BryanChi
Human being with feelings
 
Join Date: Jan 2019
Location: Taiwan
Posts: 432
Default

Quote:
Originally Posted by lb0 View Post
Sorry - just seen this. Thanks,

Both Lua and EEL can get controller values via JSFX. I've found that to be the easiest way.

If you mean automate the crossfader in Chaos Engine - there's a script that's in the github folder that lets you do just that. This doesn't use the JSFX method though IIRC.
oh ok, I'll look into that!

Would you please tell me more detail about that? Which folder are you referring to? It's a script to automate controls in lua's gui in general?
BryanChi 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 06:41 AM.


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