A few quick questions
A few quick questions
First, I'd like to say that the Zeus editor seems really great. The thing that mainly atracts me to it is the fact that I can use Ruby as a macro language, which is something I've been wanting for some time. Unfortunately there's a few behavioral issues that although small, could discourage me from using it.
The main one is that if I have the cursor at EOL and I use the down arrow to move it to the next line, if the next line is shorter the cursor doesn't snap to EOL but stays in the same position. This could really hamper my general workflow, I can use the End key, but that's not as fast as just hitting down arrow and typing. Also, ctrl+leftArrow will hop there which is a little better but still....
Another one is that ctrl+backspace won't keep going once it's deleted everything on the current line. Is there an option to turn on that will make it jump up to the next line and keep on going? The behavior would be the same as ctrl+leftArror only deleting.
Thanks,
.dan
The main one is that if I have the cursor at EOL and I use the down arrow to move it to the next line, if the next line is shorter the cursor doesn't snap to EOL but stays in the same position. This could really hamper my general workflow, I can use the End key, but that's not as fast as just hitting down arrow and typing. Also, ctrl+leftArrow will hop there which is a little better but still....
Another one is that ctrl+backspace won't keep going once it's deleted everything on the current line. Is there an option to turn on that will make it jump up to the next line and keep on going? The behavior would be the same as ctrl+leftArror only deleting.
Thanks,
.dan
To fix this just bind the following Lua macro to the down arrow:The main one is that if I have the cursor at EOL and I use the down arrow to move it to the next line, if the next line is shorter the cursor doesn't snap to EOL but stays in the same position.
Code: Select all
function key_macro()
screen_update_disable()
-- move down the line
MoveLineDown()
-- get the length of the current line
local length = string.len(get_line_text())
-- get the current cursor position
local cursor = get_cursor_pos()
-- see if the cursor needs to move
if (cursor > length) then
-- move to the end of the line
MoveLineEnd()
end
end
key_macro() -- run the macro
replace MoveLineDown with MoveLineUp then you will have the up arrow version of the macro.
I will leave the task of converting this Lua macro into a Ruby macro as an exercise

A macro something like this should do the trick:Another one is that ctrl+backspace won't keep going once it's deleted everything on the current line.
Code: Select all
function key_macro()
screen_update_disable()
-- get the current cursor position
local cursor = get_cursor_pos()
if (cursor == 1) then
-- move to the end of the previous line
MoveLineUpAndLast()
end
-- delete the previous word
WordDeletePrevious()
end
key_macro() -- run the macro
Thanks, I was thinking of writing a macro for that, but I was worried about execution speed. ie. does Zeus start up the interpreter each time the macro is run, or does it keep it running in the background.
Thanks for the quick response, with such great support I think I'll probably buy this software.
Thanks for the quick response, with such great support I think I'll probably buy this software.
Thanks, I was thinking of writing a macro for that, but I was worried about execution speed.
The modern day computer is so fast and these scripts so small, you will not even notice the key is bound to a macro

Zeus creates the new interpreter each time. Also the interpreter must re-compile the script each time it is executed. For a single macro I find the execution time is not noticable, but you will notice the slower scripting speed if you need to run the macro a repeated number of timesie. does Zeus start up the interpreter each time the macro is run, or does it keep it running in the background.

Even so, the repeated macro speed is still many times faster than what I can type

To get a feel for what I mean you can test this for yourself by creating a simple macro as follows:
- Macros, Record Start/Stop menu
- File, New menu
- Type in "This is my first macro....."
- Hit the enter key
- Macros, Record Start/Stop
It is my pleasureThanks for the quick response

I appreciate the gesturewith such great support I think I'll probably buy this software.

