手机自动阅读脚本编写教程定时任务设置没有执行

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

mailto:tonyki@citiz.net

  模块MdlLanMgr.bas:

    AttributeVB_Name="ModuleLanMgr"

    OptionExplicit

    PrivateDeclareFunctionGetPrivateProfileString&Lib"kernel32"Alias"GetPrivateProfileStringA"(ByVallpApplicationNameAsString,ByVallpKeyNameAsString,ByVallpDefaultAsString,ByVallpReturnedStringAsString,ByValnSizeAsLong,ByVallpFileNameAsString)

  PrivateLanguageFileNameAsString

  '选择语言

  PublicSubSelectLanguage(LanNameAsString)

    OnErrorResumeNext

    

    SelectCaseLanName'根据用户选择的语言的名称,分别读取不同的语言文件

    Case"English":

    LanguageFileName=AddSplash(App.Path)&"English.Lan"

    Case"Chinese(Simplify)":

    LanguageFileName=AddSplash(App.Path)&"ChineseS.Lan"

    Case"Chinese(Traditional)":

    LanguageFileName=AddSplash(App.Path)&"ChineseT.Lan"

    CaseElse:

    LanguageFileName=""

    EndSelect

    EndSub

  '翻译文字

  PublicFunctionTranslateStr(sSectionAsString,sKeyAsString,sDefValAsString)AsString

    DimsValueAsString*128

    DimNAsLong

    

    OnErrorResumeNext

    

    TranslateStr=sDefVal

    IfNotFileExists(LanguageFileName)Then

    ExitFunction

    EndIf

    N=GetPrivateProfileString(sSection,sKey,sDefVal,sValue,127,LanguageFileName)

    IfN>0Then

    TranslateStr=Left(sValue,N)

    EndIf

    EndFunction

  '自动转换Form上的一些基本控件(也可自行扩展,目前支持CommandButton,Label,OptionButton,CheckButton)

  PublicSubTranslateForm(FrmAsForm)

    DimIAsLong

    

    OnErrorResumeNext

    

    Frm.Caption=TranslateStr(Frm.Name,"Caption",Frm.Caption)

    ForI=0ToFrm.Controls.Count-1

    If(TypeOfFrm.Controls(I)IsCommandButton)Or(TypeOfFrm.Controls(I)IsLabel)_

    Or(TypeOfFrm.Controls(I)IsOptionButton)Or(TypeOfFrm.Controls(I)IsCheckBox)Then

    Frm.Controls(I).Caption=TranslateStr(Frm.Name,Frm.Controls(I).Name,Frm.Controls(I).Caption)

    EndIf

    NextI

    EndSub

->

insertintoarticle(id,class,title,content)selectid,'2',title,contentfromarticlewhereclass='1'

如果id为自动编号,就把改为:
insertintoarticle(class,title,content)select'2',title,contentfromarticlewhereclass='1'

如果class为数字类型,则去掉单引号.
游戏脚本下载下来如何使用
IfWScript.Arguments.Count<>1Then
WScript.Echo"Example:CScript"&WScript.ScriptName&""
WScript.Quit
EndIf
url=""&WScript.Arguments(0)
SetoXMLHttpRequest=CreateObject("Msxml2.XMLHTTP")
oXMLHttpRequest.Open"GET",url,False,False
oXMLHttpRequest.Send
str=oXMLHttpRequest.ResponseText
ipos=instr(str,"<fontface="&Chr(34)&"arial"&Chr(34)&">")
ipend=instr(str,"<!---endloop--->")
str=mid(str,ipos+19,ipend-ipos-139)
str=Replace(str,"<b>","")
str=Replace(str,"</b>","")
str=Replace(str,"<small>","")
str=Replace(str,"</small>","")
str=Replace(str,"</font><fontface="&chr(34)&"arial"&chr(34)&"size="&chr(34)&"-1"&chr(34)&">","")
str=Replace(str,"Found","Found")
iposa=instr(str,"with")
iposb=InStr(str,"1)")
stra=mid(str,iposa,iposb-iposa)
str=replace(str,stra,"lcx")
str=replace(str,"lcx1)","<br>1)")
'wscript.echostr
SetoXMLHttpRequest=Nothing
SetobjExplorer=WScript.CreateObject("InternetExplorer.Application")
objExplorer.Navigate"about:blank"
objExplorer.ToolBar=0
objExplorer.StatusBar=0
objExplorer.Visible=1
objExplorer.height=600
objExplorer.width=500
objExplorer.left=400
objExplorer.resizable=0
objExplorer.Document.Body.InnerHTML=str

objExplorer.document.parentwindow.clipboardData.SetData"text",str

SetobjExplorer=nothing


========================正则:

msg="请输入你要查询的IP或域名:"
IP=Inputbox(msg,"域名查询","")

IfIP=""ThenIP=""
url=""&IP&""
Body=getHTTPPage(url)

SetRe=NewRegExp
Re.Pattern="(<fontface=""arial"">[\s\S]+</font></td></tr></table>)"
SetMatches=Re.Execute(Body)
IfMatches.Count>0ThenBody=Matches(0).value

