概述
加载session文件的AutoHotkey代码:
oSciTE := ComObjActive("SciTE4AHK.Application")
message=loadsession:d:\ddd\2023-2-15SciTE.session
oSciTE.SendDirectorMsg(message)
存储session文件的AutoHotkey代码:
message=savesession:d:\ddd\123.session
oSciTE.SendDirectorMsg(message)
具体SendDirectorMsg接口参考下面文章的表格
SciTE Director Interface |
Purpose.
Software development does not occur only at the single file level handled by SciTE. A developer will generally work on a group of related files together in the context of one project. Project manager functionality could be added to SciTE as it has to other editors but this would impose a particular view of how projects are to be managed including the format of project files. Instead, SciTE has an interface that can be used by project managers or similar applications to control SciTE. Any application that controls SciTE is referred to as a "Director".
The current Director interface only works on Windows and GTK/Linux. In the future, it should be possible to replace the low level interface and so make this interface available on other platforms.
There is currently one director application, Filerx, available.
This interface is implemented on top of the SciTE Extension Interface, in the file scitewin32DirectorExtension.cxx.
Direct connection, broadcasting and explicit return addresses.
One application at a time is the director of SciTE, controlling SciTE as it wishes. To support other communications techniques applications may broadcast to all active director interfaces. When doing so, each message should contain an explicit return address where replies to the broadcast message will be sent.
Low level interface on Windows.
The Windows WM_COPYDATA message is used to transfer data between SciTE and a Director. The messages are sent between windows created by the two applications. SciTE uses a window that has no other purpose than to receive these messages. The lpData and cbData fields of the COPYDATASTRUCT are used to transfer a string between the two processes, with cbData holding the length of the string pointed to by lpData. The string does not have to be terminated with '