× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Wed, 12 May 2010, Scott Klement wrote:

This is Windows code, it doesn't look like the rest of the world :)
For starters, you need to look at the tn5250-res.rc file. In there you
should see something like this (I apologize in advance for the word
wrapping problems inherant in e-mail):

POPUP "&Macro"
BEGIN
MENUITEM "&Record/Stop F1\tCtrl-S F1", IDM_MACRO_RECORD1
MENUITEM "&Record/Stop F2\tCtrl-S F2", IDM_MACRO_RECORD2
MENUITEM "&Record/Stop F3\tCtrl-S F3", IDM_MACRO_RECORD3
MENUITEM "&Record/Stop F4\tCtrl-S F4", IDM_MACRO_RECORD4
MENUITEM "&Execute F1\tCtrl-W F1", IDM_MACRO_EXEC1
MENUITEM "&Execute F2\tCtrl-W F2", IDM_MACRO_EXEC2
MENUITEM "&Execute F3\tCtrl-W F3", IDM_MACRO_EXEC3
MENUITEM "&Execute F4\tCtrl-W F4", IDM_MACRO_EXEC4
END

Ah - ok, that makes sense. However, it leads me to another question that is related to the code that you posted below (and that I had found earlier):

case IDM_MACRO_RECORD1:
case IDM_MACRO_RECORD2:
case IDM_MACRO_RECORD3:
case IDM_MACRO_RECORD4:

[cut stuff]

case IDM_MACRO_EXEC1:
case IDM_MACRO_EXEC2:
case IDM_MACRO_EXEC3:
case IDM_MACRO_EXEC4: {

[more cuts]

I looked at this code and thought it couldn't be the "full" macro code because it appears to only support 4 macros. Is that correct, that win32 only supports up to 4 macros? Granted, lib5250 only supports 24 macros...

The new feature I added to lib5250 allows a name or description to be added to the macro. I was hoping to find in the win32 version something similar. "Record/Stop F2\tCtrl-S Fx" isn't exactly what I had in mind ;) I can never remember what each of my macros do so I added names like "Library list for customer ABC" right after the [MXX] entry in .tn5250macros. Then I changed the Tn5250Macro structure to include an array of pointers to a new Tn5250MacroData structure that holds the macro name and the actual keystrokes. Then I added a macro menu to x5250 that reads this structure to build a list of defined macros with their names. The next step is to make clicking on a name actually execute the macro :)

The eventual goal is to add support for naming the macros in x5250. Right now firing up a text editor to modify .tn5250macros isn't exactly user friendly.

I'm guessing that tn5250-res.rc defines static structures. Since the macro names aren't known until runtime, I'm not sure how I could modify win32 to pick up the macro names.

James Rich

if you want to understand why that is, there are many good books on
the design of operating systems. please pass them along to redmond
when you're done reading them :)
- Paul Davis on ardour-dev

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.