; -------------------------- Run as Administrator --------------------------
full_command_line := DllCall("GetCommandLine", "str")
If not (A_IsAdmin or RegExMatch(full_command_line, " /restart(?!\S)"))
{
Try
{
If A_IsCompiled
Run *RunAs "%A_ScriptFullPath%" /restart
Else
Run *RunAs "%A_AhkPath%" /restart "%A_ScriptFullPath%"
}
ExitApp
}
; -------------------------- Run as Administrator --------------------------
#NoEnv ;optional
SetWorkingDir %A_ScriptDir% ;optional
SendMode Input ;optional
#SingleInstance Force ;optional
SetTitleMatchMode 2 ;optional
;DetectHiddenWindows, On ;optional
#WinActivateForce ;optional
SetControlDelay -1 ;optional
SetWinDelay -1 ;optional
SetKeyDelay -1 ;optional
SetMouseDelay -1 ;optional
SetBatchLines -1
#UseHook ;optional
#Persistent ;optional
;#NoTrayIcon ;optional
Process , Priority, , High ;optional
;=========================================================
#Include, ImagePut.ahk
;=========================================================
;imagepath:="D:\桌面\答题.png" ;optional
;=========================================================
Suspend On
;FileSelectFile, imagepath ;optional
Suspend, Off
;imagetitle:="答题" ;optional
;=========================================================
zoom:=1
Return
WheelDown::
zoom-=0.1
WinClose, ahk_id %windowsid%
windowsid:= ImagePut("window",{image: imagepath,crop: [0, "0%", "100%", "100%"],scale: zoom},imagetitle) ;crop字段为optional
ToolTip, % "缩放率:" Round(zoom,1) "`n小键盘*:冻结窗口"
Return
Wheelup::
zoom+=0.1
WinClose, ahk_id %windowsid%
windowsid:= ImagePut("window",{image: imagepath,crop: [0, "0%", "100%", "100%"],scale: zoom},imagetitle) ;crop字段为optional
ToolTip, % "缩放率:" Round(zoom,1) "`n小键盘*:冻结窗口"
Return
NumpadMult::
ToolTip
Suspend On
Pause
Return
F8::ExitApp
不解释一下这是干什么用的么?