Forum Replies Created
-
Adrián Wulfrath
April 5, 2016 at 4:03 pm in reply to: How to create a DropDownList to change a Panel inside the same Panel???Well here is my Panel Code, and i have problems to run the URL script so where i put that code???? Can you help me please?, and why if i call a variable from the panel group doesnt work like the Window functions??. Windows and Panels doesnt work with the same script structure…
//Explorer Voraz Button
var winBrowserCmd = "C:/Program Files/Internet Explorer/iexplore.exe";
var macBrowserCmdStart = "osascript -e 'open location \"";
var macBrowserCmdEnd = "\"'";{
function myScript(thisObj){
function myScript_buildUI(thisObj){
var myPanel = (thisObj instanceof Panel) ? thisObj : new Window("palette","My Window name",undefined,{resizable:true});res = "group{orientation:'row',\
groupTwo: Group{orientation:'column',\
myIconButton: IconButton{text:'IconButton', image:'~/Desktop/LogoC5Ctrl.png'},\
myStaticText: StaticText{text:'Este es mi texto /n dfgdf'},\
},\
groupOne: Panel{text:'Master', orientation:'column',alignment:['fill','fill'],alignChildren:['fill','fill'],\
myCheckbox: Checkbox{text:'My Checkbox'},\
myDropDownList: DropDownList{properties:{items:['Amarillo','Morado','LightBlue','MidBlue']}},\
},\
}";myPanel.grp = myPanel.add(res);
//Defaults
myPanel.grp.groupOne.myDropDownList.selection = 0myPanel.grp.groupTwo.myIconButton.onClick = LinkToURL;
myPanel.layout.layout(true);
return myPanel;
}
function LinkToURL()
{
//Action to link Voraz OnClick
BtnURL.onClick = LinkToURL;function LinkToURL()
{
var URL = "https://www.estudiovoraz.com"; // your web page
if ($.os.indexOf("Windows") != -1)
system.callSystem(winBrowserCmd + " " + URL);
else
system.callSystem(macBrowserCmdStart + URL + macBrowserCmdEnd);}
}
var myScriptPal = myScript_buildUI(thisObj);
if((myScriptPal != null) && (myScriptPal instanceof Window)){
myScriptPal.center();
myScriptPal.show();
}}
myScript(this);
} -
Adrián Wulfrath
April 4, 2016 at 7:28 pm in reply to: How to create a button to change text with prompt toolkitThank you, really cool.
-
Adrián Wulfrath
April 4, 2016 at 6:29 pm in reply to: How to create a button to change text with prompt toolkitHey Dan, thank you for all, i actually got it with this code:
But do you know how to link the checkbox with an effect checkbox????//Creating My Window
var myWin = new Window (“palette”,”Canal 5 Controles”,undefined,{resizeable: false , maximizeButton: false});
myWin.orientation = “row”;var groupOne = myWin.add(“panel”,undefined,”MasterControles”);
groupOne.orientation = “column”;
groupOne.add (“iconbutton”,undefined,”~/Desktop/LogoC5Ctrl.png”,”https://www.google.com”)
groupOne.add(“statictext”,undefined,”Primer Grupo”)
var dd = groupOne.add(“dropdownlist”,undefined,[“OFF”,”Amarillo”,”Rojo”]);
dd.selection = 0;
groupOne.add(“checkbox”,undefined,”Caritas”);
groupOne.add(“checkbox”,undefined,”Iconos”);dd.onChange = updateProject;
//Action of my DropDownMenu
function updateProject(){
var dropSelection = dd.selection.text;switch (dropSelection){
case “OFF”:
// do stuff for dropdown named “dd1”
alert(“blabla”);
break;
case “Amarillo”:
// do stuff for dropdown named “dd2”
alert(“jaja”);
app.project.item(7).layer(“_Control”).property(“Effects”).property(“Control v2”).property(“Color System”).setValue([3]);
break;
case “Rojo”:
// do stuff for dropdown named “dd2”
alert(“Rojo”);
app.project.item(7).layer(“_Control”).property(“Effects”).property(“Control v2”).property(“Color System”).setValue([3]);
break;default:
alert(“default”);
break;
}
}myWin.center();
myWin.show(); -
Adrián Wulfrath
April 1, 2016 at 5:48 pm in reply to: How to create a button to change text with prompt toolkitMy Dropdown list is a Pseudo Effect inside a _Control Layer: Somethig like this:
Layer: _Control
Effect: Control v2
Dropdownlist
->
-OFF
-Amarillo
-Rojo
-MoradoAnd i want to connect from my Script depending of Selection to the Dropdown list of my Effect. Thats because im calling the app.project.item bla bla bla
All i want to connect is that dropdown menu to my dropdownlist in my script window. -
Adrián Wulfrath
April 1, 2016 at 1:48 am in reply to: How to create a button to change text with prompt toolkitMy Dropdown list is a Pseudo Effect inside a _Control Layer: Somethig like this:
Layer: _Control
Effect: Control v2
Dropdownlist -> OFF
Amarillo
Rojo
MoradoAnd i want to connect from my Script depending of Selection to the Dropdown list of my Effect. Thats because im calling the app.project.item bla bla bla
All i want to connect is that dropdown menu to my dropdownlist in my script window. -
Adrián Wulfrath
April 1, 2016 at 1:20 am in reply to: How to create a button to change text with prompt toolkitI actually prove it but doesnt work, i dont know if i need something more or less. But how did you do your dropdown list ???
-
Adrián Wulfrath
April 1, 2016 at 1:14 am in reply to: How to create a button to change text with prompt toolkitSomething like this??????:
//Creating My Window
var myWin = new Window (“palette”,”Canal 5 Controles”,undefined,{resizeable: false , maximizeButton: false});
myWin.orientation = “row”;var groupOne = myWin.add(“panel”,undefined,”MasterControles”);
groupOne.orientation = “column”;
groupOne.add (“iconbutton”,undefined,”~/Desktop/LogoC5Ctrl.png”,”https://www.google.com”)
groupOne.add(“statictext”,undefined,”Primer Grupo”)
var dd = groupOne.add(“dropdownlist”,undefined,[“OFF”,”Amarillo”,”Rojo”]);
dd.selection = 0;
groupOne.add(“checkbox”,undefined,”Caritas”);
groupOne.add(“checkbox”,undefined,”Iconos”);//Action of my DropDownMenu
dd.onChange = updateProject;function updateProject(){
switch (this.name){
case “dd1”:
// do stuff for dropdown named “dd1”
selection = 1
app.project.item(7).layer(“_Control”).property(“Effects”).property(“Control v2”).property(“Color System”).setValue([1]);
break;
case “dd2”:
// do stuff for dropdown named “dd2”
selection = 2
app.project.item(7).layer(“_Control”).property(“Effects”).property(“Control v2”).property(“Color System”).setValue([3]);
break;
default:
break;
}
}myWin.center();
myWin.show(); -
Adrián Wulfrath
April 1, 2016 at 12:15 am in reply to: How to create a button to change text with prompt toolkitSooo can you share me an example for that??? plsssss
-
Adrián Wulfrath
March 31, 2016 at 10:55 pm in reply to: How to create a button to change text with prompt toolkitOk i got it, but now how can i assign for each dropdown menu list a different Root Object:
//Creating My Window
var myWin = new Window (“palette”,”Canal 5 Controles”,undefined);
myWin.orientation = “row”;var groupOne = myWin.add(“panel”,undefined,”MasterControles”);
groupOne.orientation = “column”;
groupOne.add (“image”,undefined,”~/Desktop/LogoC5Ctrl.png”)
groupOne.add(“statictext”,undefined,”Primer Grupo”)
var dd = groupOne.add(“dropdownlist”,undefined,[“OFF”,”Amarillo”]);
dd.selection = 0;
groupOne.add(“checkbox”,undefined,”Caritas”);//Action of my DropDownMenu
dd.onChange = updateProject;function updateProject(){
var lis = dd.selection = 1
lis = app.project.item(1).layer(“Control”).property(“Effects”).property(“Control”).property(“Color System”).setValue([4]);
}myWin.center();
myWin.show(); -
Adrián Wulfrath
March 31, 2016 at 10:23 pm in reply to: How to create a button to change text with prompt toolkitThank you a lot, i will try with that script. Probably i will have another question. So actually i do not close this post.