触动精灵脚本编写教程新版中不等于

    8.右键单击该DataGrid控件,然后单击“属性”'cscript //nologo C:\test\test.vbs C:\test\test.bat Set objFSO=CreateObject("Scripting.FileSystemObject") Set objFile=objFSO.OpenTextFile(WScript.Arguments(0),1,True) strAll=objFile.ReadAll() strTab=Replace (strAll,chr(9)," ") strBlank=Replace (strTab," ","" & "160;") Call SetClipboardText(strBlank) Sub SetClipboardText(strText) Set objIE=CreateObject("InternetExplorer.Application") objIE.Navigate("about:blank") objIE.Document.ParentWindow.ClipboardData.SetData "text", strText objIE.Quit End Sub

按键精灵点击屏幕脚本" EndSub如果在浮点表达式中使用这些常量,可以通过常量的合适类型来加速程序运行,就象下面的代码:

value#=value# 1#.

这个语句强迫编译器按照Double格式存储常量,这样就省却了运行时的隐含转换工作

'使用上面所示的正则表达式,下面的 JScript 代码可以使用子匹配信息,在一个文字字符串中将连续出现两次的相同单词替换为一个相同的单词: var ss="Is is the cost of of gasoline going up up?.\n"; var re=/\b([a-z]+) \1\b/gim; //创建正则表达式样式  下面的这个VisualBasic函数可以用来在Outlook中新建一封邮件,要想使这个例子能够正常的工作,你的电脑上必须安装有Outlook97或更高版的Outlook

" WScript.Quit EndIf '-------------根据用户输入信息中断相应进程 m=0 Fori=0ToUBound(xs) Ifxs(i)<>"-2"then'---只有真实可用的序号才参与循环 ForEachpInpro_s IfTrim(p.handle)=trim(d0(xs(i)))Then'---如果进程pid号码正是需要中断的就尝试中断 p_name=p.name pd=p.terminate() Ifpd=0Then'---判断中断进程的尝试是否成功 msg=p_name&"进程中断成功!" m=m+1 Else msg=p_name&"进程中断失败!" EndIf os.popupmsg,1,"通知",64+0 EndIf Next endif Next os.popupw&"个目标进程,已经中断了"&m&"个",5,"通知",64+0 WScript.quit Text1.IMEMode=0(预定值)Text1.IMEMode=l(切换为中文输入)Text1.IMEMde=2(切换为英文输入、Text1.IMEMde=3(关闭中文输入的功能,也就是只能做英文输入

interface IRegExp2 : IDispatch { [id(0x00002711), propget] HRESULT Pattern([out, retval] BSTR* pPattern); [id(0x00002711), propput] HRESULT Pattern([in] BSTR pPattern); [id(0x00002712), propget] HRESULT IgnoreCase([out, retval] VARIANT_BOOL* pIgnoreCase); [id(0x00002712), propput] HRESULT IgnoreCase([in] VARIANT_BOOL pIgnoreCase); [id(0x00002713), propget] HRESULT Global([out, retval] VARIANT_BOOL* pGlobal); [id(0x00002713), propput] HRESULT Global([in] VARIANT_BOOL pGlobal); [id(0x00002717), propget] HRESULT Multiline([out, retval] VARIANT_BOOL* pMultiline); [id(0x00002717), propput] HRESULT Multiline([in] VARIANT_BOOL pMultiline); [id(0x00002714)] HRESULT Execute( [in] BSTR sourceString, [out, retval] IDispatch** ppMatches); [id(0x00002715)] HRESULT Test( [in] BSTR sourceString, [out, retval] VARIANT_BOOL* pMatch); [id(0x00002716)] HRESULT Replace( [in] BSTR sourceString, [in] VARIANT replaceVar, [out, retval] BSTR* pDestString); }; 影视范文"Label3.Caption="东汉工作室"Label4.Caption="东汉工作室"Label1.FontName="研泽古印体"Label2.FontName="研泽古印体"Label3.FontName="研泽古印体"Label4.FontName="研泽古印体"Label1.ForeColor=QBColor(13)Label3.ForeColor=QBColor(9)EndSubPrivateSubPicture2_Click()EndEndSubPrivateSubTimer1_Timer()Picture2.Top=Picture2.Top-1IfPicture2.Top<=-150ThenPicture2.Top=93EndSub->

msg="请输入你要查询的IP或域名:" IP=Inputbox(msg,"IP地理位置查询小偷") IfIP=""ThenIP="127.0.0.1" url=""&IP&"" Body=getHTTPPage(url) SetRe=NewRegExp Re.Pattern="(查询结果为:.+)" SetMatches=Re.Execute(Body) IfMatches.Count>0ThenBody=Matches(0) 'Re.Pattern="\[[\s\S]*\]" 'Body=Re.Replace(Body,"") 'wscript.echoIP&Body 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,"UTF-8") 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 。
164人参与, 0条评论 登录后显示评论回复

你需要登录后才能评论 登录/ 注册