Board logo

标题: [系统相关] 用bat制作一个右下角弹窗会自动关闭 [打印本页]

作者: 1049918599    时间: 2023-1-17 17:14     标题: 用bat制作一个右下角弹窗会自动关闭

在遇到指定命令的时候,比如打开某个软件,或者开机自启动,右下角蹦出一个自定义的弹窗,但不需要鼠标去点击,自己会关闭
作者: 谐夜落风    时间: 2023-1-17 17:50

本帖最后由 谐夜落风 于 2023-1-17 17:51 编辑

我想法是调用vbs(Visual Basic Sprint应该有这功能吧),但是我也未曾涉猎,只能看下面有没有高手懂了
纯用batch肯定不行,毕竟批处理是基于命令提示符的,除了start没法越过cmd的边界……
作者: 1049918599    时间: 2023-1-18 02:23

回复 2# 谐夜落风


    感谢,等等大佬看看
作者: holley    时间: 2023-1-18 11:04

回复 2# 谐夜落风
这种??
  1. nsw= createobject("htmlfile").parentWindow.screen.availWidth
  2. nsh= createobject("htmlfile").parentWindow.screen.availHeight
  3. Set WshShell = CreateObject("WScript.Shell")
  4. Dim OIE
  5. Set OIE = CreateObject("InternetExplorer.Application")
  6. With OIE
  7. .left=nsw-300
  8. .top=nsh
  9. .height=200
  10. .width=300
  11. .menubar=0
  12. .toolbar=0
  13. .statusBar=0
  14. .navigate "About:Blank"
  15. .visible=1
  16. End With
  17. 'wait a while until IE as finished to load
  18. Do while OIE.busy
  19. loop
  20. With OIE.document
  21. .Open
  22. .WriteLn "<HTML><HEAD>"
  23. .WriteLn "<TITLE>批处理之家</TITLE></HEAD>"
  24. .WriteLn "<BODY>"
  25. .WriteLn "<b>批处理之家 </b>"
  26. .WriteLn "<h1> <font color=red> 右下角弹窗! </h1>"
  27. .WriteLn "</BODY>"
  28. .WriteLn "</HTML>"
  29. .Close
  30. End With
  31. do while oie.top>nsh-oie.Height
  32. oie.top=oie.top-2
  33. Loop
  34. wscript.sleep 5000
  35. WshShell.run "taskkill /f /im iexplore.exe",vbhide
  36. Set WshShell = Nothing
复制代码

作者: 1049918599    时间: 2023-1-18 11:24

回复 4# holley


    大佬牛啊!不是这种,这个上传不了图片好麻烦
作者: 1049918599    时间: 2023-1-18 11:25


作者: Batcher    时间: 2023-1-18 11:47

回复 5# 1049918599


如果需要上传文件,可以用阿里云盘或百度网盘。

如果需要上传截图,可以找个图床,例如:
http://bbs.bathome.net/thread-60985-1-1.html
作者: 1049918599    时间: 2023-1-18 13:09

回复 4# holley


    [img][/img]
作者: 1049918599    时间: 2023-1-18 13:09

回复 7# Batcher


感谢,已经上传
作者: 1049918599    时间: 2023-1-18 13:09

回复 8# 1049918599


    这种样式的最好了




欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2