当前位置: 首页 > news >正文

[ahk]如何载入Scite的会话Session文件

加载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 scite\win32\DirectorExtension.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 '\0'. The dwData should be 0.

Before messages can be sent from one application to the other, the window handle of the window to receive the message must be found. This is normally transferred when starting the other application as a command line parameter. Either application may start the other. SciTE makes its window handle available in the WindowID property and accepts a director.hwnd property as the window handle to which it sends data.

As an example of communicating the window handle, to install Filerx in the Tools menu of SciTE these properties could be used:

command.name.0.*=Project Editor

command.0.*="C:\os\scite\bin\filerx.exe" "$(FileDir)" "$(WindowID)"

command.subsystem.0.*=2

In the opposite direction, Filerx can start up SciTE with a command line that specifies its window handle as well as the file it wants edited:

SciTE -director.hwnd=937846 c:\os\scite\src\SciTEBase.cxx

Once one application has the window handle of the other application, it should send its window handle to the other application using an identity message as described later. Then both sides are able to send messages.

To broadcast a message on Windows, the set of active director interfaces can be found by broadcasting the "SciTEDirectorInterface" message and seeing which windows reply with the same value as that message. Example broadcast code:

unsigned int SDI = ::RegisterWindowMessage("SciTEDirectorInterface");

HWND w = ::GetWindow(::GetDesktopWindow(),GW_CHILD);

while (w) {

DWORD res = 0;

// Need time out to avoid hung applications

::SendMessageTimeout(w, SDI, 0, 0,

SMTO_NORMAL, 1000, &res);

if (res == static_cast<DWORD>(SDI)) {

// Replied with same SDI code so should

// understand SDI's version of WM_COPYDATA

::SendMessage(w,WM_COPYDATA,

(UINT)m_hWnd,(long)&cds);

}

w = ::GetWindow(w, GW_HWNDNEXT);

}

To advertise that a top level window supports the Director interface:

LRESULT PASCAL DirectorExtension_WndProc(HWND hWnd,

UINT iMessage, WPARAM wParam, LPARAM lParam) {

unsigned int SDI = ::RegisterWindowMessage("SciTEDirectorInterface");

if (iMessage == SDI) {

return SDI;

}

return ::DefWindowProc(hWnd, iMessage, wParam,lParam);

}

Low level interface on GTK.

An input fifo for each application supporting the director interface located in the temporary directory (obtained through GLib g_get_tmp_dir() call), with a name using a pattern such as "/tmp/SciTE.<PID>.in". This allows enumerating all active director interfaces and also opening a specific interface when the fifo name has been communicated through some other means such as a command line argument or an identity: command.

High level interface.

Messages use C style escapes to represent control characters and ensure that only visible characters are transmitted apart from the use of '\n' to separate messages.

The string transmitted by the low level interface contains an optional return address surrounded by ':' characters, an action, a ':' character and an optional argument. The argument is often a file path. The ':' must be present even if there is no argument. For example, SciTE understands the message

open:c:\\os\\scintilla\\include\\Scintilla.iface

as a command to open the file "c:\os\scintilla\include\Scintilla.iface" just as if the user had performed this operation.

If the first character of the message is a ':' then up to the next ':' is a return address, so SciTE will reply to the message

:73658:askfilename:

by sending the filename being edited to the return address 73658 rather than to its director.

The actions understood by SciTE are:

askfilename:

Return the name of the file being edited.

askproperty:<key>

Return the value of a property.

close:

Close the current file.

closing:

Director is closing - SciTE closes if it was started by the director.

currentmacro:<string>

Set the current macro to name.

cwd:

Change the working directory.

enumproperties:dyn|local|user|base|embed

Enumerate all the properties in the argument set.

exportashtml:<path>

Save the document in HTML format as the indicated file.

exportasrtf:<path>

Save the document in RTF format as the indicated file.

exportaspdf:<path>

Save the document in PDF format as the indicated file.

exportaslatex:<path>

Save the document in LaTeX format as the indicated file.

exportasxml:<path>

Save the document in XML format as the indicated file.

extender:<command>

Call the extension interface with the given command.

find:<string>

Search for a string, select and show it.

focus:<timeStamp>

On GTK bring this SciTE window to the front. The timeStamp is from the window manager and ensures that windows are only activated because of a user command. Has no effect on Windows as applications on Windows can only donate focus, not take focus.

goto:<lineNumber>[,<columnNumber>]

Move caret to a particular line and make it visible.

If there is a column number then select the word at that column number or move the caret there if no word is present.

identity:<hwndDirector>

Sets the director window handle to which SciTE sends messages. The argument is in decimal.

insert:<value>

Display the value in the editor pane replacing the selection.

loadsession:<path>

Load a session as given by the indicated file.

macrocommand:<command>

Execute a macro command. See the SciTE source code for the syntax of the command argument.

