返回列表 发帖
确实可以用bat替代这个软件,系统自带的命令行power
#@&cls&powershell "type '%~0'|out-string|iex"&pause&exit
$list=@(
'C:\01_项目AA2'
'C:\01_项目AA2'
'C:\01_项目AA2'
)
Add-Type -AssemblyName System.Windows.Forms
Add-Type @'
using System;
using System.Runtime.InteropServices;
public class HK
{
    [DllImport("user32.dll")]
    public static extern bool RegisterHotKey(IntPtr hWnd, int id, uint fsModifiers, uint vk);
    [DllImport("user32.dll")]
    public static extern bool GetMessage(ref MSG lpMsg, IntPtr hWnd, uint wMsgFilterMin, uint wMsgFilterMax);
    [StructLayout(LayoutKind.Sequential)]
    public struct MSG
    {
public IntPtr hwnd;
public uint message;
public IntPtr wParam;
public IntPtr lParam;
public uint time;
public int x;
public int y;
    }
}
'@
$define = for($i=0x70; $i -le 0x79; $i++){
[void][HK]::RegisterHotKey(0, $i, 0x4000, $i)
"{0}{{scb '{1}'; {2}; break}}" -f $i, $list[$i-0x70], '[System.Windows.Forms.SendKeys]::SendWait("^v")'
}
$define='switch($msg.wParam){'+($define|out-string)+'}'
$msg = @{}
while([HK]::GetMessage([ref]$msg, 0, 0, 0) -ne 0){if($msg.message -eq 0x0312){iex $define}}COPY
1

评分人数

TOP

回复 38# jack2020


    第4行这里按格式修改可以多加几行,保存为bat运行,和这个软件一样按f1-10

TOP

返回列表