Macro if/else help
Title
Macro if/else help
What do you expect to happen when you run the script/macro?
With this macro, I want to understand how if/else works. In the end, I want to create a macro that will first ask how many songs I want to bounce (multiple songs in one project), and if more than one, I want to be able to immediately provide the names for all the songs and send them for bouncing.
Are you seeing an error?
I’m not sure if this is an error, but I can’t understand why the macro I created only executes the “false” scenario.
What happens when you run this script?
The macro I created only executes the “false” scenario.
How were you running this script?
I clicked the "Run Script" or "Run Macro" button in SoundFlow
How important is this issue to you?
4
Details
{ "inputExpected": "With this macro, I want to understand how if/else works. In the end, I want to create a macro that will first ask how many songs I want to bounce (multiple songs in one project), and if more than one, I want to be able to immediately provide the names for all the songs and send them for bouncing.", "inputIsError": true, "inputError": "I’m not sure if this is an error, but I can’t understand why the macro I created only executes the “false” scenario.", "inputWhatHappens": "The macro I created only executes the “false” scenario.", "inputHowRun": { "key": "-MpfwYA4I6GGlXgvp5j1", "title": "I clicked the \"Run Script\" or \"Run Macro\" button in SoundFlow" }, "inputImportance": 4, "inputTitle": "Macro if/else help" }
Source
//Macro converted to script
sf.ui.proTools.appActivate();
const gaveUp = sf.interaction.displayDialog({
defaultAnswer: "1",
title: "Bounce Mix",
prompt: "How many songs you want to bounce?",
}).gaveUp;
//Calling command "Set Global State Variable (Boolean)" from package "Basics" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckuxffxq80000u010m7g02u3l/clycxeqx60000hy10jnc4f8zj")
sf.soundflow.runCommand({
commandId: 'user:ckuxffxq80000u010m7g02u3l:ckuxgs46b000ju010pxapxtz6',
props: {
variableName: "1",
targetValue: "False",
}
});
//Calling command "If Global State Variable Is (Boolean)" from package "Basics" (installed from user/pkg/version "srAasovvDiQacRZ2mcId4RrOA8R2/ckuxffxq80000u010m7g02u3l/clycxeqx60000hy10jnc4f8zj")
sf.soundflow.runCommand({
commandId: 'user:ckuxffxq80000u010m7g02u3l:ckuxgwr2d000nu010kzk433jw',
props: {
variableName: "1",
onTrue: gaveUp,
}
});
Links
User UID: Dwy1oJi8hva8IhuNBI0nhwywUFJ3
Feedback Key: sffeedback:Dwy1oJi8hva8IhuNBI0nhwywUFJ3:-OLKN_OurKEfrSq3ra2W
Feedback ZIP: 6s8ZxpRhbwTgTVGfo8ccYRMzQKXPksYLei7Uz3S5VEKbW68yubp3kiIPowYagjU6OQLNGNNgKNa4Ka7g9WSbdvvbIhkwSyxAc5KvTv5sZHUO+x/esomcEMutJTuhBfRHIy3KWDngd2mdL+q/sKIp/QhfbVe5PGNq3FC04XJiuCJZI3mC6/tFF9hVeUvehhRpnBzu3dj7HAflv+IH4hOPNA8xxzPGDMet9ibERkwtC60a/qXUYDwYWEcr7wqACSpNPEMd4LIObOqNaMzRDQ0xqDEXS7m+Yg6eC2UBxxREO1829UyXkmK8cG56D3eHH1cfw501wpSmu08g3tz5DHUcNLKTlQ5iEpyha2vzJuOb+6U=