macroenable:<enable>

If enable, display menu commands in SciTE for recording and playing macros.

macrolist:<list>

Display a list for the user to choose from.

menucommand:<cmd>

Execute a menu command based on numeric ID.

open:<path>

Open the indicated file.

output:<value>

Display the value in the output pane replacing the selection.

property:<key>=<value>

Set a property to a value.

quit:

Shut down SciTE.

reloadproperties:

Reload properties from files.

replaceall:<search>\000<replace>

Replace all instances of the search string in the document with the replace string.

saveas:<path>

Save the document as the indicated file.

savesession:<path>

Save a session as given by the indicated file.

setdefaultcwd:

Change the working directory to somewhere reasonable and safe.

The actions sent by SciTE are:

closed:<path>

SciTE has closed the indicated file.

closing:

SciTE is closing.

dyn|local|user|base|embed:<key>=<value>

Set a property in a set to a value.

filename:<path>

The file being edited is path. This is the reply to the askfilename: command.

identity:<hwndSciTEReceiving>

SciTE indicates to the director the window handle to which it should send messages. The argument is in decimal.

macro:getlist

Retrieve the list of available macros which will be returned by the macrolist command.

macro:record:<details>

Start recording a macro. See the SciTE source code for the syntax of the details argument.

macro:run:<macroName>

Run the named macro.

macro:stoprecord

Stop recording a macro.

opened:<path>

SciTE has opened the indicated file.

switched:<path>

SciTE has switched buffers to the indicated file.

saved:<path>

SciTE has saved the indicated file.

In the future, more actions will be defined. Applications should ignore any actions that they do not understand.

相关文章:

[ahk]如何载入Scite的会话Session文件

加载session文件的AutoHotkey代码&#xff1a;oSciTE : ComObjActive("SciTE4AHK.Application") messageloadsession:d:\\ddd\\2023-2-15SciTE.session oSciTE.SendDirectorMsg(message)存储session文件的AutoHotkey代码&#xff1a;messagesavesession:d:\\ddd\\123…...

MyISAM和InnoDb的区别

MySQL 5.0以后的版本默认的存储引擎为InnoDb&#xff0c;之前是MyISAM。 现在说说两者的区别&#xff1a; 1.数据存储结构的不同 MyISAM存储文件&#xff1a;.MYD(存储表数据)&#xff0c;.MYI(存储表结构)&#xff0c;.FRM(存储表结构) InnoDb存储文件: .FRM(存储表结构)&am…...

K8s管理应用生命周期-Deployment篇

在k8s中部署应用程序流程 1、使用Deployment部署Java应用 kubectl create deployment web --imageXXX/java-demokubectl get deployment,pods 2、使用Service发布Pod kubectl expose deployment web --port80 --typeNodePort --target-port8080 --namewebkubectl get servic…...

类和对象(下)(二)

类和对象&#xff08;下&#xff09;&#xff08;二&#xff09;1.友元1.1友元函数1.2友元类2.内部类3.拷贝对象时的一些编译器优化&#xff08;vs2022&#xff09;&#x1f31f;&#x1f31f;hello&#xff0c;各位读者大大们你们好呀&#x1f31f;&#x1f31f; &#x1f680…...

MapBox-draw绘制插件的使用教程(含修改样式和方法封装)

mapbox-draw插件是官方推荐的用于支持在mapbox地图中绘制图形的插件库。好像并不是由官方编写的,但是官方觉得其好用就直接推荐大家也使用了,我用了2天感觉下来还是觉得很鸡肋。对于开发者来讲自由修改的程度不是很高。这篇文章简单说一下对于mapbox-draw的使用和修改。 第一…...

使用 ONLYOFFICE 转换 API 构建在线文档转换器

文档转换是非常常用、非常有价值的功能&#xff0c;可以帮助我们处理多种文档类型。ONLYOFFICE 编辑器可以轻松地将文档转换为多种格式。在这篇博文中&#xff0c;我们会向您展示&#xff0c;如何构建在 ONLYOFFICE 转换 API 上运行的在线转换器。 关于 ONLYOFFICE 转换 API 使…...

Kubernetes的负载均衡方案:MetalLB

