| Author |
Topic  |
|
|
peter.cook
UK
356 Posts |
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
|
|
|
greg
USA
1380 Posts |
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.
|
 |
|
| |
Topic  |
|
|
|