Run Script from Worksheet Script Dialogscript, in worksheet script dialogThe Worksheet Script dialog is mostly provided for backward compatibility with older versions of Origin that did not have the Auto Update feature in the Set Values dialog and/or did not have import filters where scripts could be set to run after import.
Scripts can be saved in a Worksheet (so workbooks have separate Worksheet Scripts for each sheet) and set to run after either importing into this Worksheet and/or changes in a particular dataset (even one not in this Worksheet).
Here is a script that is attached to Sheet3 which is set to run on Import (into Sheet3) or when the A column of Sheet2 changes.
range ra1 = Sheet1!1;
range ra2 = Sheet1!2;
range ra3 = Sheet2!A; // Our 'Change in Range' column
range ra4 = 3!2; // Import could change the sheet name ..
range ra5 = 3!3; // .. so we use numeric sheet references
ra5 = ra3 * ra2 / ra1 * ra4;