我正在嘗試建立一個使用者介面,要求使用者從清單中選擇“產品”,然後建立每個產品的圖表,並根據是否選取該複選框將“材質”新增至圖表標題。
到目前為止,我已經有了 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>