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
 Origin Forum
 button
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

ovince

Yugoslavia
Posts

Posted - 11/20/2007 :  07:08:18 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,

I would like to costumise a button. Pressing it, every second column in the multi-column worksheet should be designated az X. So I wrote a small script:

[eveSecColIsX]


for (i=1;i<=100;i++){
if( mod(i,2) != 0) {
wks.col$(i).type=4
}
}

and saved it as "but_eveSecColIsX.ogs" file. I do the following now:

- view > Toolbars > Button Groups > User Defined
- when window is opened I choose one button and press Setting
- Under "File Name" I browse to "but_eveSecColIsX.ogs" file which contain the script
- under "Section Name" I put [eveSecColIsX]
- Under other filds I did not know what to put so I press OK and pull-out the button to Origin


Of course it does not work :) What I did wrong here? The help is poor in explaining how to accomplish this properly so I ask for help


thanks
oliver

Mike Buess

USA
3037 Posts

Posted - 11/20/2007 :  08:54:00 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
When I follow your directions the button works fine.

...I see now. You should omit the brackets [] from the Section name.



Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 11/20/2007 09:01:53 AM
Go to Top of Page

ovince

Yugoslavia
Posts

Posted - 11/21/2007 :  04:35:18 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
thanks Mike. In manual it is with []...
Go to Top of Page

Mike Buess

USA
3037 Posts

Posted - 11/21/2007 :  08:29:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
In manual it is with []...
I disagree although I suppose it could be misconstrued as that.

The Section Name Text Box

Specify the script file section that contains the script for this button in the Section Name text box.

In the script file, section names are enclosed in brackets. For example:

[SectionName]


I interpret that to mean that brackets appear in the script file, not in the Section Name text box.


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