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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Yes or no and wait for user action script
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bedibra

France
35 Posts

Posted - 08/30/2017 :  04:38:59 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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;

Hideo Fujii

USA
1582 Posts

Posted - 08/30/2017 :  2:29:12 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000