× 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.



Vern:

I?m not picturing in my mind exactly what you are asking for but maybe this will help.

It sounds like you want to position your cursor to a column (editor command cursorpos xx), go to the previous word (shift-left arrow) and split the line (Alt-S).

I think that the macro recorder may help. What I?ve bumped into is the macro recorder is only for keystrokes (you can?t record editor commands).

The work-around is to assign commands or macros to keystrokes. I wrote a little macro that helps you do this on the fly:


/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* PGM NAME - map_key.lx */
/* PROGRAM TITLE - Map Keyboard Key to Command or Macro */
/* DATE WRITTEN - 01/30/03 */
/* AUTHOR - John Larimer */
/* NARRATIVE - Prompts for a key combination to map and then the */
/* command to map to. Allows you to launch macros quickly. */
/* */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/* */
/* MODIFIED LOG # PGMR DESCRIPTION */
/* -------- ----- ---- ------------------------------------------------ */
/* 01/30/03 JKL Original Version */
/* 02/07/03 JKL Allow for Commands or Macros */
/* ----------------------------------------------------------------------- */
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */


/* Build First Prompt */
title = "Map Key - Key Combination"
prompt = "Enter Key Combination: (Example A-C-x (Alt-Ctrl-Key))"

'set lineread.title' title
'set lineread.prompt' prompt

/* Display Prompt */
lineread 9 "A-C-x"

'extract lastkey'

/* Check to Confirm Entry */
if lastkey = 'ESC' then
 return

'extract lastline'

if lastline = "" then
 return

KeyCombo = lastline

/* Build Second Prompt */

title = "Map Key - Command Name"
prompt = "Enter Command"

'set lineread.title' title
'set lineread.prompt' prompt

/* Display Prompt */
lineread 100 "Enter Command Here"

'extract lastkey'

/* Check to Confirm Entry */
if lastkey = 'ESC' then
 return

'extract lastline'

if lastline = "" then
 return

Command = lastline

/* Build Command */

'set ACTION.' || KeyCombo Command

exit

/* end of macro */


To play back macros quickly, I?ve mapped a key to the command LP_RECPLAY. Be sure to review the editor help in the IDE for a list of the LP_xx commands.


Hope you find it useful.

John





From: Vern Hamberg <vhamberg@xxxxxxxxxxxxxxxxxxxxxxxxx>
Reply-To: CODE/400 Discussion & Support <code400-l@xxxxxxxxxxxx>
To: code400-l@xxxxxxxxxxxx
Subject: Reformat macro?
Date: Fri, 20 Jun 2003 11:42:46 -0500

Y'all

Is there a macro or built-in function that will reformat source lines? I need it for editing UIM help. I want to avoid a lot of manual steps using ALT-S and ALT-J and keeping track of record length.

It'd need to break the selected lines at word breaks.

I can do this easily in TextPad. Probably other editors can, too.

TIA

Vern


_______________________________________________ This is the CODE/400 Discussion & Support (CODE400-L) mailing list To post a message email: CODE400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/code400-l or email: CODE400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/code400-l.

NOTE: WDSc for iSeries disucssion has it's own mailing list.
Information can be found at http://lists.midrange.com/cgi-bin/listinfo/wdsc-l



_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.