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
 Execution of scripts
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

alex_eagle

Austria
36 Posts

Posted - 11/14/2002 :  04:35:27 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I have a script where I use the doc -e W command with
an if statement and two loops. When I execute the script from
the script window it works well.
When started from a toolbar button, the doc -e W commands seems
not to be executed.
Whats wrong here ? Is there a problem with line by line execution in Origin 6.1 ?

Alex


Mike Buess

USA
3037 Posts

Posted - 11/14/2002 :  11:46:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Alex,

Does the toolbar button call for the correct script file and section? Insert the command

type -b OK;

at the top of the script section it's supposed to run and look for a message box that says "OK" when you click the button. If you don't see it then the button settings are wrong.

Other things you should look for are missing brackets and semicolons.

Mike Buess
Origin WebRing Member
Go to Top of Page

alex_eagle

Austria
36 Posts

Posted - 11/15/2002 :  02:15:27 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Mike,

I found the problem. The doc -e script makes some changes in worksheets, which doesnt work with empty ones.
But before you can click a button in the toolbar, a worksheet hast to be opened.
How can you highlight buttons in the toolbar without an active worksheet ?

Alex


Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 11/15/2002 :  5:55:08 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Alex,

User-defined toolbar buttons are only active in certain contexts (as you found out), so you need to choose all of the available contexts. View... Toolbars... Button Groups tab... find your button group... highlight your button... click the Settings button. Select the Windows radio button in the Context section and check all of the window types. That won't help you in an empty project or if a notes window (not one of the choices) is active, but it's the best you can do with toolbar buttons in Origin 6.1. (Origin 7 has an "Always" context which makes a button active at all times.)

Mike Buess
Origin WebRing Member
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