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
 Menu ids across versions

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
peter.cook Posted - 04/28/2006 : 04:58:57 AM
Origin Version (Select Help-->About Origin): 7.5 SR6
Operating System: Win 2000

Hi (Greg),

following a reply to http://www.originlab.com/forum/topic.asp?TOPIC_ID=4778 - I use this approach alot - a question..

To what extent, if at all, can we rely on menu ids being consistent across versions for the same functions?

Cheers,

Pete

1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 04/28/2006 : 11:47:38 AM
Some background...

Occasionally, there will be a menu option that does something you just cannot do in LabTalk or OriginC. For example, the Edit menu has the standard options for editing : Copy, Cut and Paste. While you can certainly create LabTalk and OriginC code that does this, a selection of a large range would entail some hefty code and soem command that just 'does it' is very attractive. If you have devised a code solution that depends on one of the menu options, then you may have come across this command :

menu -e ID

or it's macro version :

domenu

You can execute these menu options by using either the command or the macro and the Menu id reported by the Shift+Ctrl mechanism in the aforementioned post. For example :

menu -e 57634; // Copy selection into Clipboard
domenu 57635; // Cut the selection
menu -e 57637; // Paste

--------------------------------------------------

The manual entry for the menu command should come with a warning that states that menu ids are subject to change from one version to another. The three particular items above have survived across many versions of Origin (and a quick check of Origin 8 code confirms they should still work), but keep in mind that resorting to Menu ID is a workaround that may be broken in some future version.

As you see a need to use a MenuID, you should advocate (via a Forum or correspondence with Tech Support) for extending LabTalk or OriginC to cover the functionality you need.


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