I'm trying to open a frame by selecting yes in the messagebox. The book "Manufacturing simulation with plant simulation" states the following:
If the user clicks one of the buttons, the method messagebox returns one of the following values:
• OK 1
• Cancel 2
• Yes 16
• No 32
messageBox("hello", 48, 0)
My question is how I can read those values that the messagebox should return? My if then, when, and inspect methods did not work
Thank you in advance!
Solved! Go to Solution.
the code should be like this:
is input:string; pass:string; do if messageBox("hello", 48, 0) = 16 then .models.model.Frame.openDialog; end; end;
The value you're looking for is returned by the messageBox function, and the number corresponds to the list you posted above.
You can also store the value in a variable:
local retValue : integer := messageBox("hello", 48, 0);
Hope this help you.