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
 tools 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

domhuet

France
1 Posts

Posted - 05/03/2001 :  12:16:01 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I have built a tool with script in the label control dialog box that refer to script in an ogs file and I have saved it in an ogo file. After launching it with 'dotool -w myobject', I can't reach the script in the label control dialog box from outside the tools. If i have an action on the tool it's OK, but if I try to launch the script from the script window with the command myobject.run(), nothing happens. It seems that the tool is not really an object (list o shows nothing) and it cannot be reachable from outside itself. Can you give me some informations about this.
Thanks

Mike Buess

USA
3037 Posts

Posted - 05/04/2001 :  12:22:16 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Assuming the tool is already open, use 'dotool -wl myobject' to control it by script. The following script opens the tool, runs it and then closes it.

dotool -w myobject; //open myobject
dotool -wl myobject; //allow script access to myobject
myobject.run(); // run myobject
dotool -wl0 myobject; // disallow script access
dotool -wc myobject; //close myobject

If your tool were already open and you wanted it to stay open, then you would leave out the first and last lines.

Use the exist() function to find out if myobject is already open. 'exist(myobject)=' will return 7 if it is open and 0 if not. (I think that this usage of exist() was broken in some versions of Origin 6.0.)

-Mike
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