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
 shortcut??

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
byrdin Posted - 02/03/2003 : 03:47:45 AM
hi there

is there any way of assigning to an often used labtalk script a shortcut key? maybe via a custom button?
mice-waving drives me crazy. thanx for hints.
martin
6   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 02/06/2003 : 4:11:57 PM
You can add your code to FULLMENU.CNF.

When Origin starts, it reads the ORIGIN.INI file including the following:
Reads NumLevels from the Config section.
This is the number of menu levels available under Format : Menu
Read a menu Title# and File# list to determine which CNF files to process for each menu level.
Reads Level from the Options section to determine the active menu level and - therefore - which CNF files to read.


byrdin Posted - 02/04/2003 : 03:54:49 AM
thanx greg,
that does the job fine.
where do you think is the best place to include that
menu defing piece of code to make it permanent?
thanx martin
greg Posted - 02/03/2003 : 10:59:27 AM
The LabTalk menu command supports shortcut keys, but we don't have support for accelerator keys anywhere. The difference can be seen in the Print menu option. You can access this option with Alt-F, then P (which is the shortcut sequence) or via Ctrl-P (which is the accelerator key sequence).
Here is an example that sets up a new menu option under Tools to run a custom routine:

menu -w;
menu ?To;
menu -i 11 (&My Spiffy Tool) {run.section(custom,main);};

I could then access my custom routine with Alt-T, M.
The ampersand in front of 'M' simply tells windows to underline the 'M' and use it as a shortcut. According to Window's rules for shortcuts, if you use a letter more than once, then the shortcut key cycles through each option and you must use 'Enter' to execute.
In the above example, had I executed:

menu -w;
menu ?To;

menu -i 11 (My Spi&ffy Tool) {run.section(custom,main);};

then the 'f' key would be my shortcut - which 'conflicts' with the 'Fit Comparison' menu option - and my sequence becomes Alt-T, f, f, Enter.

Mike Buess Posted - 02/03/2003 : 10:16:00 AM
Hi Marten,

You can't create keyboard shortcuts in Origin. The closest you can get is to define a macro with a short name...

def m1 {
-- labtalk commands --
};

Then run the macro by entering its name in the script window. You'll have to keep the script window open and handy at all times in order for this to useful, but you might try it out.

Mike Buess
Origin WebRing Member
byrdin Posted - 02/03/2003 : 09:18:59 AM
that is all allright and fine, but finally i still need to press the button (by mouse) and not the shortcut key (on the keyboard ), which was the aim of the game

sorry if my question was unclear.martin
easwar Posted - 02/03/2003 : 09:01:53 AM
Hi Martin,

A good start could be to place your script in the file Custom.ogs that can be found in the main folder of the Origin installation. Then you can run your script any time by clicking on Custom Routine button on the Standard Toolbar, the one that looks like a flow chart.

You can then look in the Origin manual andd/or the product help files for the section "Creating a Button that Performs a Custom Task", to learn more about creating your own custom buttons.

If you have version 7, your custom button could call an Origin C function - you can have your custom Origin C functions load and compile automatically any time Origin launches, and access them from you buttons.

Easwar
OriginLab.



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