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
 problems using pointproc

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
wmfry99 Posted - 06/22/2018 : 1:46:15 PM
Origin Ver. and Service Release (Select Help-->About Origin): 2015 64bit sr1 9.2.257
Operating System:win10

hi
i'm having some trouble with pointproc/dotool to get four points from a graph. Specifically, the script below works in a script the first time i run it, but I have to exit origin to get it to work again....

additionally, the type -b command seems to work only sometimes,
i've tried deleting the loose dataset, but that does not solve the issue.

I think the script originally came Originlab support, and was modified.

I'd appreciate some help to figure out the problem.

*******************
count=0;

@global = 1;
dataset dsIndex;
dotool 3;
count = 1;
def pointproc
{
dsIndex[count] = index;
count++;
if(count==5)
dotool 0;
};
def quittoolbox
{
if(count<5)
%o = "PICK POINTS";
type -b %o;

else
{
run.section(a-potassium current.ogs,IA_IVplot);

};
};
3   L A T E S T    R E P L I E S    (Newest First)
yuki_wu Posted - 06/26/2018 : 10:09:22 PM
Hi Mark,

Please take a look at this page:
https://www.originlab.com/doc/LabTalk/ref/QuitToolbox-macro

Regards,
Yuki
OriginLab
wmfry99 Posted - 06/26/2018 : 1:36:56 PM
Thanks
The macro behaves a bit better after tidying up, I have it in three locations in the same .ogs file.

Can you explain what the quittoolbox macro defined here accomplishes? I cant seem to find details or other examples.

Thanks!
mark
yuki_wu Posted - 06/24/2018 : 10:32:06 PM
Hi,
I modified your script a litte bit for debugging, but it works fine to me. I am not sure what the issue is, you could tell me more:
	@global = 1;
	dataset dsIndex;
	dotool 3;
	count = 1;  // Initial point
	type "Click to select point, then press Enter";
	type "Press Esc or click on Pointer tool to stop";
	def pointproc
	{
		dsIndex[count] = index;
		count++;
		if(count==5)
		{
			dotool 0;
		}
		else
		{
			type -a Select next point;
		}
		
	}
	
	def quittoolbox
	{
		if(count<5)
		{
			%o = "PICK POINTS";
			type -b %o;
		}
		else
		{
		   for(int ii=1; ii<=count; ii++)
		   {
				type -a $(dsIndex[ii]);
		   }
		}
	}

Regards,
Yuki
OriginLab

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