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
 Menu ids across versions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

peter.cook

UK
356 Posts

Posted - 04/28/2006 :  04:58:57 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

greg

USA
1380 Posts

Posted - 04/28/2006 :  11:47:38 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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.

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