标题: [文本处理] 求助软件弹窗置顶命令 [打印本页]
作者: cattan 时间: 2021-10-11 10:20 标题: 求助软件弹窗置顶命令
@echo off
rem
echo.
rem
:startjc
rem
rem qprocess %mtcout.exe% >nul
qprocess|findstr /i %mtcout.exe% >nul
rem
if %errorlevel%==0 (echo .
)else (
start %d:/按键.vbs% 2>nul )
rem
for /l %%i in (1,1,300) do ping -n 1 -w 1000 168.20.0.1>nul
goto startjc
echo on
————————————————————————————————————————————————
调用 按键.VBS脚本
————————————————————————————————————————————————
Dim Shell
Set Shell=WScript.CreateObject("WScript.Shell")
Shell.Run "D:\fjeit\Start123\Start123.exe"
WScript.Sleep 5000
Shell.SendKeys "1"
问如何设置 让Start123.exe软件弹窗置顶命令 。。
.bat或者.VBS都可以
作者: went 时间: 2021-10-11 13:33
保存为 按键.bat
并替换 按键.vbs
ansi编码- #&cls&@powershell -c "Get-Content '%~0' | Select-Object -Skip 1 | Out-String | Invoke-Expression" &exit
- cls
- #Windows API
- $code=@"
- using System;
- using System.Runtime.InteropServices;
- public static class GetApi{
- [DllImport("user32.dll")]
- public static extern bool SetWindowPos(int hwnd,int hwndAfter, int x, int y, int cx, int cy, int uFlags);
- }
- "@
- Add-Type -TypeDefinition $code
-
- '执行程序'
- $p = Start-Process 'D:\fjeit\Start123\Start123.exe' -PassThru
-
- '5s后发送按键并置顶'
- Start-Sleep -Seconds 5
- $shell = New-Object -ComObject 'Wscript.Shell'
- $shell.SendKeys('1')
-
- '主窗口置顶'
- [GetApi]::SetWindowPos($p.MainWindowHandle,-1,0,0,0,0,3)
复制代码
作者: cattan 时间: 2021-10-11 15:06
回复 2# went
大哥牛皮
作者: cmd1152 时间: 2021-10-11 21:06
不知道为什么,我感觉Start123.exe是一个弹窗广告.......你让弹窗广告置顶?
(这只是我的猜测,不喜勿喷)
作者: cattan 时间: 2021-10-12 16:04
回复 4# cmd1152
是内部一个软件界面 需要弹窗效果
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |