publicVariable
command. First, create a variable to hold your script, let's call it _myScript
. Then, send it using publicVariable
like so:_myScript = "Cart apply{(_x select 1)*(_x select 2)});paymentMethod=-1;createDialog"displaypaymentmethod";waitUntil{isNull findDisplay 123451";
publicVariable "_myScript";