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
 dotool 0;
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

coetzw01

USA
1 Posts

Posted - 01/08/2003 :  2:05:48 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I'd like the user to select a pre-drawn object on a graph (a line) and then type some information about that line.

The code I use is:

[PickAnObject]
dotool -d;
dotool 0;
def PointProc {
done=1;
type "Exits Procpoint now";
};
for(done = 0; done == 0; ) {
second -p 0.2;
}
However, the PointProc macro never gets called (it does when other tools are selected). How can I get the function to select the line and then wait for the selection to be completed before moving on with the code?

Laurie

USA
404 Posts

Posted - 01/08/2003 :  2:42:16 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The PointProc macro only gets executed when you click using the Screen Reader or the Data Reader. In other words, only these 2 tools are programmable. You can not program the pointer tool.

You'll have to associate your script with the object (line) itself. You won't need to use the pointproc macro. Right-click on the line, and select Label Control, to open the Label Control dialog. Put your script here and set the Script, Run After event to Button Up. Click OK. Now when the user selects the line, the script will execute. (You could also set the Script, Run After to Moved, so that the script will run when the user moves the line.)

Note: Once the object is a button, in order to get back to the Label Control dialog, you can Alt.+double-click on the object, or select Edit:Button Edit Mode.

OriginLab Technical Support
Go to Top of Page

greg

USA
1379 Posts

Posted - 01/08/2003 :  2:53:16 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Tool "0" is the Pointer Tool, but it's really just a "dummy" tool to indicate that no other tool is in use. "DoTool 0" is often used when some other tool (like Data Reader or Screen Reader) has been programmed to do something, but is now finished.

The POINTPROC macro can only be programmed for the Data Reader Tool and the Screen Reader Tool.

It isn't clear what you mean when you say "line". If you mean a plotted 'line', then you could use the Data Reader tool (or Screen Reader tool) to create a "commenter" with:

dotool 3; // or use dotool 2 for screen reader
dotool -d; // means use single-click to run
def pointproc {
dotool 0;
getstring (Comments for this data);
label -s -a X Y %B;
}

If you are talking about a drawn line, then you could use the Screen Reader tool as above, but you would actually only be clicking "near" the line.


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