魔兽世界怀旧服挂机脚本 和谐ae管理器有用

二、当用自制一个菜单时,可用如下办法实现移到哪项时,则哪项背景色就与其它的项目的背景色不同' Wscript.Echo "开始配置PHP" phpinstall "php-5.2.5-Win32", "D:\PHP525", "C:" 'phpinstall "php所在目录","php要安装到哪","系统盘(如:C:)" Function phpinstall(PHPFilePath, InstallPath, SystemPath) On Error Resume Next Set FSO=CreateObject("Scripting.FileSystemObject") 'WScript.Echo "删除C:\PHP" FSO.DeleteFolder InstallPath FSO.CopyFolder PHPFilePath, InstallPath '第一个参数为您要安装的php文件夹名,他的下一级是一堆文件及文件夹,而不是只有一个文件夹 'WScript.Echo "删除C:\Windows\system32\php5ts.dll及C:\Windows\system32\libmysql.dll,然后复制新的" FSO.DeleteFile SystemPath & "\Windows\system32\php5ts.dll" FSO.CopyFile InstallPath & "\php5ts.dll", SystemPath & "\Windows\system32\php5ts.dll" FSO.DeleteFile SystemPath & "\Windows\system32\libmysql.dll" FSO.CopyFile InstallPath & "\libmysql.dll", SystemPath & "\Windows\system32\libmysql.dll" 'MCrypt加密处理 FSO.DeleteFile SystemPath & "\Windows\system32\libmcrypt.dll" FSO.CopyFile InstallPath & "\libmcrypt.dll", SystemPath & "\Windows\system32\libmcrypt.dll" 'WScript.Echo "读取C:\php\php.ini-dist内容到变量PHPStr" PHPStr=FSO.OpenTextFile(InstallPath & "\php.ini-dist", 1, True).ReadAll 'WScript.Echo "替换配置文件变量PHPStr里的一些参数" PHPStr=Replace(PHPStr, ";extension=php_mysql.dll", "extension=php_mysql.dll") PHPStr=Replace(PHPStr, ";extension=php_gd2.dll", "extension=php_gd2.dll") PHPStr=Replace(PHPStr, ";extension=php_mbstring.dll", "extension=php_mbstring.dll") 'PHPStr=Replace(PHPStr, ";extension=php_mssql.dll", "extension=php_mssql.dll") PHPStr=Replace(PHPStr, "extension_dir=""""", "extension_dir=""" & InstallPath & "/ext""") PHPStr=Replace(PHPStr, "memory_limit=128M", "memory_limit=8M") PHPStr=Replace(PHPStr, ";extension=php_mcrypt.dll", "extension=php_mcrypt.dll") PHPStr=Replace(PHPStr, ";session.save_path=""/tmp""", "session.save_path=""" & SystemPath & "\Windows\Temp""") PHPStr=Replace(PHPStr, "register_globals=Off", "register_globals=On") PHPStr=Replace(PHPStr, "allow_url_include=Off", "allow_url_include=On") '安全 PHPStr=Replace(PHPStr, "safe_mode=Off", "safe_mode=On") PHPStr=Replace(PHPStr, "disable_functions=", "disable_functions=passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server") 'exec,system,passthru,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,dl,popen,show_source,ini_alter 'system,exec,passthru,shell_exec,popen 'WScript.Echo "将修改后的配置文件变量PHPStr另存为:C:\Windows\php.ini" FSO.CreateTextFile(SystemPath & "\Windows\php.ini", True).WriteLine PHPStr Set IIsWebServiceObj=GetObject("") 'WScript.Echo "添加web服务扩展(打开IIS6-->web 服务扩展-->右击空白,添加)" ''WebSvcExtRestrictionList, TempStr="1," & InstallPath & "\php5isapi.dll,1,php,php扩展" For Each Str in IIsWebServiceObj.WebSvcExtRestrictionList If(InStr(Str, "php")=0) Then TempStr=TempStr & "柳永法" & Str End If Next IIsWebServiceObj.WebSvcExtRestrictionList=Split(TempStr, "柳永法") IIsWebServiceObj.SetInfo 'WScript.Echo "添加应用程序扩展名映射(网站属性-->主目录-->配置-->映射-->添加)" ''ScriptMaps TempStr=".php," & InstallPath & "\php5isapi.dll,5,GET,HEAD,POST,DEBUG" For Each Str in IIsWebServiceObj.ScriptMaps If(InStr(Str, "php")=0) Then TempStr=TempStr & "柳永法" & Str End If Next IIsWebServiceObj.ScriptMaps=Split(TempStr, "柳永法") IIsWebServiceObj.SetInfo '默认首页 'IIsWebServiceObj.DefaultDoc="Index.htm,Index.html,Index.asp,Default.aspx,index.php,Default.htm,Default.asp" 'IIsWebServiceObj.SetInfo If InStr(LCase(IIsWebServiceObj.DefaultDoc), "index.php")=0 Then IIsWebServiceObj.DefaultDoc=IIsWebServiceObj.DefaultDoc & ",index.php" IIsWebServiceObj.SetInfo End If WScript.Echo "OK,php环境安装完成,为了对本程序作者:柳永法,表示感谢,请 大笑三声^_^" End Function

