Releases: bestK/taskpin
Releases · bestK/taskpin
Release list
v1.6.8
Full Changelog: v0.0.1...v1.6.8
v1.6.5
v1.6.4
Changelog
New Features
-
JSONPath-style
$.pathtemplate support:field_exprnow supports mixing Lua functions with$.pathJSON path references. Before Lua execution, the system safely substitutes each$.pathexpression based on its runtime type: numbers and booleans are inlined as literals, strings are automatically quoted and escaped, and missing paths resolve tonil.Example:
return "Balance: " .. string.format("%.2f", $.data.wallets[0].balance)If $.data.wallets[0].balance resolves to the number 100.5, the substituted code becomes:
return "Balance: " .. string.format("%.2f", 100.5)Bug Fixes
- Fix
field_exprpath extraction: non-path characters (),:, etc.) now correctly terminate$.pathreferences - Fix Lua 5.4 return value handling: function calls used as statements no longer discard return values in
script_execwrapper
Full Changelog: v1.6.3...v1.6.4
v1.6.3
v1.6.3
Bug Fixes
- 修复 Dialog Shift+拖拽后窗口回跳到初始位置的问题
- 修复多个 Dialog 同时打开时 Shift 操作导致闪烁的问题
- 修复 Dialog 刷新时位置被重置的问题
Improvements
- Dialog 拖拽改为增量模式(delta-based),不再依赖 window.screenX 缓存
- 每个 Dialog 独立管理 webview 拖拽覆盖层状态,互不干扰
- 无 webview 的 borderless Dialog(如 hud_clock)支持 Shift+拖拽 + 提示覆盖层
- clickthrough Dialog 按住 Shift 时可拖动(临时取消穿透)
- Shift+hover 时鼠标指针统一为手型
- 新增
sys.get_self_conf()/sys.set_self_conf()API,脚本可读写自身配置项 - 消除 Dialog 内容刷新时的闪烁
Documentation
- 更新 LUA_API.md / LUA_API_EN.md:新增 dialog 控制函数、animation 模块、sys.set_bar_text/lua 文档
Full Changelog: v1.6.2...v1.6.3
v1.6.1
New Features
- sys.set_bar_text() / sys.set_bar_lua(): WebView can now update bar display with plain text or rich Lua expressions
- WebView lua_path binding: Each WebView knows its owner script, bridge callbacks target the correct bar
- Dialog size persistence: All dialogs save position AND size on close, restore on next open
- K-Line Demo:
kline_demo.lua— BTC/USDT candlestick chart via WebView2 + lightweight-charts, real-time WebSocket updates
Improvements
- WebView creation deferred via PostMessage to prevent stack overflow from recursive WM_PAINT
webview_creatingguard prevents duplicate creation attempts- Stack size increased to 8MB as safety margin for WebView2 initialization
set_bar_luauses directreturn exprinstead of function wrapper (fixes syntax error with..operator)__bar_luaglobal persists last bar expression across script re-execution- Dialog position/size saved for all dialogs (removed borderless-only restriction)
Bug Fixes
- Fix WebView2 stack overflow crash (0xC00000FD) when opening webview dialogs
- Fix
set_bar_luaincorrectly wrapping expressions infunction()...end() - Fix webview bridge callbacks affecting wrong bar (global lua_path race condition)
Full Changelog: v1.6.0...v1.6.1
v1.6.0
New Features
- Dialog Control API:
open_dialog()/close_dialog()/dialog_is_open()— Lua scripts can now programmatically control dialog windows - Animation Module (
animation.*): built-in animation effects for dialog elementsblink,fade_in,fade_out,scale,pulse,fly,color,ping_pong,loop,progress- Easing functions:
ease_in,ease_out,ease_in_out,bounce,lerp
- Dialog Render Callback:
dialog({render = function() ... end})— content only computed when dialog is open, zero overhead during bar refresh - Animation Demo:
examples/animation_demo.luashowcasing all effects
Improvements
__dialog_openglobal auto-injected before script executiondialog()strips content when dialog is not open (skip C-side parsing)script_exec_file_try()non-blocking variant prevents dialog refresh from freezing UIDIALOG_MAX_ITEMSincreased from 8 to 16- Script errors now logged via
logger_write(previously silent) [script error]on bar now logs the script path for debuggingsystem_monitor.luarefactored to use render mode
Bug Fixes
- Fix stack overflow crash when clicking jsonpath in edit dialog (
ScriptResult7.4MB on stack → heap) - Fix dialog path matching (
show_script_dialognow resolves to absolute path) - Fix
script_exec_filereturning FALSE for scripts with empty display but valid dialog
Full Changelog: v1.5.5...v1.6.0
v1.5.5
What's New
全局热键 + 选中内容获取
@hotkey Ctrl+Shift+T声明注册系统级热键- 热键触发时自动获取当前选中内容(文本/文件/图片)
- 通过
selection全局变量注入脚本,支持划词翻译、批量处理等场景 - 热键冲突时 bar 提示,支持通过 HOTKEY 参数用户自定义
管理员权限支持
@admin <描述>声明脚本需要管理员权限- 启动时弹窗提示提权,显示脚本描述
- 取消后 bar 显示权限提示,点击可重新发起
sys.is_admin()/sys.elevate()运行时 API
精确进程网速统计
sys.net_processes()管理员模式下使用 TCP Extended Stats- 读取每条连接的 DataBytesIn/Out,精确到纯网络流量
- 非管理员自动回退到 IO Counters(兼容旧行为)
Bar Tooltip
- 鼠标悬停 bar 显示 tooltip,默认为脚本名
- 第 4 个返回值自定义 tooltip 文本,支持动态更新
其他
- Bar 首次加载显示 "loading..." 状态
MODE=dev/release构建模式,开发时不下载覆盖 lang 文件- CI 使用
MODE=release构建
完整文档: LUA_API.md
Full Changelog: v1.5.4...v1.5.5
v1.5.4
What's New
WebSocket 支持
- 新增
websocket.connect(url, options)Lua API - 独立接收线程 + 非阻塞消息队列,配合
@realtime实现低延迟推送 - 支持
ws://和wss://协议 - 默认自动重连(指数退避 1s~30s),可关闭
- 连接生命周期绑定 bar,移除时自动关闭
Dialog 布局增强
- table 支持
col_widths自定义列宽(固定 + 自动填充) - table 支持
height自定义行高 - table 支持
wrap单元格文本自动换行 - button 支持
width/height/align布局控制
其他改进
- Bar 首次加载时显示 "loading..." 状态
- http 响应体大小上限从 256KB 提升到 2MB
- GitHub Trending 示例插件
Lua API 示例
-- WebSocket
local ws = websocket.connect("wss://example.com/stream", {
reconnect = true,
headers = "Authorization: Bearer xxx"
})
ws:send("hello")
local msg = ws:recv() -- non-blocking
ws:close()
-- Table with custom layout
{ type = "table",
columns = { "Name", "Status", "Detail" },
col_widths = { 80, 60, 0 },
height = 24, wrap = true,
rows = { ... } }
-- Button with size and alignment
{ type = "button", value = "Submit",
width = 200, height = 36, align = "center",
color = "#FFF", bg_color = "#336699" }完整文档: LUA_API.md
Full Changelog: v1.5.3...v1.5.4
v1.5.3
v1.5.2
What's New in v1.5.2
WebView2 Improvements
- Remote HTML URLs auto-cached locally (5min TTL, %APPDATA%/TaskPin/webview_cache/)
- Fix: text/plain response from GitHub raw handled correctly
- Fix: JS bridge (window.taskpin) available on page load
- System resources display in demo (CPU, Memory, Network via JS bridge)
- China users: auto gh-proxy for remote HTML URLs
JS ↔ Lua Bridge
let cpu = await taskpin.sys.cpu();
let mem = await taskpin.sys.memory();
let net = await taskpin.sys.net_speed();
await taskpin.sys.notify("Title", "Content");Auto-Download WebView2Loader.dll
- Detect system architecture (x64/x86)
- Try multiple sources with gh-proxy fallback
- i18n error messages with manual download URL on failure