Diff
checker
文本
文本
图像
文档
Excel
文件夹
Legal
Enterprise
桌面版
定价
登录
下载 Diffchecker 桌面版
比较文本
查找两个文本文件之间的差异
工具
历史
实时编辑器
折叠未更改行
关闭换行
视图
拆分
统一
比对精度
智能
单词
字符
语法高亮
选择语法
忽略
文本转换
转到第一个差异
编辑输入
Diffchecker Desktop
运行Diffchecker最安全的方式。获取Diffchecker桌面应用:您的差异永远不会离开您的电脑!
获取桌面版
Untitled Diff
创建于
6年前
差异永不过期
清除
导出
分享
解释
4 删除
行
总计
删除
字符
总计
删除
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
70 行
全部复制
9 添加
行
总计
添加
字符
总计
添加
要继续使用此功能,请升级到
Diff
checker
Pro
查看价格
70 行
全部复制
; Source: Serenity - https://autohotkey.com/board/topic/32608-changing-the-system-cursor/
; Source: Serenity - https://autohotkey.com/board/topic/32608-changing-the-system-cursor/
; Modified: iseahound
; Modified: iseahound
SetSystemCursor(Cursor := "", cx := 0, cy := 0) {
SetSystemCursor(Cursor := "", cx := 0, cy := 0) {
SystemCursors := "32512IDC_ARROW,32513IDC_IBEAM,32514IDC_WAIT,32515IDC_CROSS,32516IDC_UPARROW"
SystemCursors := "32512IDC_ARROW,32513IDC_IBEAM,32514IDC_WAIT,32515IDC_CROSS,32516IDC_UPARROW"
. ",32640IDC_SIZE,32641IDC_ICON,32642IDC_SIZENWSE,32643IDC_SIZENESW,32644IDC_SIZEWE"
. ",32640IDC_SIZE,32641IDC_ICON,32642IDC_SIZENWSE,32643IDC_SIZENESW,32644IDC_SIZEWE"
. ",32645IDC_SIZENS,32646IDC_SIZEALL,32648IDC_NO,32649IDC_HAND,32650IDC_APPSTARTING,32651IDC_HELP"
. ",32645IDC_SIZENS,32646IDC_SIZEALL,32648IDC_NO,32649IDC_HAND,32650IDC_APPSTARTING,32651IDC_HELP"
if (Cursor = "") {
if (Cursor = "") {
VarSetCapacity(AndMask, 128, 0xFF), VarSetCapacity(XorMask, 128, 0)
VarSetCapacity(AndMask, 128, 0xFF), VarSetCapacity(XorMask, 128, 0)
Loop Parse, SystemCursors, % ","
Loop Parse, SystemCursors, % ","
{
{
CursorHandle := DllCall("CreateCursor", "ptr", 0, "int", 0, "int", 0, "int", 32, "int", 32, "ptr", &AndMask, "ptr", &XorMask)
CursorHandle := DllCall("CreateCursor", "ptr", 0, "int", 0, "int", 0, "int", 32, "int", 32, "ptr", &AndMask, "ptr", &XorMask)
复制
已复制
复制
已复制
DllCall("SetSystemCursor", "ptr", CursorHandle, "
int", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor
DllCall("SetSystemCursor", "ptr", CursorHandle, "
u
int", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor
}
}
return
return
}
}
if SubStr(Cursor, 1, 4) = "IDC_" {
if SubStr(Cursor, 1, 4) = "IDC_" {
Loop Parse, SystemCursors, % ","
Loop Parse, SystemCursors, % ","
{
{
CursorName := SubStr(A_LoopField, 6, 15) ; get the cursor name, no trailing space with substr
CursorName := SubStr(A_LoopField, 6, 15) ; get the cursor name, no trailing space with substr
CursorID := SubStr(A_LoopField, 1, 5) ; get the cursor id
CursorID := SubStr(A_LoopField, 1, 5) ; get the cursor id
} until (CursorName = Cursor)
} until (CursorName = Cursor)
复制
已复制
复制
已复制
if !(CursorShared:= DllCall("LoadCursor", "uint", 0, "
int", CursorID))
if !(CursorShared:= DllCall("LoadCursor", "uint", 0, "
u
int", CursorID))
throw Exception("Error: Invalid cursor name")
throw Exception("Error: Invalid cursor name")
Loop Parse, SystemCursors, % ","
Loop Parse, SystemCursors, % ","
{
{
复制
已复制
复制
已复制
CursorHandle := DllCall("CopyImage", "
uint
", CursorShared, "uint", 2, "int", cx, "int", cy, "uint", 0)
CursorHandle := DllCall("CopyImage", "
ptr
", CursorShared, "uint", 2, "int", cx, "int", cy, "uint", 0)
DllCall("SetSystemCursor", "ptr", CursorHandle, "
int", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor
DllCall("SetSystemCursor", "ptr", CursorHandle, "
u
int", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor
}
}
return
return
}
}
if FileExist(Cursor) {
if FileExist(Cursor) {
SplitPath, Cursor,,, Ext ; auto-detect type
SplitPath, Cursor,,, Ext ; auto-detect type
if ((uType := (Ext = "ani" || Ext = "cur") ? 2 : (Ext = "ico") ? 1 : (Ext = "bmp") ? 0 : "") == "")
if ((uType := (Ext = "ani" || Ext = "cur") ? 2 : (Ext = "ico") ? 1 : (Ext = "bmp") ? 0 : "") == "")
throw Exception("Error: Invalid file type")
throw Exception("Error: Invalid file type")
if (Ext = "ani") {
if (Ext = "ani") {
Loop Parse, SystemCursors, % ","
Loop Parse, SystemCursors, % ","
{
{
复制
已复制
复制
已复制
CursorHandle := DllCall("LoadImage", "
uint
", 0, "str", Cursor, "uint", uType, "int", cx, "int", cy, "uint", 0x10)
CursorHandle := DllCall("LoadImage", "
ptr
", 0, "str", Cursor, "uint", uType, "int", cx, "int", cy, "uint", 0x10)
DllCall("SetSystemCursor", "ptr", CursorHandle, "
int", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor
DllCall("SetSystemCursor", "ptr", CursorHandle, "
u
int", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor
}
}
} else {
} else {
复制
已复制
复制
已复制
if !(CursorShared := DllCall("LoadImage", "
uint
", 0, "str", Cursor, "uint", uType, "int", cx, "int", cy, "uint", 0x00008010))
if !(CursorShared := DllCall("LoadImage", "
ptr
", 0, "str", Cursor, "uint", uType, "int", cx, "int", cy, "uint", 0x00008010))
throw Exception("Error: Corrupted file")
throw Exception("Error: Corrupted file")
Loop Parse, SystemCursors, % ","
Loop Parse, SystemCursors, % ","
{
{
复制
已复制
复制
已复制
CursorHandle := DllCall("CopyImage", "
uint
", CursorShared, "uint", 2, "int", 0, "int", 0, "uint", 0)
CursorHandle := DllCall("CopyImage", "
ptr
", CursorShared, "uint", 2, "int", 0, "int", 0, "uint", 0)
DllCall("SetSystemCursor", "ptr", CursorHandle, "
int", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor
DllCall("SetSystemCursor", "ptr", CursorHandle, "
u
int", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor
}
}
}
}
return
return
}
}
throw Exception("Error: Invalid file path or cursor name")
throw Exception("Error: Invalid file path or cursor name")
}
}
RestoreCursor() {
RestoreCursor() {
static SPI_SETCURSORS := 0x57
static SPI_SETCURSORS := 0x57
return DllCall("SystemParametersInfo", "uint", SPI_SETCURSORS, "uint", 0, "uint", 0, "uint", 0)
return DllCall("SystemParametersInfo", "uint", SPI_SETCURSORS, "uint", 0, "uint", 0, "uint", 0)
}
}
已保存差异
原始文本
打开文件
; Source: Serenity - https://autohotkey.com/board/topic/32608-changing-the-system-cursor/ ; Modified: iseahound SetSystemCursor(Cursor := "", cx := 0, cy := 0) { SystemCursors := "32512IDC_ARROW,32513IDC_IBEAM,32514IDC_WAIT,32515IDC_CROSS,32516IDC_UPARROW" . ",32640IDC_SIZE,32641IDC_ICON,32642IDC_SIZENWSE,32643IDC_SIZENESW,32644IDC_SIZEWE" . ",32645IDC_SIZENS,32646IDC_SIZEALL,32648IDC_NO,32649IDC_HAND,32650IDC_APPSTARTING,32651IDC_HELP" if (Cursor = "") { VarSetCapacity(AndMask, 128, 0xFF), VarSetCapacity(XorMask, 128, 0) Loop Parse, SystemCursors, % "," { CursorHandle := DllCall("CreateCursor", "ptr", 0, "int", 0, "int", 0, "int", 32, "int", 32, "ptr", &AndMask, "ptr", &XorMask) DllCall("SetSystemCursor", "ptr", CursorHandle, "int", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor } return } if SubStr(Cursor, 1, 4) = "IDC_" { Loop Parse, SystemCursors, % "," { CursorName := SubStr(A_LoopField, 6, 15) ; get the cursor name, no trailing space with substr CursorID := SubStr(A_LoopField, 1, 5) ; get the cursor id } until (CursorName = Cursor) if !(CursorShared:= DllCall("LoadCursor", "uint", 0, "int", CursorID)) throw Exception("Error: Invalid cursor name") Loop Parse, SystemCursors, % "," { CursorHandle := DllCall("CopyImage", "uint", CursorShared, "uint", 2, "int", cx, "int", cy, "uint", 0) DllCall("SetSystemCursor", "ptr", CursorHandle, "int", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor } return } if FileExist(Cursor) { SplitPath, Cursor,,, Ext ; auto-detect type if ((uType := (Ext = "ani" || Ext = "cur") ? 2 : (Ext = "ico") ? 1 : (Ext = "bmp") ? 0 : "") == "") throw Exception("Error: Invalid file type") if (Ext = "ani") { Loop Parse, SystemCursors, % "," { CursorHandle := DllCall("LoadImage", "uint", 0, "str", Cursor, "uint", uType, "int", cx, "int", cy, "uint", 0x10) DllCall("SetSystemCursor", "ptr", CursorHandle, "int", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor } } else { if !(CursorShared := DllCall("LoadImage", "uint", 0, "str", Cursor, "uint", uType, "int", cx, "int", cy, "uint", 0x00008010)) throw Exception("Error: Corrupted file") Loop Parse, SystemCursors, % "," { CursorHandle := DllCall("CopyImage", "uint", CursorShared, "uint", 2, "int", 0, "int", 0, "uint", 0) DllCall("SetSystemCursor", "ptr", CursorHandle, "int", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor } } return } throw Exception("Error: Invalid file path or cursor name") } RestoreCursor() { static SPI_SETCURSORS := 0x57 return DllCall("SystemParametersInfo", "uint", SPI_SETCURSORS, "uint", 0, "uint", 0, "uint", 0) }
更改后文本
打开文件
; Source: Serenity - https://autohotkey.com/board/topic/32608-changing-the-system-cursor/ ; Modified: iseahound SetSystemCursor(Cursor := "", cx := 0, cy := 0) { SystemCursors := "32512IDC_ARROW,32513IDC_IBEAM,32514IDC_WAIT,32515IDC_CROSS,32516IDC_UPARROW" . ",32640IDC_SIZE,32641IDC_ICON,32642IDC_SIZENWSE,32643IDC_SIZENESW,32644IDC_SIZEWE" . ",32645IDC_SIZENS,32646IDC_SIZEALL,32648IDC_NO,32649IDC_HAND,32650IDC_APPSTARTING,32651IDC_HELP" if (Cursor = "") { VarSetCapacity(AndMask, 128, 0xFF), VarSetCapacity(XorMask, 128, 0) Loop Parse, SystemCursors, % "," { CursorHandle := DllCall("CreateCursor", "ptr", 0, "int", 0, "int", 0, "int", 32, "int", 32, "ptr", &AndMask, "ptr", &XorMask) DllCall("SetSystemCursor", "ptr", CursorHandle, "uint", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor } return } if SubStr(Cursor, 1, 4) = "IDC_" { Loop Parse, SystemCursors, % "," { CursorName := SubStr(A_LoopField, 6, 15) ; get the cursor name, no trailing space with substr CursorID := SubStr(A_LoopField, 1, 5) ; get the cursor id } until (CursorName = Cursor) if !(CursorShared:= DllCall("LoadCursor", "uint", 0, "uint", CursorID)) throw Exception("Error: Invalid cursor name") Loop Parse, SystemCursors, % "," { CursorHandle := DllCall("CopyImage", "ptr", CursorShared, "uint", 2, "int", cx, "int", cy, "uint", 0) DllCall("SetSystemCursor", "ptr", CursorHandle, "uint", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor } return } if FileExist(Cursor) { SplitPath, Cursor,,, Ext ; auto-detect type if ((uType := (Ext = "ani" || Ext = "cur") ? 2 : (Ext = "ico") ? 1 : (Ext = "bmp") ? 0 : "") == "") throw Exception("Error: Invalid file type") if (Ext = "ani") { Loop Parse, SystemCursors, % "," { CursorHandle := DllCall("LoadImage", "ptr", 0, "str", Cursor, "uint", uType, "int", cx, "int", cy, "uint", 0x10) DllCall("SetSystemCursor", "ptr", CursorHandle, "uint", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor } } else { if !(CursorShared := DllCall("LoadImage", "ptr", 0, "str", Cursor, "uint", uType, "int", cx, "int", cy, "uint", 0x00008010)) throw Exception("Error: Corrupted file") Loop Parse, SystemCursors, % "," { CursorHandle := DllCall("CopyImage", "ptr", CursorShared, "uint", 2, "int", 0, "int", 0, "uint", 0) DllCall("SetSystemCursor", "ptr", CursorHandle, "uint", SubStr(A_LoopField, 1, 5)) ; calls DestroyCursor } } return } throw Exception("Error: Invalid file path or cursor name") } RestoreCursor() { static SPI_SETCURSORS := 0x57 return DllCall("SystemParametersInfo", "uint", SPI_SETCURSORS, "uint", 0, "uint", 0, "uint", 0) }
查找差异