macro - can open file but not close?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
wjb
Posts: 11
Joined: Fri Apr 28, 2006 3:01 pm
Contact:

macro - can open file but not close?

Post by wjb »

I need a macro to :
1. open every file listed in dirList.txt (ctrl-shift-g)
2. copy the second line of the opened file (arrow down; shift-end; copy)
3. close the newly opened file ????
4. paste the buffer to the end of the dirList.txt line. (window select, end, paste)
5. go to start of next line (arrow down , home)

repeat

I can do everything but close a file. Is this possible?

Thanks,
Bill
User avatar
MudGuard
Posts: 1295
Joined: Sun Mar 02, 2003 10:15 pm
Location: Munich, Germany
Contact:

Post by MudGuard »

Ctrl-W in my textpad closes the current file (can't remember whether that shortcut was configured by me or whether it came configured by Textpad ...)

Also, while recording a macro, it is possible to use the menus, so you do not even need to know the keyboard shortcuts.

Some commands can't be used in macros, maybe "close file" is among them. If this is the case (check the help files for that) try to switch to previous file using Ctrl-Tab so you can at least get on with the rest of the macro ...
wjb
Posts: 11
Joined: Fri Apr 28, 2006 3:01 pm
Contact:

Post by wjb »

I assigning close file to my ctrl-W and tried the macro, but no luck.

I did not see anywhere in help that a "file close" cannot be recorded, except that greyed out commands are not recordable.

I find it odd that I can open a file from a macro, but cannot close one.
(both file menu options are greyed out during a macro, but ctrl-shift-W will open the file in my current doc where my cursor is located)

For now, I can run the macro and just leave the files open. Then close all when done. Don't know if there is a limit on number of open files.

Thanks,
Bill
Post Reply