Skip to content

Commit

Permalink
Merge pull request #29 from ruchuby/develop
Browse files Browse the repository at this point in the history
Starter v0.5.0
  • Loading branch information
AkiChase authored Apr 13, 2023
2 parents a5e62b5 + fb89ca9 commit 13baf11
Show file tree
Hide file tree
Showing 33 changed files with 5,405 additions and 142 deletions.
5 changes: 5 additions & 0 deletions docs/.vuepress/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ export const zhSidebar = sidebar({
icon: "list-ul",
link: "/guide/plugin/",
},
{
text: "设置界面",
icon: "gear",
link: "/guide/setting/",
},
{
text: "自启界面",
icon: "desktop",
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/get-started/install-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ date: 2023-04-09

运行 **Starter** 后,右键右下角托盘图标打开菜单,点击**插件界面**

![启动模式编辑界面](../../images/plugin2.jpg)
![启动模式编辑界面](../../images/plugin-2.jpg)

在插件列表中双击任意一行,即可启用或禁用该插件。在修改完所需的插件状态后,点击**保存重载**按钮,软件会重启且只会载入所有已启用的插件。

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ date: 2023-04-11

运行 **Starter** 后,右键右下角托盘图标打开菜单,点击**插件界面**

![插件界面](../../images/plugin2.jpg)
![插件界面](../../images/plugin-2.jpg)

- **双击**列表项可以启用/禁用插件
- 点击**保存重载**,可以保存当前启用/禁用状态,然后重启软件以加载启用的插件
Expand Down
65 changes: 65 additions & 0 deletions docs/guide/setting/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
title: 设置界面
icon: gear
author: ruchuby
date: 2023-04-13
---

运行 **Starter** 后,右键右下角托盘图标打开菜单,点击**设置界面**

## 常规

![设置界面](../../images/setting-1.jpg)

目前,常规设置仅有**开机自启**开关。

## 控制

![设置界面](../../images/setting-2.jpg)

快捷键设置,点击**修改**按钮可以修改对应的功能快捷键。

显示每个快捷键的**具体内容**,若按键**无效**也会有对应显示。

### 1. 按键类型 - 普通

普通按键类型仅仅支持 `Ctrl`, `Alt`, `Shift` 作为修饰的组合按键,或者单独按键。

可勾选**是否屏蔽原按键功能**,勾选后快捷键原功能将被屏蔽。

点击按键内容**热键输入框**,按下指定按键即可显示输入的按键内容,点击**确定**进行保存。

### 2. 按键类型 - 自定义

**自定义**按键类型可以**自由填写**热键内容,包括鼠标按键等,

参考[热键 - 定义 & 使用 | AutoHotkey v2](https://www.autoahk.com/help/autohotkey/v2/docs/Hotkeys.htm#toc)

:::warning
热键内容的填写需要有一定AHK经验,否则建议使用其他类型
:::

### 3. 按键类型 - 双击

**双击**按键类型必须填写**单个**按键名,

参考[按键列表(键盘, 鼠标和操纵杆) | AutoHotkey v2](https://www.autoahk.com/help/autohotkey/v2/docs/KeyList.htm)

可勾选**是否屏蔽原按键功能**,勾选后快捷键原功能将被屏蔽。

:::tip
双击要求第一次键击**按住**时间小于500ms,且第一次键击**松开**到第二次键击**按下**的时间间隔小于500ms
:::

### 4. 按键类型 - 长按

**双击**按键类型必须填写**单个**按键名,

参考[按键列表(键盘, 鼠标和操纵杆) | AutoHotkey v2](https://www.autoahk.com/help/autohotkey/v2/docs/KeyList.htm)

可勾选**是否屏蔽原按键功能**,勾选后快捷键原功能将被屏蔽。

:::tip
长按要求第一次键击**按住**时间超过500ms
:::

Binary file added docs/images/setting-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/setting-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions docs/plugin/file-selection-dialog-nav.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: 文件选择对话框导航
author: ruchuby
date: 2023-04-12
---

## 介绍

文件对话框中路径导航功能,模仿Listary的 `Ctrl+G` 功能

让文件对话框导航到**资源管理器**中正在浏览的文件夹。

![文件选择对话框导航:主界面](./images/file-selection-dialog-nav-1.jpg)

## 使用方式

当你正处于某个文件选择对话框时,长按 `CapsLK`,呼出智能模式搜索框

在搜索结果中可以看到**文件选择对话框路径导航**,启动此**插件智能项**即可进入插件界面

插件界面的列表中会列举所有正在运行的**资源管理器**中正在浏览的文件夹,**输入内容到搜索框可以对其进行筛选**

筛选依据为:输入的内容是否为列表项**标题**或者**将标题内中文转拼音首字母后的标题**的一部分

最后,启动某列表项即可完成导航到指定路径。

![文件选择对话框导航:导航提示](./images/file-selection-dialog-nav-2.jpg)

::: warning
长按前,请不要选中任何文件或者文本,否则插件智能项不会出现在列表中(因为无法进入窗口匹配)
:::
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/plugin/images/ocr-1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/plugin/images/ocr-2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions docs/plugin/ocr.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
title: OCR识别文字
author: ruchuby
date: 2023-04-13
---

## 介绍

调用百度OCR在线识别文字,需要自行申请API密钥

![文件搜索:主界面](./images/ocr-1.jpg)


## 配置

请先申请百度OCR,方法自行上网搜索。

右键 **Starter** 右下角托盘图标 > **Starter菜单** > **插件功能** > **OCR识别文字** > **设置**

设置界面分别填入申请到的 `id``secret` ,点击**保存**

## 使用

- ### 方式一

使用任意截图工具截取图片到**剪切板**,呼出**搜索框**,粘贴,转到**智能模式搜索框**

![文件搜索:搜索框](./images/ocr-2.jpg)

启动对应**插件智能项**进入识别界面,并识别图片

- ### 方式二

启动模式搜索框中关键词为`["OCR识别文字", "OCRSBWZ"]`

启动对应**插件启动项**进入识别界面

- ### 方式三

右键 **Starter** 右下角托盘图标 > **Starter菜单** > **插件功能** > **OCR识别文字** > **显示**,进入识别界面

## 识别界面

左侧为正在识别的图片,**不用在意显示的图片变形,仅仅是控件显示问题**

右侧为识别结果

:::tip
**直接粘贴图片**就可以进行图片识别

**点击左侧图片**位置可以通过文件选择进行图片识别
:::

::: warning
修改识别结果**连接方式**或者**自动复制**选项时,打开**设置界面**并点击保存,

**下次启动时才会使用保存的选择**
:::
1 change: 0 additions & 1 deletion docs/plugin/timed-reminder.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
title: 定时提醒
author: ruchuby
date: 2023-04-11
order: 3
---

## 介绍
Expand Down
4 changes: 1 addition & 3 deletions docs/plugin/web-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ order: 1

## 配置

右键 **Starter** 右下角托盘图标 >

**Starter菜单** > **插件功能** > **网页搜索** > **设置**
右键 **Starter** 右下角托盘图标 > **Starter菜单** > **插件功能** > **网页搜索** > **设置**

**谷歌搜索**国内需要使用代理,通过本地socket代理的方式连通网络。

Expand Down
4 changes: 2 additions & 2 deletions src/Gui/AboutGui.ah2
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* @Version: 0.0.3
* @Author: ruchuby
* @LastEditors: ruchuby
* @LastEditTime: 2023-04-11
* @LastEditTime: 2023-04-13
* @Description: 关于界面显示版本信息、项目主页、检查更新
*/
class AboutGui {
static version := "0.4.1"
static version := "0.5.0"
; static gui:=unset

static init() {
Expand Down
6 changes: 2 additions & 4 deletions src/Gui/IntelligentEditGui.ah2
Original file line number Diff line number Diff line change
Expand Up @@ -566,11 +566,10 @@ class IntelligentEditGui {

; 显示智能模式编辑界面,并编辑某项
static showGui(editPos := unset) {
Critical('On') ;防止线程被中断
for c in [SearchGui, StartupEditGui]
if (WinExist(c.gui))
c.hideGui()
Hotkey("~CapsLock", "Off") ; 关闭热键,防止数据冲突
Suspend(1) ; 关闭热键,防止数据冲突

; 重新加载树状图
this.reloadTV()
Expand All @@ -584,12 +583,11 @@ class IntelligentEditGui {
this.itemEdit(editPos[1], editPos[2])

this.gui.Show()
Critical('Off')
}

; 隐藏编辑界面
static hideGui() {
Hotkey("~CapsLock", "On") ; 恢复热键
Suspend(0) ; 恢复热键
if (this.changeFlag) {
if (MsgBox("是否将当前项修改内容保存?", "提示", 0x2044) = "Yes")
this.saveCurItem()
Expand Down
13 changes: 11 additions & 2 deletions src/Gui/PluginGui.ah2
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Version: 0.0.1
* @Author: ruchuby
* @LastEditors: ruchuby
* @LastEditTime: 2023-04-03
* @LastEditTime: 2023-04-13
* @Description: 插件界面
*/

Expand Down Expand Up @@ -35,8 +35,17 @@ class PluginGui {

static loadPlugins() {
fList := []
pluginList := []
for name in GlobalData.config["plugin"] {
fList.Push(GlobalData.pluginDir "\" name)
path := GlobalData.pluginDir "\" name
if (FileExist(path)) ; 仅添加有效的文件
fList.Push(GlobalData.pluginDir "\" name), pluginList.Push(name)
}

; 如果插件列表出现变动
if (pluginList.Length != GlobalData.config["plugin"].Length) {
GlobalData.config["plugin"] := pluginList
GlobalData.storeConfig()
}
Loader.loadFromFiles(fList)
}
Expand Down
8 changes: 5 additions & 3 deletions src/Gui/SearchGui/IntelligentMode.ah2
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,13 @@ class IntelligentMode {
; 插件搜索并添加插件项到列表
static pluginSearchAndAdd() {
this.pluginSearchResult := []
; 有文件、位图时或者有搜索内容时才进行匹配
if (SearchGui._pastedContentType != "text" || SearchGui.searchText) {
; 有文件、位图时或者工作窗口或者有搜索内容时才进行匹配
if (SearchGui._pastedContentType != "text" || SearchGui.winInfoMatchFlag || SearchGui.searchText) {
; 匹配所有符合项
for item in this.pluginData {
if (priority := item.matchHandler(SearchGui.searchText, SearchGui._pastedContentType, SearchGui.pastedContent)) {
if (priority := item.matchHandler(SearchGui.searchText,
SearchGui._pastedContentType, SearchGui.pastedContent,
SearchGui.workWinInfo, SearchGui.winInfoMatchFlag)) {
item.priority := priority
this.pluginSearchResult.Push(item)
}
Expand Down
Loading

0 comments on commit 13baf11

Please sign in to comment.