Cheers Jussi
Thanks again. Seriously though, I am really starting to like this software. (And I've only been using it for a day). Anything that's customizable through scripting, especially with Ruby really draws me to it.
I had to make some modifications to those macros you posted, for some reason the command to disable screen updating was causing the cursor to not go to the proper position. I just know that I removed that line and the cursor then behaved as I wanted.
Also, the ctrl+backspace functionality I ended up liking was
And that's what strikes me as so cool with this program, there are so many commands for everything you do in it. I had no idea it was that customizable.
There is currently only one thing bothering me and it's that when I select some text I can't drag it. Clicking the mouse to drag it just de-selects. Is this an option I haven't found yet or is that just the way it is?
I had to make some modifications to those macros you posted, for some reason the command to disable screen updating was causing the cursor to not go to the proper position. I just know that I removed that line and the cursor then behaved as I wanted.
Also, the ctrl+backspace functionality I ended up liking was
Code: Select all
function key_macro()
-- get the current cursor position
local cursor = get_cursor_pos()
if (cursor <= 1) then
-- move to the end of previous line
BackspaceEx()
else
MoveWordPrevious()
WordDeleteNext()
end
end
key_macro() -- run the macro
There is currently only one thing bothering me and it's that when I select some text I can't drag it. Clicking the mouse to drag it just de-selects. Is this an option I haven't found yet or is that just the way it is?
for some reason the command to disable screen updating was causing the cursor to not go to the proper position.
That is my mistake

As the name suggest the screen_update_disable disables all screen updates. What is missing from the original macro are the following lines of code:
Code: Select all
-- restore screen updates
screen_update_enable()
-- force a screen update
screen_update()
Code: Select all
Also, the ctrl+backspace functionality I ended up liking was

You have now found something that Zeus does not do wellThere is currently only one thing bothering me and it's that when I select some text I can't drag it. Clicking the mouse to drag it just de-selects. Is this an option I haven't found yet or is that just the way it is?

You may have already notice that Zeus is a keyboard centric editor. This fact even shows on the menus and dialog boxes, which are all accelerator key enabled (ie you can use the Alt + the underscore character to move the focus in dialogs etc).
The reason for this is simple. Zeus was originally modelled on the MS-DOS Brief editor and back to those days the mouse did not even exist

Thus Zeus has grown up without a lot of the mouse editing features found in todays editors and unfortunately trying to convert this keyboard driven editor engine into a mouse driven editor engine is not always an easy task

Cheers Jussi
Ok, now I have a new thing.
I'm still not quite happy with the ctrl-backspace functionality, so I decided to switch to Ruby so I can do some actual scripting rather than just calling Zeus functions, because I think I need to do some text-processing of my own to really get what I want.
Well, when I try to run the macro I get this error:
Error creating 'RubyScript' scripting module.
Reason: Invalid class string
Just to be sure I tried running your example.rbs macro, and I still get the error. I've set the active scripting module to ruby, is there something else I need to do?
Thanks.
I'm still not quite happy with the ctrl-backspace functionality, so I decided to switch to Ruby so I can do some actual scripting rather than just calling Zeus functions, because I think I need to do some text-processing of my own to really get what I want.
Well, when I try to run the macro I get this error:
Error creating 'RubyScript' scripting module.
Reason: Invalid class string
Just to be sure I tried running your example.rbs macro, and I still get the error. I've set the active scripting module to ruby, is there something else I need to do?
Thanks.
This macro scripting error:
means the RubyScript is not installed.
The Ruby Script used in Zeus is not the stock standard Ruby. Zeus uses the Ruby Script Windows Scripting Host (WSH) version. This is the scripting engine that Internet Explorer would use if you embedded Ruby Script into a web page.
I found out about the Ruby Script WSH implementation from this link: In theory Zeus can handle any of the scripting languages listed on this page, but the Ruby Script was the only one tested.
I did a search for the Ruby Script WSH and it looks like it can be found here: After you install the Ruby Script things should start to work fine: )
For example I created this simple Zeus Ruby macro:
which will runs fine and generates the following debug output:
Cheers Jussi
Code: Select all
Error creating 'RubyScript' scripting module.
Reason: Invalid class string
The Ruby Script used in Zeus is not the stock standard Ruby. Zeus uses the Ruby Script Windows Scripting Host (WSH) version. This is the scripting engine that Internet Explorer would use if you embedded Ruby Script into a web page.
I found out about the Ruby Script WSH implementation from this link: In theory Zeus can handle any of the scripting languages listed on this page, but the Ruby Script was the only one tested.
I did a search for the Ruby Script WSH and it looks like it can be found here: After you install the Ruby Script things should start to work fine: )
For example I created this simple Zeus Ruby macro:
Code: Select all
def key_macro()
@zeus.screen_update_disable();
@zeus.FileNew();
@zeus.screen_update_enable();
@zeus.screen_update();
end
key_macro() # run the macro
Code: Select all
--------------------------------------------------------------------
Zeus for Windows Programmers Editor - Version 3.94
Copyright (c) Xidicone Pty Ltd 1993-2005. All rights reserved.
--------------------------------------------------------------------
**** NOTE: DEBUG OUTPUT ENABLED ****
This and other debug output text is being displayed because the Zeus
debug output option is currently enabled. To disable this debug output
just select the Options, Editor Options menu and in the General Options
section un-check the 'Help debug, tools, macros and executables' option.
About to execute 'c:\temp\test.rbs' macro file
Debug: Initialising macro interface
Debug: The Zeus object was requested and returned.
Debug: GetIDsOfNames call succeeded.
Debug: screen_update_disable
Debug: GetTypeInfo call succeeded.
Debug: GetIDsOfNames call succeeded.
Debug: FileNew
Debug: GetTypeInfo call succeeded.
Debug: GetIDsOfNames call succeeded.
Debug: screen_update_enable
Debug: GetTypeInfo call succeeded.
Debug: GetIDsOfNames call succeeded.
Debug: screen_update
Debug: GetTypeInfo call succeeded.
Debug: Script object destroyed.
Debug: Destroying macro interface
Macro produced '17' Warning(s), Error(s) and/or Debug(s) messages.
cool, I'm going to try to install that version tomorrow when someone can log in as admin on my computer (I'm at work so I can't) I'll try it on my home computer and see how it works out.
I've been using Zeus quite a bit and am really liking it. Once I can script it I think things will just get better.
I've been using Zeus quite a bit and am really liking it. Once I can script it I think things will just get better.