Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 01-26-2019, 07:35 AM   #1
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default [SOLVED] FR: Null character separator GetUserInputs ReaScript function

Hi,


Currently, v5.965



Code:
retval, retvals_csv = reaper.GetUserInputs( title, num_inputs, captions_csv, retvals_csv )

will return all fields with comma separated values.


This work nicely with numbers (for eg, 15,10.1), but one of this field contains itself a comma (like for eg if one of your field is for keywords), it will mess everything.


The solution can be to escape the string right in the input fields with quotes, but user don't think of that (cause each input are an individual cells to his eyes).


If the separator was a way more uncommon string like a Null character \0 (just like in JS_ReaScript extension API functions), it would be way more easier to parse the return values, which could contains comma without causing issues with other fields.


Thanks !

Last edited by X-Raym; 05-29-2019 at 04:11 AM.
X-Raym is offline   Reply With Quote
Old 01-27-2019, 03:14 PM   #2
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,630
Default

+1000
We need such thing for Ultraschall.fm,where we ask the user for mp3-metadata(cover, title, album,etc) and have to force the users to not input commas,which is bad UX for our users and cause of bugreports.
__________________
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 01-27-2019, 05:01 PM   #3
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Obviously it would limit your UI choices, but my GUI has a replacement GetUserInputs dialog that returns an array.

+1 to the FR though, it's been requested a few times in a few different forms.
__________________
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 05-28-2019, 04:12 AM   #4
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,900
Default

Bump


This is still a highly demanded feature among scripters and workarrounds are extra hard to implements (using js_Extension to try to find the values of the fiels with window identifier, puting than in Extstate etc etc.... and still no usable solution so far).
People don't expect to have to escape with quotes in a text fields, as they clearly appear separated.



Thx for taking a look !


EDIT: Surely solved in the future via : https://forum.cockos.com/showthread....58#post2140258

Last edited by X-Raym; 05-28-2019 at 12:52 PM.
X-Raym 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 07:27 AM.


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