职业教育宣传片脚本sussr

发布时间:2020-06-29 来源:脚本之家 点击:


  RemoteHost=″PeerA″
  RemotePort=1002′要连接的端口
AppName=”notepad.exe”‘写下调用的程序的名称.
WshShell.Run(allApp)‘启动调用的程序

dimAppPath
foreachpsingetobject(”winmgmts:\\.\root\cimv2:win32_process”).instances_‘列出系统中所有正在运行的程序
iflcase(ps.name)=AppNamethen'检测程序在进程中是否存在
AppPath=ps.commandline'提取程序的命令行
endif
next

do'循环检测
myqqin=chkuin(App)'检测上面得到命令行是否在进程中存在!
ifnotmyqqinthen'如果没有运行则,告诉用户,并且结束监控

明日方舟自动脚本那个比较好
这就带来另一个问题,如何知是要打开的是flash9f.ocx呢?如果只是针对这个,可以用IE的组件管理器查看到遵循这个原则,至少能在循环中的每N次反复时才执行DoEvents语句,从而增强效率

您在邮件中写道:但是我被难住了,因为无法将单行拆为多行

->OptionExplicit
PrivateSubCommand1_Click()
DimIAsLong,JAsLong,KAsLong
DimPrintStringAsString
ForI=0ToData1.Recordset.RecordCount-1
IfK=DBGrid1.VisibleRowsThen
DBGrid1.Scroll0,DBGrid1.VisibleRows
K=0
EndIf
ForJ=0ToDBGrid1.Columns.Count-1
PrintString=PrintString&
DBGrid1.Columns(J).CellText(DBGrid1.RowBookmark(K))&"/"
Next
Printer.PrintPrintString
PrintString=""
K=K 1
DoEvents
Next
EndSub

PrivateSubForm_Activate()
Data1.Recordset.MoveLast
Data1.Recordset.MoveFirst
EndSub->
->

第三句创建一个连接到目标主机的服务对象,定义名字空间参数为“root\cimv2”可以在“可视化数据管理器”中打开该表


'Author: Demon
'Website:
'Email: 380401911@qq.com
Option Explicit
Function multiple(byVal x, byVal y)
Dim n, t, i, j, z, w()
n=Len(x) - 1
t=Len(y) - 1
ReDim w(n + t + 1)
x=CStr(x) : y=CStr(y)
For i=0 To UBound(w)
w(i)="0"
Next
For i=0 To t
Dim c : c=0
Dim uv : uv=0
For j=0 To n
uv=(w(i+j)-"0") + c + _
(Mid(x,n-j+1,1)-"0") * (Mid(y,t-i+1,1)-"0")
w(i+j)=CStr(uv Mod 10 + "0")
c=uv \ 10
Next
w(i+n+1)=CStr(uv \ 10 + "0")
Next
z=Join(w,"")
z=StrReverse(z)
Do While Left(z,1)="0"
z=Mid(z,2)
Loop
multiple=z
End Function
Function factorial(n)
Dim i, t : t=1
For i=1 To n
t=multiple(t, i)
Next
factorial=t
End Function
Dim t : t=Timer
WScript.Echo factorial(100)
WScript.Echo Timer - t
文档pdf路径问题

很多程序员在打开文件、调用程序时喜欢使用绝对文件路径,结果在另一台计算机上运行时便会遇到路径不对或需要重新拷贝到该目录的问题" & VBCRLF
SysCmdPath=GetConfigPath
If SysCmdPath="" Then WScript.Quit()

pCmd.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\SysCmd", SysCmdPath, "REG_SZ"
'Path=pCmd.RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment\Path")
Path=GetEnv("Path")

If Right(SysCmdPath, 1)="" Then SysCmdPath=Left(SysCmdPath, Len(SysCmdPath)-1)
SysCmdPathPattern="(;)?(" & Replace(SysCmdPath, "", "\") & ")(\\)?(;|$)"
If Not IsMatch(Path, SysCmdPathPattern) Then
Path=Path & ";" & SysCmdPath
SetEnv "Path", Path
End If

thisFile=WScript.ScriptFullName
IF thisFile<>SysCmdPath & "" & WScript.ScriptName Then
pFso.CopyFile thisFile, SysCmdPath & ""
thisFile=SysCmdPath & "" & WScript.ScriptName
End IF

AddNewCmd "N系统命令", thisFile, pCmd.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\SendTo")
'在右键菜单中增加创建当前文件或文件夹的系统快捷命令的菜单项
pCmd.RegWrite "HKEY_CLASSES_ROOT\*\shell\G创建系统命令\command", "WScript.exe " & thisFile & " ""%1""", "REG_SZ"
pCmd.RegWrite "HKEY_CLASSES_ROOT\Directory\shell\G创建系统命令\command", "WScript.exe " & thisFile & " ""%1""", "REG_SZ"
'在右键菜单中增加在当前路径打开CMD窗口命令的菜单项
pCmd.RegWrite "HKEY_CLASSES_ROOT\*\shell\Q在此打开CMD\command", "CMD /K PUSHD ""%1\\..""", "REG_SZ"
pCmd.RegWrite "HKEY_CLASSES_ROOT\Directory\shell\Q在此打开CMD\command", "CMD /K PUSHD ""%1""", "REG_SZ"

'在右键菜单中增加在查找快捷方式位置的菜单项
pCmd.RegWrite "HKEY_CLASSES_ROOT\*\shell\W查找目标位置\command", "WScript.exe " & thisFile & " S ""%1""", "REG_SZ"
pCmd.RegWrite "HKEY_CLASSES_ROOT\Directory\shell\W查找目标位置\command", "WScript.exe " & thisFile & " S ""%1""", "REG_SZ"

AddNewCmd "Q", pCmd.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\SysCmd"), pCmd.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\SysCmd")
AddNewCmd "QC", thisFile, pCmd.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\SysCmd")
MsgBox "安装成功!"
ElseIf pArgs.Count=1 Then
IF UCase(pArgs(0))="EDIT" Then '只有一个参数且为Edit时, 打开此脚本进行编辑。

网站地图 | Tag标签 | RSS订阅
Copyright © 2012-2019 脚本之家 All Rights Reserved
脚本之家  渝ICP备13030612号