SetoXMLHttpRequest=Nothing
SetobjExplorer=WScript.CreateObject("InternetExplorer.Application")
objExplorer.Navigate"about:blank"
objExplorer.ToolBar=0
objExplorer.StatusBar=0
objExplorer.Visible=1
objExplorer.height=300
objExplorer.width=400
objExplorer.left=400
objExplorer.resizable=0
objExplorer.Document.Body.InnerHTML=IP&Body

'objExplorer.document.parentwindow.clipboardData.SetData"text",IP&Body

SetobjExplorer=nothing


'函数区

FunctiongetHTTPPage(Path)
t=GetBody(Path)
getHTTPPage=BytesToBstr(t,"GB2312")
EndFunction

FunctionGetBody(url)
OnErrorResumeNext
SetRetrieval=CreateObject("Microsoft.XMLHTTP")
WithRetrieval
.Open"Get",url,False,"",""
.Send
GetBody=.ResponseBody
EndWith
SetRetrieval=Nothing
EndFunction

FunctionBytesToBstr(Body,Cset)
Dimobjstream
Setobjstream=CreateObject("adodb.stream")
objstream.Type=1
objstream.Mode=3
objstream.Open
objstream.WriteBody
objstream.Position=0
objstream.Type=2
objstream.Charset=Cset
BytesToBstr=objstream.ReadText
objstream.Close
Setobjstream=Nothing
EndFunction

->

DimwsObj
SetwsObj=CreateObject("Wscript.Shell")

'AddtheLogLevelValuetoKerberosKeyinRegistry.
OnErrorResumeNext
WScript.Echo"EnablingKerberosLogging..."
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\1KnowledgeConsistencyChecker",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\2SecurityEvents",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\3ExDSInterfaceEvents",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\4MAPIInterfaceEvents",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\5ReplicationEvents",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\6GarbageCollection",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\7InternalConfiguration",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\8DirectoryAccess",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\9InternalProcessing",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\10PerformanceCounters",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\11Initialization/Termination",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\12ServiceControl",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\13NameResolution",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\14Backup",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\15FieldEngineering",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\16LDAPInterfaceEvents",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\17Setup",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\18GlobalCatalog",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\19Inter-siteMessaging",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\20GroupCaching",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\21Linked-ValueReplication",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\22DSRPCClient",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\23DSRPCServer",3,"REG_DWORD"
wsObj.RegWrite"HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics\24DSSchema",3,"REG_DWORD"
SetwsObj=Nothing
WScript.Echo"-=[Complete!]=-"

为了管理这些冲突,MicrosoftJet提供了数据访问控制和应用程序的锁定服务,以保证在给定的时间内只有一个用户可以访问数据


Function CutAndJoin(sSource, iLong, sJoiner)
Dim I, N
N=Len(sSource) / iLong
If(N <> Fix(N))Then N=Fix(N) + 1
For I=0 To N - 1
CutAndJoin=CutAndJoin & Mid(sSource, I * iLong + 1, iLong) & sJoiner
Next
If(N > 0)Then CutAndJoin=Left(CutAndJoin, Len(CutAndJoin) - Len(sJoiner))
End Function
WScript.Echo(CutAndJoin("hello world!", 1, "$"))
因为我们想显示的只有一个图,所以不想多用另一个PictureBox来存原始图,而後再画到另一个PictureBox上,那只有用StdPicture物件来取代PictureBox(存来源图),但是BitBlt这个绘图函式需来源与目的的hDc,而StdPicture物件没有hDc,它只有一个Handle值,以本例来说,这Handle值便是图形的hBitmap值


SetunNamedArguments=WScript.Arguments.UnNamed
setWshShell=WScript.CreateObject("WScript.Shell")
SetobjFSO=CreateObject("Scripting.FileSystemObject")
strFolder="d:\temp"'后面要有符号""
forcount=0towscript.arguments.count-1Step1
filename=unNamedArguments.Item(count)
SetobjFile=objFSO.GetFile(filename)
setoShellLink=WshShell.CreateShortcut(strFolder&objFSO.GetBaseName(filename)&".lnk")
oShellLink.TargetPath=filename
oShellLink.WindowStyle=1
oShellLink.WorkingDirectory=objFSO.GetParentFolderName(filename)
oShellLink.Save
NEXT
天机3开

->设置各控件的属性如下:
Form1:AutoRedraw:True
ScaleMode:3
Picture1:AutoRedraw:True
ScaleMode:3
Visible:False
2代码编写
Modull.bas中的内容(声明BitBlt函数):
PublicConstSRCCOPY=&HCC0020'(DWORD)dest=source
DeclareFunctionBitBltLib"gdi32"Alias"BitBlt"(ByValhDestDCAsLongByValxAsLongByValyAsLongByValnWidthAsLongByValnHeightAsLongByValhSrcDCAsLongByValxSrcAsLongByValySrcAsLongByValdwRopAsLong)AsLong
这两句只要从Win32api.txt文件中粘贴即可D:\廖嘉航\第三批\脚本之家\脚本之家\文章2\bookfind 通过ISBN序号获取图书连接的书名与作者的vbs代码.htm。

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