私有云裸金属架构(这是相对云上环境来说,不是说无操作系统)上部署的 Kubernetes 集群,通常是无法使用 LoadBalancer 类型的 Service 的。因为 Kubernetes 本身没有为裸机群集提供网络负载均衡器的实现。 如果你的 Kubernetes 集群没有在公有云的 IaaS 平台(GCP,AWS,Azu…...

【项目】Vue3+TS CMS 基本搭建相关配置

&#x1f4ad;&#x1f4ad; ✨&#xff1a;Vue3 TS   &#x1f49f;&#xff1a;东非不开森的主页   &#x1f49c;: today beginning&#x1f49c;&#x1f49c;   &#x1f338;: 如有错误或不足之处&#xff0c;希望可以指正&#xff0c;非常感谢&#x1f609;   基本…...

ros2 dds

问题1: fastdds发布的类型&#xff0c;ros2接收不到 原因: 在QoS相互兼容情况下&#xff0c;无法通信是由于idl类型没有使用兼容ros2的格式。如用 ros2 topic list -t 查看时&#xff0c;会发现同一个topic有两个不同的类型&#xff0c;如DDS会显示&#xff1a;myclass::peo…...

chain33架构介绍

chain33架构介绍 Chain33构架主要分为五个层级&#xff1a;数据层、网络层、共识层、激励层及应用层。 应用层&#xff1a;兼容以太坊智能合约&#xff0c;支持发行代币、资产交易、钱包找回&#xff0c;hash锁定等原生能力&#xff0c;同时支持用户可扩展执行器&#xff08;…...

Lucene学习笔记

lucene结构 索引&#xff1a;概念上的一个表&#xff0c;现实体现就是一个文件目录&#xff0c;一个目录代表一个索引&#xff0c;也视作documents文档集合 文档&#xff1a;document&#xff0c;为索引中的一条数据&#xff0c;一个document可以拥有多个filed&#xff08;域&a…...

动态规划【Day01】| 669 · 换硬币、114 · 不同的路径、116 · 跳跃游戏

秘诀&#xff1a;确定状态转移方程初始条件和边界情况计算顺序 669 换硬币 669 换硬币 题目描述&#xff1a; 给出不同面额的硬币以及一个总金额. 写一个方法来计算给出的总金额可以换取的最少的硬币数量. 如果已有硬币的任意组合均无法与总金额面额相等, 那么返回 -1。 样…...

1.Hello Python

Python ​ Python 在网络爬虫、数据分析、AI、机器学习、Web开发、金融、运维、测试等多个领域都有不俗的表现&#xff0c;从来没有哪一种语言可以同时在这么多领域扎根。 Python基本语法 python关键字 ​ 关键字即保留字&#xff0c;和其他语言一样&#xff0c;这些关键字…...

C语言实例|编写C程序在控制台打印余弦曲线

C语言文章更新目录 C语言学习资源汇总&#xff0c;史上最全面总结&#xff0c;没有之一 C/C学习资源&#xff08;百度云盘链接&#xff09; 计算机二级资料&#xff08;过级专用&#xff09; C语言学习路线&#xff08;从入门到实战&#xff09; 编写C语言程序的7个步骤和编程…...

《Hadoop篇》------大数据及Hadoop入门

目录 一、大数据及Hadoop入门 1.1 单节点、分布式、集群 1.1.1 大数据的概念 1.1.2 大数据的本质 二、HDFS Shell命令 2.1、常用相关命令 2.2、上传文件 2.2.1、上传文件介绍 2.2.2上传文件操作 2.3、下载文件 2.4、删除文件 2.5、创建目录 2.6、查看文件系统 2.…...

TCP核心机制详解(三)

目录 前言&#xff1a; 滑动窗口 滑动窗口处理丢包问题 流量控制 拥塞控制 延时应答 捎带应答 面向字节流 异常情况 小结&#xff1a; 前言&#xff1a; 前两篇文章讲述了&#xff0c;TCP十种核心机制的前三种。这篇文章详细介绍其他的一些核心机制&#xff0c;让我们…...

最易上手的爬虫请求库:Requests核心功能速览(下)

上一个章节我们讲了如何快速使用Requests发送网络请求、处理URL参数和提取响应内容,这些是最基本的操作。 然而还有很多场景下,我们的网络请求更加复杂。比如我们必须要定制请求头来假装成浏览器,不然可能会被网站识别为机器并且被屏蔽;又比如我们需要在发送请求时以表单形…...

生产故障|Kafka ISR频繁伸缩引发性能急剧下降

生产故障&#xff5c;Kafka ISR频繁伸缩引发性能急剧下降-阿里云开发者社区 本文是笔者双十一系列第二弹&#xff0c;源于一个双十一期间一个让笔者猝不及防的生产故障&#xff0c;本文将详细剖析Kafka的副本机制&#xff0c;以及ISR频繁变更(扩张与伸缩)为什么会导致集群不可…...

c++终极螺旋丸:₍˄·͈༝·͈˄*₎◞ ̑̑“类与对象的结束“是结束也是开始

文章目录 前言一.构造函数中的初始化列表 拷贝对象时的一些编译器优化二.static成员三.友元四.内部类总结前言 前两期我们将类和对象的重点讲的差不多了&#xff0c;这一篇文章主要进行收尾工作将类和对象其他的知识点拉出来梳理一遍&#xff0c;并且补充前两篇没有讲过的…...

【Python--torch.nn.functional】F.normalize用法 + 代码说明

【Python–torch.nn.functional】F.normalize介绍 代码说明 文章目录【Python--torch.nn.functional】F.normalize介绍 代码说明1. 介绍2. 代码说明2.1 一维Tensor2.2 二维Tensor2.3 三维Tensor3. 总结1. 介绍 import torch.nn.functional as F F.normalize(input: Tensor, …...

Python爬虫实战:研究MechanicalSoup库相关技术

一、MechanicalSoup 库概述 1.1 库简介 MechanicalSoup 是一个 Python 库,专为自动化交互网站而设计。它结合了 requests 的 HTTP 请求能力和 BeautifulSoup 的 HTML 解析能力,提供了直观的 API,让我们可以像人类用户一样浏览网页、填写表单和提交请求。 1.2 主要功能特点…...

令牌桶 滑动窗口->限流 分布式信号量->限并发的原理 lua脚本分析介绍

文章目录 前言限流限制并发的实际理解限流令牌桶代码实现结果分析令牌桶lua的模拟实现原理总结&#xff1a; 滑动窗口代码实现结果分析lua脚本原理解析 限并发分布式信号量代码实现结果分析lua脚本实现原理 双注解去实现限流 并发结果分析&#xff1a; 实际业务去理解体会统一注…...

3-11单元格区域边界定位(End属性)学习笔记

返回一个Range 对象&#xff0c;只读。该对象代表包含源区域的区域上端下端左端右端的最后一个单元格。等同于按键 End 向上键(End(xlUp))、End向下键(End(xlDown))、End向左键(End(xlToLeft)End向右键(End(xlToRight)) 注意&#xff1a;它移动的位置必须是相连的有内容的单元格…...

Python ROS2【机器人中间件框架】 简介

销量过万TEEIS德国护膝夏天用薄款 优惠券冠生园 百花蜂蜜428g 挤压瓶纯蜂蜜巨奇严选 鞋子除臭剂360ml 多芬身体磨砂膏280g健70%-75%酒精消毒棉片湿巾1418cm 80片/袋3袋大包清洁食品用消毒 优惠券AIMORNY52朵红玫瑰永生香皂花同城配送非鲜花七夕情人节生日礼物送女友 热卖妙洁棉…...

【p2p、分布式,区块链笔记 MESH】Bluetooth蓝牙通信 BLE Mesh协议的拓扑结构 定向转发机制

目录 节点的功能承载层&#xff08;GATT/Adv&#xff09;局限性&#xff1a; 拓扑关系定向转发机制定向转发意义 CG 节点的功能 节点的功能由节点支持的特性和功能决定。所有节点都能够发送和接收网格消息。节点还可以选择支持一个或多个附加功能&#xff0c;如 Configuration …...

热烈祝贺埃文科技正式加入可信数据空间发展联盟

2025年4月29日&#xff0c;在福州举办的第八届数字中国建设峰会“可信数据空间分论坛”上&#xff0c;可信数据空间发展联盟正式宣告成立。国家数据局党组书记、局长刘烈宏出席并致辞&#xff0c;强调该联盟是推进全国一体化数据市场建设的关键抓手。 郑州埃文科技有限公司&am…...

Vue3中的computer和watch

computed的写法 在页面中 <div>{{ calcNumber }}</div>script中 写法1 常用 import { computed, ref } from vue; let price ref(100);const priceAdd () > { //函数方法 price 1price.value ; }//计算属性 let calcNumber computed(() > {return ${p…...

k8s从入门到放弃之Pod的容器探针检测

k8s从入门到放弃之Pod的容器探针检测 在Kubernetes&#xff08;简称K8s&#xff09;中&#xff0c;容器探测是指kubelet对容器执行定期诊断的过程&#xff0c;以确保容器中的应用程序处于预期的状态。这些探测是保障应用健康和高可用性的重要机制。Kubernetes提供了两种种类型…...

Ray框架:分布式AI训练与调参实践

Ray框架&#xff1a;分布式AI训练与调参实践 系统化学习人工智能网站&#xff08;收藏&#xff09;&#xff1a;https://www.captainbed.cn/flu 文章目录 Ray框架&#xff1a;分布式AI训练与调参实践摘要引言框架架构解析1. 核心组件设计2. 关键技术实现2.1 动态资源调度2.2 …...

华为云Flexus+DeepSeek征文 | 基于Dify构建具备联网搜索能力的知识库问答助手

华为云FlexusDeepSeek征文 | 基于Dify构建具备联网搜索能力的知识库问答助手 一、构建知识库问答助手引言二、构建知识库问答助手环境2.1 基于FlexusX实例的Dify平台2.2 基于MaaS的模型API商用服务 三、构建知识库问答助手实战3.1 配置Dify环境3.2 创建知识库问答助手3.3 使用知…...