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 doesnt 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.

Im open to new ideas and I want to discuss if the object structure Id chosen is really the best.

Currently the scripts have the vbs file extension, but Im considering to change it to ras

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



Posted on 2011-05-01 07:20:37 by Biterider
New upload. I've corrected some bugs and added a new script demo.

Posted on 2011-05-07 01:54:27 by Biterider