The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: who_am_i on May 19, 2008, 03:00:58 AM

Title: Qeditor command-line arguments?
Post by: who_am_i on May 19, 2008, 03:00:58 AM
Hello, everyone!

Qeditor is really an excellent plain text editor. But I do not know how to invoke Qeditor to open a file and goto a specified line number. Could anyone tell me how to do this?

And does anybody know how to invoke QEditor to run a qsc script automatically?

And is it possible to customize hotkeys in QEditor?

Thanks for your possible answers:-)
Title: Re: Qeditor command-line arguments?
Post by: hutch-- on May 19, 2008, 03:48:44 AM
QE supports opening a specific file name only, there is no mechanism for it to either autorun a script or to go to a line number. The hotkeys are hard coded in the main message loop for size and overlap reasons. It is possible to code a user select hotkey system but it is likely to end up bigger than QE which contains its own script engine.

Both are interesting ideas but are not without their problems. I was tempted when I wrote the script engine to have it run a script off the command line as it would allow QE to call other scripts like subroutines but there is no simple way to pass data betwen scripts, it would have to be done with a memory mapped file which then has the next problem that its size cannot be changed once created.
Title: Re: Qeditor command-line arguments?
Post by: who_am_i on May 19, 2008, 04:53:13 AM
Thanks for your explanation, hutch!

Now I understood that there are no hidden features like command-line options:-) So do you plan to add such features in the future? I'd like to configure QEditor as my primary programming environment because of its powerful scripting engine and tools menu.

To avoid making QEditor much bigger, I suggest a simple method to add such features without rewriting the command-line parsing codes. QEditor can assume an autoload script (e.g. _init_.qsc) and load it if such file is found in current directory. This approach may add only a few lines of codes (check whether init script exists and then call existing procedure for script running). With this method, it is still possible to automate many tasks including goto line by writing simple DOS batch commands to invoke QEditor.

Another possible method is to send some message or key sequence to the QEditor window and let it goto a specified line. I do not know whether this approach is applicable to QEditor since I do not know whether QEditor is based on standard RichEdit control. Without modifying QEditor, this may be the only way to automate QEditor.

Hutch, what is your opinion on these issues? I am very eager to make QEditor more powerful yet preserve its thin size:-)
Title: Re: Qeditor command-line arguments?
Post by: hutch-- on May 23, 2008, 04:24:02 AM
I have just added the capacity to QE to run a script from the command line.

http://www.masm32.com/board/index.php?topic=9253.0