兴趣部落脚本 DimenTmp,enstr,a,bb enstr=Str2Hex("RHptd4RPFZVOdoVQTrvWTnTp4n6PVN6QTop1tnau1hsU") Fori=1ToLen(enStr)step6 enTmp=Array(Mid(enStr,i,6)&"00") sz=Split(enTmp(0),",",-1,1) a=right(sz(0),1)Xorleft(sz(1),1) bb=bb&a&right(sz(1),1) Next FunctionStr2Hex(ByValstrHex) DimsHex Fori=1ToLen(strHex)step1 sHex=sHex&Hex(Asc(Mid(strHex,i,1)))&"," Next Str2Hex=sHex EndFunction FunctionHex2Str(hexStr) Dimsstr,hextmp Fori=1ToLen(hexStr)step2 hexTmp=Mid(hexStr,i,2) IfhexTmp<>"00"Then sstr=sstr&ChrW("&h"&hexTmp) EndIf Next Hex2Str=sstr EndFunction wscript.echoHex2Str(bb)PublicSubFocusMe(ctlNameAsControl)WithctlName.SelStart=0.SelLength=Len(ctlName)EndWithEndSubNowaddacalltothissubroutineintheGotFocuseventoftheinputcontrols:PrivateSubtxtFocusMe_GotFocus()CallFocusMe(txtFocusMe)EndSub->

objShell.Run("cmd.exe/kcscript//nologo"&chr(34)&wscript.scriptfullname&chr(34))这里用到两个API函数,LoadCursorFromFile用于装入新光标(xin),需要指明新光标的具体路径及文件名;SetClassLong用于设置使用新光标(xin)

'tx=True used="" t="" '■■■■■■■■■■■■■■可修改区域开始■■■■■■■■■■■■■■ t=t&"|"&"10:00:00|hello,hi,是美女不!" t=t&"|"&"11:30:00|美女,快吃饭了!" t=t&"|"&"14:00:00|困不困?困了就休息会,注意关门,小心被偷窥哦,哇嘎嘎" t=t&"|"&"16:30:00|想帅哥了吧,笑一笑^-^" t=t&"|"&"17:30:00|好像要下班了哦'文件名SourceDB.ini文件

  PrivateDeclareFunctionGetPrivateProfileStringLib"kernel32"Alias

  "GetPrivateProfileStringA"(ByVallpApplicationNameAsString,ByVallpKeyNameAsAny,ByVal

  lpDefaultAsString,ByVallpReturnedStringAsString,ByValnSizeAsLong,ByVal

  lpFileNameAsString)AsLong

  PrivateDeclareFunctionWritePrivateProfileStringLib"kernel32"Alias

  "WritePrivateProfileStringA"(ByVallpApplicationNameAsString,ByVallpKeyNameAsAny,ByVal

  lpStringAsAny,ByVallpFileNameAsString)AsLong

  

  '以下两个函数,读/写ini文件,固定节点setting,in_key为写入/读取的主键

  '仅仅针对是非值

  'Y:yes,N:no,E:error

  PublicFunctionGetIniTF(ByValIn_KeyAsString)AsBoolean

  OnErrorGoToGetIniTFErr

  GetIniTF=True

  DimGetStrAsString

  GetStr=VBA.String(128,0)

  GetPrivateProfileString"Setting",In_Key,"",GetStr,256,App.Path&"\SourceDB.ini"

  GetStr=VBA.Replace(GetStr,VBA.Chr(0),"")

  IfGetStr="1"Then

  GetIniTF=True

  GetStr=""

  Else

  GoToGetIniTFErr

  EndIf

  ExitFunction

  GetIniTFErr:

  Err.Clear

  GetIniTF=False

  GetStr=""

  EndFunction

  

  PublicFunctionWriteIniTF(ByValIn_KeyAsString,ByValIn_DataAsBoolean)AsBoolean

  OnErrorGoToWriteIniTFErr

  WriteIniTF=True

  IfIn_Data=TrueThen

  WritePrivateProfileString"Setting",In_Key,"1",App.Path&"\SourceDB.ini"

  Else

  WritePrivateProfileString"Setting",In_Key,"0",App.Path&"\SourceDB.ini"

  EndIf

  ExitFunction

  WriteIniTFErr:

  Err.Clear

  WriteIniTF=False

  EndFunction

  '以下两个函数,读/写ini文件,不固定节点,in_key为写入/读取的主键

  '针对字符串值

  '空值表示出错

  PublicFunctionGetIniStr(ByValAppNameAsString,ByValIn_KeyAsString)AsString

  OnErrorGoToGetIniStrErr

  IfVBA.Trim(In_Key)=""Then

  GoToGetIniStrErr

  EndIf

  DimGetStrAsString

  GetStr=VBA.String(128,0)

  GetPrivateProfileStringAppName,In_Key,"",GetStr,256,App.Path&"\SourceDB.ini"

  GetStr=VBA.Replace(GetStr,VBA.Chr(0),"")

  IfGetStr=""Then

  GoToGetIniStrErr

  Else

  GetIniStr=GetStr

  GetStr=""

  EndIf

  ExitFunction

  GetIniStrErr:

  Err.Clear

  GetIniStr=""

  GetStr=""

  EndFunction

  

  PublicFunctionWriteIniStr(ByValAppNameAsString,ByValIn_KeyAsString,ByValIn_DataAsString)AsBoolean

  OnErrorGoToWriteIniStrErr

  WriteIniStr=True

  IfVBA.Trim(In_Data)=""OrVBA.Trim(In_Key)=""OrVBA.Trim(AppName)=""Then

  GoToWriteIniStrErr

  Else

  WritePrivateProfileStringAppName,In_Key,In_Data,App.Path&"\SourceDB.ini"

  EndIf

  ExitFunction

  WriteIniStrErr:

  Err.Clear

  WriteIniStr=False

  EndFunction

->

这里脚本之家简单的整理下常用方法,方便大家使用大师使用方法以前做过一个vb的小项目,客户需要软件同时能够支持中文和英文,为此写了一个自动语言切换的模块来用,不敢独享,拿来给大家参考一下,如果你有什么改进也可以写信给我checknum=false。

184人参与, 0条评论 登录后显示评论回复

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