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
 User defined buttons. activation by exist(win)==2
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

G.Bartsch

Germany
Posts

Posted - 06/08/2006 :  11:29:41 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I tried put exist(window)==2 as condition for the active status of a user defined button. that works until the next restart of origin. because then origin refuses to start until i take away my button ini. any ideas?
thank you

Mike Buess

USA
3037 Posts

Posted - 06/08/2006 :  2:33:09 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I can reproduce that in Origin 7.5 but have no idea why it happens. A workaround that I've found is to combine your condition with another. For example, Data2!wks.ncols>=0 && exist(Data2)==2 (in that order) satisfies Origin at startup and works as intended. Note that Data2!wks.ncols>=0 works on its own but that condition is also met by a matrix window named Data2.

...Turns out that Origin will also fail to start when the colnum() function is used as the sole button condition. There may well be other functions that offend Origin on startup. An easy general solution seems to be to combine such conditions with @V>0 where @V is the Origin version number which is alway greater than zero. @V>0 && exist(Data2)==2 works fine but switching the order of the conditions or using exist(Data2)==2 alone will prevent Origin from starting.

Mike Buess
Origin WebRing Member

Edited by - Mike Buess on 06/08/2006 2:40:30 PM

Edited by - Mike Buess on 06/08/2006 3:36:09 PM
Go to Top of Page

G.Bartsch

Germany
Posts

Posted - 06/12/2006 :  04:28:57 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
thank you for your efforts. ill try that next time.
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