dnf脚本自动交易软件via过滤

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

当我们要移动控制项(Control)或表单(Form)时,很多人习惯这样写:

frmCustomer.Left=frmCustomer.Left 100
frmCustomer.Top=frmCustomer.Top 50

但是若使用MoveMethod,可以加快40:

frmCustomer.MovefrmCustomer.Left 100,frmCustomer.Top 50->


'
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
明日之后免费钢琴脚本大全


(2)创建WScript.Shell对象,由该对象直接运行dos命令,及testcopy.dat中的命令,对应的vbs文件:testcopy2.vbs
共有二种方法

方法1:VB3/VB4之版本,可于Form_Load()程序中加入下列程式码:
Me.Move(Screen.Width-Width)\2,(Screen.Height-Height)\2

方法2:
VB5以上之版本,则直接将Form之StartUpPosition设成(2-荧幕中央)即可->

动态二维数组



  2.建立坐标系,根据Picture1的大小和高度设置画出坐标系的X轴和Y轴:

->Picture1.ScaleMode=1‘以VB的基本单位作为建立坐标轴以及绘制图形的单位;
Picture1.Refresh
Picture1.CurrentX=Picture1.ScaleLeft 100
Picture1.CurrentY=Picture1.ScaleTop
Picture1.PrintPicture1.ScaleHeight-100
Picture1.Line(Picture1.ScaleLeft 100,Picture1.ScaleTop 100)-(Picture1.ScaleLeft 100,Picture1.ScaleHeight-100)
Picture1.CurrentX=Picture1.ScaleLeft 100
Picture1.CurrentY=Picture1.ScaleHeight
Picture1.Print“(0,0)”
Picture1.Line(Picture1.ScaleLeft 100,Picture1.ScaleHeight-100)-(Picture1.ScaleWidth-100,Picture1.ScaleHeight-100)
Picture1.CurrentX=Picture1.ScaleWidth
Picture1.CurrentY=Picture1.ScaleHeight
Picture1.PrintPicture1.ScaleWidth-100
Picture1.AutoRedraw=True‘必要时,用存储在内存中的图象进行重绘->

  3.绘制曲线并保存,我们这里以正弦曲线作为绘制曲线的数据来源,具体应用是可以采用由串口或其他仪器采集得到的数据.首先我们绘制一条中线,然后在Timer控件的Time事件中绘制曲线:

->Picture1.Line(Picture1.ScaleLeft,CInt(Picture1.ScaleHeight/2))-(Picture1.ScaleWidth,CInt(Picture1.ScaleHeight/2))‘绘制中线
PrivateSubTimer1_Timer()
 Dimy1AsInteger
 y1=CInt(Sin((x-Picture1.Left)/20/180*pi)*Picture1.ScaleHeight/2)
 y1=CInt((Picture1.ScaleHeight 1000)/2)-y1
 Picture1.Line(x,y)-(x 20,y1)
 x=x 20
 y=y1
 Ifx>=Picture1.ScaleWidthThen
  SavePicturePicture1.Image,"c:\sin.bmp"‘保存图画,可以根据实际需要命名图片
  x=0
  y=Picture1.ScaleHeight/2
  Picture1.Cls‘清屏重画
 EndIf
EndSub->

  从上面的过程可以看出,其实对于要求不高的实时曲线的绘制还是比较简单的,在这里我采用的是清屏重画图像,如果要实现图像往左移动,图像仍然保留的效果,可以采用Windows的Bitblt函数,可以让图像每次移动一个象素或是多少个twip

如果不用组件的话,代码如下:

setie=createobject("internetexplorer.application")
ie.navigate"about:blank"
dountilie.readystate=4:wscript.sleep25:loop
setdoc=ie.document
setbody=doc.body
setwin=doc.parentwindow
body.innerhtml="<OBJECTid=dlgCLASSID='clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b'></OBJECT>"
body.innertext=doc.getElementById("dlg").choosecolordlg
win.clipboarddata.setdata"text",body.innertext
ie.quit

如果用组件的话,代码如下:

flag=1+2
initialColor=&hff32ea
color=OpenColor(initialColor,flag)
MsgBox"Selectedcolor:"&hex(color)
functionOpenColor(initColor,flags)
setcomdlg=CreateObject("MSComDlg.CommonDialog")
comdlg.Color=initColor
comdlg.Flags=flags
comdlg.ShowColor
OpenColor=comdlg.Color
endfunction

组件相关文件下载->




油猴子网站如果在建立并添加该属性之前先引用了它,则将产生一个运行时错误

SendKeys "371471521"
WScript.Sleep 100
SendKeys "{TAB}"
WScript.Sleep 100
SendKeys "********"
WScript.Sleep 100
SendKeys "{ENTER}"
sub sendkeys(keys)
wshshell.sendkeys keys,ture
end sub

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