News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Scripting for RadASM 3

Started by Biterider, May 08, 2011, 06:08:37 AM

Previous topic - Next topic

Biterider

Hi KetilO
As I mentioned sometime ago, I started working on a ScriptHost for RadASM3. So far I got the first shot and I implemented 3 objects with the following methods


RadASM.GetEditor                      returns an editor object of an open MDI child
RadASM.SaveAll                        saves all open files
RadASM.CloseAll                       closes all open files
RadASM.Sleep                          sleeps n milisecs
RadASM.SendMessage                    SendMessage API for test purposes only

Output.hWnd                           Output window handle
Output.Clear                          Clears the window
Output.Write                          Writes to the window
Output.Font                           Sets the output font, doesn't work yet
Output.Foreground                     Sets the forground color, doesn't work
Output.Background                     Sets the background color, doesn't work
Output.SendMessage                    SendMessage API for test purposes only

Editor.hWnd                           Editor window handle
Editor.Clear                          Clears the editor window
Editor.LineCount                      Returns the line count
Editor.Line                           Puts/Gets a line of the editor
Editor.InsertLine                     Inserts a new line
Editor.DeleteLine                     Deletes a line
Editor.Save                           Saves the editor to a file, not implemented
Editor.SaveAs                         Saves the editor to a new file, not implemented
Editor.SendMessage                    SendMessage API for test purposes only


As you can see, I have some unimplemented stuff and other that doesn't work.
Some hits from your part may help pushing this project forward.
In particular, how to setup the output window colors and how to save an editor content to file.

The other 2 problems I found (maybe bugs) are the EM_GETLINECOUNT message sent to the edit window. It returns 1 line less than it should.
The second problem is the EM_LINEINDEX message, that does not return -1 if the index is bigger than the last line.

I'm open to new ideas and I want to discuss if the object structure I'd chosen is really the best.

Currently the scripts have the "vbs" file extension, but I'm considering to change it to "ras"

Attached are the Addin DLL and some demo scripts. If wanted I can supply the sources too.

Regards,

Biterider