Page 1 of 1

Macro exec w F8 repeat /enter rep count aborts unexpectedly

Posted: Wed Jul 02, 2008 10:53 am
by armarshall
When running a very simple macro over say 100 or so lines of a source file, to do a very simple reformatting and data entry, I have repeatedly made these fail when I press F8 too many times repeatedly, or if I enter a playback count #. Zeus halts and all is lost. These are macros recorded from the session ad hoc. An example might be:
function key_macro()
screen_update_disable()
MoveLineRightEx()
MoveLineRightEx()
MarkCopyEx()
MoveLineRightEx()
MoveDocumentEndEx()
print("ROADWAY.")
MarkPasteEx()
print("%TYPE,")
MoveLineHome()
MoveLineDown()
screen_update_enable()
screen_update()
end

key_macro() -- run the macro


This guy types a table name in front of a column name in some SQL code for example. Looks benign to me...

Posted: Thu Jul 03, 2008 12:12 am
by jussij
Which version of Zeus are you running :?:

When I run your macro I get ever increasing lines of code:

Code: Select all

ROADWAY.
ROADWAY.ROADWAY.%TYPE,
ROADWAY.ROADWAY.%TYPE,ROADWAY.%TYPE,
ROADWAY.ROADWAY.%TYPE,ROADWAY.%TYPE,ROADWAY.%TYPE,
ROADWAY.ROADWAY.%TYPE,ROADWAY.%TYPE,ROADWAY.%TYPE,ROADWAY.%TYPE,
ROADWAY.ROADWAY.%TYPE,ROADWAY.%TYPE,ROADWAY.%TYPE,ROADWAY.%TYPE,ROADWAY.%TYPE,
................................................................................
Is that what it is meant todo :?:

I can imagine that if this macro is run repeatedly the line length would end up being extremely long and that might cause some problems :?

Cheers Jussi

It is supposed to fix line by line

Posted: Thu Jul 03, 2008 9:31 am
by armarshall
The macro, when it runs, fixes a line, goes to column 1, and moves down to the next line that has to be fixed, and ends. It does not do what you experienced. Yours is never moving down through the text file to fix data lines. Perhaps you didn't start from a file of data lines.

I am running Zeus 3.96h

Posted: Thu Jul 03, 2008 11:26 pm
by jussij
I am running Zeus 3.96h
The first thing you need to do is patch your current install so you are running the latest version of Zeus.

You can get the patch file from here: http://www.zeusedit.com/forum/viewforum.php?f=6

Cheers Jussi