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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 User defined buttons. activation by exist(win)==2

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
G.Bartsch Posted - 06/08/2006 : 11:29:41 AM
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
2   L A T E S T    R E P L I E S    (Newest First)
G.Bartsch Posted - 06/12/2006 : 04:28:57 AM
thank you for your efforts. ill try that next time.
Mike Buess Posted - 06/08/2006 : 2:33:09 PM
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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000