Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Q&A, Tips, Tricks and Howto

Reply
 
Thread Tools Display Modes
Old 06-18-2018, 04:04 AM   #1
javiramallo
Human being with feelings
 
javiramallo's Avatar
 
Join Date: Oct 2012
Location: Merida, Spain
Posts: 388
Default HOW COULD I? In a CUSTOM ACTION Accept a Confirmation Window.

Hi.
I would like to know if is possible in anyway accept a confirmation window as part of a custom action!

For example, delete a track.

Someone know what I am talking about with my bad english?

Thank you in advanced!

Last edited by javiramallo; 06-18-2018 at 04:10 AM.
javiramallo is offline   Reply With Quote
Old 06-18-2018, 04:17 AM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

I don't think so, unless there are versions of the actions available that skip confirmation dialogs.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 06-18-2018, 04:25 AM   #3
javiramallo
Human being with feelings
 
javiramallo's Avatar
 
Join Date: Oct 2012
Location: Merida, Spain
Posts: 388
Default

Quote:
Originally Posted by Xenakios View Post
I don't think so, unless there are versions of the actions available that skip confirmation dialogs.
☹️

Thanks Xenakios.
javiramallo is offline   Reply With Quote
Old 06-18-2018, 05:14 AM   #4
Lawrence
Human being with feelings
 
Join Date: Mar 2007
Posts: 21,551
Default

Couldn't you just wrap the action in a Boolean script for the confirm dialog and not fire the action unless the return value is true/yes? (asking, no idea how easy or not it is to make a simple yes/no dialog in LUA)
Lawrence is offline   Reply With Quote
Old 06-18-2018, 05:19 AM   #5
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by Lawrence View Post
Couldn't you just wrap the action in a Boolean script for the confirm dialog and not fire the action unless the return value is true/yes? (asking, no idea how easy or not it is to make a simple yes/no dialog in LUA)
If I understood correctly, the original poster wants to avoid any dialogs from appearing.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 06-18-2018, 06:00 AM   #6
Lawrence
Human being with feelings
 
Join Date: Mar 2007
Posts: 21,551
Default

Ah, gotcha, thanks. His example, deleting a track, doesn't have a default confirmation dialog so I (incorrectly) thought he was asking for one since (at least here) there is none.

(edit: I see now. The action delete track has a dialog, which the action remove tracks doesn't.)
Lawrence is offline   Reply With Quote
Old 06-18-2018, 06:18 AM   #7
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Anyway, if the question was actually about getting a confirmation dialog for actions which don't have one, ReaScript can be used. It's probably best to write the whole custom action as a script then.

The following is an example in Lua :

Code:
-- show ok/cancel dialog
local r = reaper.ShowMessageBox("Do you want to proceed?", "ReaScript", 1)
if r == 1 then -- user pressed ok button in dialog
  reaper.Main_OnCommand(40001,1) -- run insert new track action
  reaper.Main_OnCommand(40018,1) -- run insert media action
end
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.

Last edited by Xenakios; 06-18-2018 at 06:37 AM.
Xenakios is offline   Reply With Quote
Old 06-18-2018, 10:46 AM   #8
javiramallo
Human being with feelings
 
javiramallo's Avatar
 
Join Date: Oct 2012
Location: Merida, Spain
Posts: 388
Default

Thanks to all of you for the help!

The real thing that I am needing is:

Use the following actions without propmting:

_SWS_DELTRACKCHLD

I this gif I think taht all get more clear.



Let me know If I got to be understable!
javiramallo is offline   Reply With Quote
Old 06-18-2018, 11:09 AM   #9
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by javiramallo View Post
Let me know If I got to be understable!
Yes, unfortunately there is no way to skip showing that dialog.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 06-18-2018, 11:33 AM   #10
javiramallo
Human being with feelings
 
javiramallo's Avatar
 
Join Date: Oct 2012
Location: Merida, Spain
Posts: 388
Default

Quote:
Originally Posted by Xenakios View Post
Yes, unfortunately there is no way to skip showing that dialog.
:-(

Again thanks!
javiramallo is offline   Reply With Quote
Old 06-18-2018, 11:39 AM   #11
javiramallo
Human being with feelings
 
javiramallo's Avatar
 
Join Date: Oct 2012
Location: Merida, Spain
Posts: 388
Default

Quote:
Originally Posted by Xenakios View Post
Yes, unfortunately there is no way to skip showing that dialog.
By the way, The problem is not show the dialog but answer it, for example by a new action called "hit enter" or something like that.

Is not there a way to create an action to reproduce a keystroke in a determinate moment?

Thanks!

Last edited by javiramallo; 06-18-2018 at 11:57 AM.
javiramallo is offline   Reply With Quote
Old 06-18-2018, 01:11 PM   #12
javiramallo
Human being with feelings
 
javiramallo's Avatar
 
Join Date: Oct 2012
Location: Merida, Spain
Posts: 388
Default

Quote:
Originally Posted by Lawrence View Post
Couldn't you just wrap the action in a Boolean script for the confirm dialog and not fire the action unless the return value is true/yes? (asking, no idea how easy or not it is to make a simple yes/no dialog in LUA)
I don't know how do that!

Thanks in any case.
javiramallo is offline   Reply With Quote
Old 06-18-2018, 02:09 PM   #13
Lawrence
Human being with feelings
 
Join Date: Mar 2007
Posts: 21,551
Default

Quote:
Originally Posted by javiramallo View Post
Is not there a way to create an action to reproduce a keystroke in a determinate moment?

Thanks!
I was wondering the same. You'd only need two command actions, Left (to make sure you get the Yes button) and Enter. Did you look through the action list for those? (no personal clue)
Lawrence is offline   Reply With Quote
Old 06-18-2018, 02:26 PM   #14
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by Lawrence View Post
I was wondering the same. You'd only need two command actions, Left (to make sure you get the Yes button) and Enter. Did you look through the action list for those? (no personal clue)
Nope, nothing for things like that in the Reaper API.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios 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 11:30 PM.


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