我正在嘗試構建一個 UI,要求用戶從列表中選擇“產品”,然後創建每個產品的圖表,並根據是否選中復選框將“材料”添加到圖表標題。
到目前為止,我有我的 UI 窗口,但我不知道如何將它連接到我的圖形腳本。 我認為像 If 語句之類的東西可能是關鍵,但我可能錯了。
Names Default To Here( 1 );
dt = Data Table( "untitled 16" );
values = dt:Product << Get Values;
array = Associative Array( values );
ProductList = array << Get Keys;
Final Products = {};
// Prompt for the input and create graph
FP = New Window( "Choose the Final Products",
<<MODAL> 0,
For( i = 1, i <= nt, i++,
If(
Final_Products[i] == 1,
// Call function for One step
Print( {1} ); // I tried "1" , but I'm missing something here. I am guessing I can insert the graph function here rather than print, but I was using print to check my work.
,
Final_Products[i] == 2,
// Call function for Two step
Print( 2 ); // I tried "2" , but I'm missing something here
);
);
);
FP << Close Window;</MODAL>