The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Yes or no and wait for user action script

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
bedibra Posted - 08/30/2017 : 04:38:59 AM
Dear all,
I am looking for a way to insert a yes or no dialog box.
if yes then run the yes script.
if no then run the no script.
if possible also, I want an other dialog (after hitting the yes button and running the draw script) asking me to move the rectangle and wait for an OK click to run the crop script.
thanks in advance.

Yes script:
//draw rectangle:
draw -n rect -b;
rect.x=0;
rect.y=0;
rect.dx=50;
rect.dy=50;
rect.color=color(red);
rect.fillcolor = 0;
//crop and get the mean of the rectangle:
mcrop x:= rect.x y:= rect.y w:= rect.dx h:= rect.dy im:= [job1]job1 om:= [job1]job2;
mstats im:=[job1]job2 mean:=mymean; mymean=;
layer -d [job1]job2;
range rd=[Book1]Sheet1!1[1:1];
rd=mymean;
No script:
range rd=[Book1]Sheet1!1[1:1];
rd=0;

1   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 08/30/2017 : 2:29:12 PM
Hi bedibra,

You can use GetYesNo command, described at:
http://www.originlab.com/doc/LabTalk/ref/GetYesNo-cmd

You may also be interested in GetNumber(http://www.originlab.com/doc/LabTalk/ref/GetNumber-cmd)
and GetPts(http://www.originlab.com/doc/LabTalk/ref/GetPts-cmd) commands.

--Hideo Fujii
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000