Hi Ed,
Arguments: zeus "C:\Documents and Settings\ED\Desktop\TEXT NOTES TEMP\x.vbs"
I can see how that will work
e.g. Knowing vbscript fairly well, I still can't even figure out how to use the "fileopen function" that you say is scriptable in vbs.
Here is an example in vbs:
Code: Select all
Function key_macro()
'set the starting directory
directory = "d:\temp"
'build a file filter string
cpp_files = "C/C++ files (*.cpp;*.c;*.hpp;*.h)|*.cpp;*.c;*.hpp;*.h|"
res_files = "RC files (*.rc;*.rh;*.dlg)|*.rc;*.rh;*.dlg|"
txt_files = "Text Files (*.txt)|*.txt|"
'the two argmument version of the file open dialog
file_name = zeus.file_select_dialog( directory, cpp_files & res_files & txt_files )
if Len(file_name) > 0 then
zeus.file_open(file_name)
end if
End Function
key_macro() 'run the macro
five that referred to Keyboard functions
When writing macros I always suggest letting Zeus do all the hard work
For example, assuming you have configured
VbScript to be the default scripting language, as a starting point all I would do is the following:
- Macros menu, Record Start/Stop
- File Menu, New
- Type in "This is a test macro...."
- Macros menu, Record Start/Stop
- Macros menu, View Source
What this does is create the following macro script:
Code: Select all
Function key_macro()
call zeus.screen_update_disable
call zeus.FileNew
call zeus.write("This is a test macro....")
call zeus.screen_update_enable
call zeus.screen_update
End Function
key_macro() 'run the macro
In this example Zeus has written a macro with several calls to built-in functions (i.e screen_update, screen_update_enable, write etc) and the one call to the FileNew keyboard function.
Naturally, if you use a different set of menu and/or key strokes combinations Zeus will write you a differnet macro
I would be glad to submit examples in vbs, if I could get smart enough to write test code and prove the snippets work!
The thing to remember is the built-in functions are all in lower case and are described in the built-in function section of the online help.
The camel case functions are the Zeus keyboard functions and these are listed in the
Options, Editor Options menu,
Keyboard Mapping panel, select a mapping to edit, hit the
Edit button.
Where available, you can also view the help for a keyboard function by placing the cursor on the keyboard function text and using the
Help, Quick Help Current Word menu.
If I could understand the methods of the Zeus object better
The Zeus scripting layer is different to other VbScript application interfaces in that it really does not have an object. There are just built-in functions and keyboard functions and that is it
The
zeus. qualifier is just needed by VbScript to let it know that you are calling one of the Zeus functions.
Cheers Jussi