Template:SimpleDialog

From Vectorworks Developer
Revision as of 13:37, 15 July 2014 by Maziar (talk | contribs) (Created page with "<code lang="pas"> PROCEDURE Example; VAR i : INTEGER; BEGIN i := IntDialog('Enter an integer:', '0'); IF NOT DidCancel THEN BEGIN i := i*3; Message(i); END; END; RUN(Example);...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
PROCEDURE Example;
VAR
i : INTEGER;
BEGIN
i := IntDialog('Enter an integer:', '0');
IF NOT DidCancel THEN BEGIN
i := i*3;
Message(i);
END;
END;
RUN(Example);

Python

def Example():
	i = vs.IntDialog('Enter an integer:', '0');
	if not vs.DidCancel():
		i = i*3
		vs.Message(i)
Example()