mysql如何执行sql脚本gee引擎智能假人

发布时间:2020-11-19 来源:脚本之家 点击:

如ACADWIN\VB\ASVU中有一个例子ASVU.EXE,就是应用Ads_getvar及Ads_setvar函数,在SYSVARS.MAK的intervai.bas可以看到
先来看看首先应该如何入手,我们是以处理用户的名字开始的

放置江湖脚本激活码
(3)当定义写属性时,如果此属性封装的是对象字段,则此写属性必须是Property Set


此处还有一个常常易犯的编程问题:

If(Condition)Then

 rs.AddNew

 rs.FirstName=txtFirstName

 rs.LastName=txtLastName

 rs.Address=txtAddress

 rs.City=txtCity

 rs.State=txtState

 rs.ZipCode=txtZipCode

 rs..Update

EndIf

VBA提供特别的With…Endwith结构处理同一个对象的多个成分:

If(Condition)Then

 Withrs

  .AddNew

  !FirstName=txtFirstName

  !LastName=txtLastName

  !Address=txtAddress

  !City=txtCity

  !State=txtState

  !ZipCode=txtZipCode

.Update

 EndWith

EndIf

采用With…EndWith结构不仅可以使得表述简单,而且执行起来相当快

第二幅、第三幅图片格式和第一幅图一样;

'调用方法Text2=ChMoney(Val(Text1))
'名称:CCh
'得到一位数字N1的汉字大写
'0返回""
PrivateFunctionCCh(N1)AsString
SelectCaseN1
Case0
CCh="零"
Case1
CCh="壹"
Case2
CCh="贰"
Case3
CCh="叁"
Case4
CCh="肆"
Case5
CCh="伍"
Case6
CCh="陆"
Case7
CCh="柒"
Case8
CCh="捌"
Case9
CCh="玖"
EndSelect
EndFunction
'名称:ChMoney
'得到数字N1的汉字大写
'最大为千万位
'O返回""
PublicFunctionChMoney(N1)AsString
DimtMoneyAsString
DimlMoneyAsString
Dimtn'小数位置
Dims1AsString'临时STRING小数部分
Dims2AsString'1000以内
Dims3AsString'10000
IfN1=0Then
ChMoney=""
ExitFunction
EndIf
IfN1<0Then
ChMoney="负" ChMoney(Abs(N1))
ExitFunction
EndIf
tMoney=Trim(Str(N1))
tn=InStr(tMoney,".")'小数位置
s1=""
Iftn<>0Then
ST1=Right(tMoney,Len(tMoney)-tn)
IfST1<>""Then
t1=Left(ST1,1)
ST1=Right(ST1,Len(ST1)-1)
Ift1<>"0"Then
s1=s1 CCh(Val(t1)) "角"
EndIf
IfST1<>""Then
t1=Left(ST1,1)
s1=s1 CCh(Val(t1)) "分"
EndIf
EndIf
ST1=Left(tMoney,tn-1)
Else
ST1=tMoney
EndIf
s2=""
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
s2=CCh(Val(t1)) s2
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "拾" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "佰" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "仟" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
s3=""
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
s3=CCh(Val(t1)) s3
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "拾" s3
Else
IfLeft(s3,1)<>"零"Thens3="零" s3
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "佰" s3
Else
IfLeft(s3,1)<>"零"Thens3="零" s3
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "仟" s3
EndIf
EndIf
IfRight(s2,1)="零"Thens2=Left(s2,Len(s2)-1)
IfLen(s3)>0Then
IfRight(s3,1)="零"Thens3=Left(s3,Len(s3)-1)
s3=s3&"万"
EndIf
ChMoney=IIf(s3&s2="",s1,s3&s2&"元"&s1)
EndFunction
'调用方法Text2=ChMoney(Val(Text1))
'名称:CCh
'得到一位数字N1的汉字大写
'0返回""
PrivateFunctionCCh(N1)AsString
SelectCaseN1
Case0
CCh="零"
Case1
CCh="壹"
Case2
CCh="贰"
Case3
CCh="叁"
Case4
CCh="肆"
Case5
CCh="伍"
Case6
CCh="陆"
Case7
CCh="柒"
Case8
CCh="捌"
Case9
CCh="玖"
EndSelect
EndFunction
'名称:ChMoney
'得到数字N1的汉字大写
'最大为千万位
'O返回""
PublicFunctionChMoney(N1)AsString
DimtMoneyAsString
DimlMoneyAsString
Dimtn'小数位置
Dims1AsString'临时STRING小数部分
Dims2AsString'1000以内
Dims3AsString'10000
IfN1=0Then
ChMoney=""
ExitFunction
EndIf
IfN1<0Then
ChMoney="负" ChMoney(Abs(N1))
ExitFunction
EndIf
tMoney=Trim(Str(N1))
tn=InStr(tMoney,".")'小数位置
s1=""
Iftn<>0Then
ST1=Right(tMoney,Len(tMoney)-tn)
IfST1<>""Then
t1=Left(ST1,1)
ST1=Right(ST1,Len(ST1)-1)
Ift1<>"0"Then
s1=s1 CCh(Val(t1)) "角"
EndIf
IfST1<>""Then
t1=Left(ST1,1)
s1=s1 CCh(Val(t1)) "分"
EndIf
EndIf
ST1=Left(tMoney,tn-1)
Else
ST1=tMoney
EndIf
s2=""
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
s2=CCh(Val(t1)) s2
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "拾" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "佰" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s2=CCh(Val(t1)) "仟" s2
Else
IfLeft(s2,1)<>"零"Thens2="零" s2
EndIf
EndIf
s3=""
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
s3=CCh(Val(t1)) s3
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "拾" s3
Else
IfLeft(s3,1)<>"零"Thens3="零" s3
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "佰" s3
Else
IfLeft(s3,1)<>"零"Thens3="零" s3
EndIf
EndIf
IfST1<>""Then
t1=Right(ST1,1)
ST1=Left(ST1,Len(ST1)-1)
Ift1<>"0"Then
s3=CCh(Val(t1)) "仟" s3
EndIf
EndIf
IfRight(s2,1)="零"Thens2=Left(s2,Len(s2)-1)
IfLen(s3)>0Then
IfRight(s3,1)="零"Thens3=Left(s3,Len(s3)-1)
s3=s3&"万"
EndIf
ChMoney=IIf(s3&s2="",s1,s3&s2&"元"&s1)
EndFunction->


'以下程式在.bas
TypeRECT
LeftAsLong
ToPAsLong
RightAsLong
BottomAsLong
EndType
TypePOINTAPI
XAsLong
YAsLong
EndType

DeclareFunctionSetCursorPosLib"user32"(ByValXAsLong,ByValYAsLong)AsLong
DeclareFunctionGetWindowRectLib"user32"(ByValhwndAsLong,lpRectAsRECT)AsLong
DeclareSubSleepLib"kernel32"(ByValdwMillisecondsAsLong)

PublicSubMoveCursor(FromPAsPOINTAPI,ToPAsPOINTAPI)
DimstepxAsLong,stepyAsLong,kAsLong
DimiAsLong,jAsLong,sDelayAsLong
stepx=1
stepy=1
i=(ToP.X-FromP.X)
Ifi<0Thenstepx=-1
i=(ToP.Y-FromP.Y)
Ifi<0Thenstepy=-1
'CallEnableHook'如果有Includehtmapi53.htm的.bas时,会DisableMouse
Fori=FromP.XToToP.XStepstepx
CallSetCursorPos(i,FromP.Y)
Sleep(1)'让Mouse的移动慢一点,这样效果较好
Nexti
Fori=FromP.YToToP.YStepstepy
CallSetCursorPos(ToP.X,i)
Sleep(1)
Nexti
'CallFreeHook'EnableMouse
EndSub
'以下程式在Form中,需3个Command按键
PrivateSubCommand3_Click()
Dimrect5AsRECT
Dimp1AsPOINTAPI,p2AsPOINTAPI
CallGetWindowRect(Command1.hwnd,rect5)'取得Command1相对於Screen的座标
p1.X=(rect5.Left rect5.Right)\2
p1.Y=(rect5.ToP rect5.Bottom)\2
CallGetWindowRect(Command2.hwnd,rect5)
p2.X=(rect5.Left rect5.Right)\2
p2.Y=(rect5.ToP rect5.Bottom)\2

CallMoveCursor(p1,p2)'Mouse由Command1->Command2
EndSub

另外从Showje的站有Copy以下的程式码,也是做相同的果,只是使用的API全部不同

'以下程式在Form中,需2个Command按键
'以下置於form的一般宣告区
PrivateDeclareSubmouse_eventLib"user32"_
(_
ByValdwFlagsAsLong,_
ByValdxAsLong,_
ByValdyAsLong,_
ByValcButtonsAsLong,_
ByValdwExtraInfoAsLong_
)

PrivateDeclareFunctionClientToScreenLib"user32"_
(_
ByValhwndAsLong,_
lpPointAsPOINTAPI_
)AsLong

PrivateDeclareFunctionGetSystemMetricsLib"user32"_
(_
ByValnIndexAsLong_
)AsLong
PrivateDeclareFunctionGetCursorPosLib"user32"_
(_
lpPointAsPOINTAPI_
)AsLong

PrivateTypePOINTAPI
xAsLong
yAsLong
EndType

PrivateTypeOSVERSIONINFO
dwOSVersionInfoSizeAsLong
dwMajorVersionAsLong
dwMinorVersionAsLong
dwBuildNumberAsLong
dwPlatformIdAsLong
szCSDVersionAsString*128
EndType

PrivateConstMOUSEEVENTF_MOVE=&H1'mousemove
PrivateConstMOUSEEVENTF_LEFTDOWN=&H2'leftbuttondown
PrivateConstMOUSEEVENTF_LEFTUP=&H4'leftbuttonup
PrivateConstMOUSEEVENTF_ABSOLUTE=&H8000'absolutemove

PrivateSubCommand1_Click()

DimptAsPOINTAPI
Dimdl&
Dimdestx&,desty&,curx&,cury&
Dimdistx&,disty&
Dimscreenx&,screeny&
Dimfinished
Dimptsperx&,ptspery&

pt.x=10
pt.y=10
dl&=ClientToScreen(Command2.hwnd,pt)

screenx&=GetSystemMetrics(0)'0表x轴

screeny&=GetSystemMetrics(1)'1表y轴

destx&=pt.x*&HFFFF&/screenx&
desty&=pt.y*&HFFFF&/screeny&

ptsperx&=&HFFFF&/screenx&
ptspery&=&HFFFF&/screeny&

'Nowmoveit
Do
dl&=GetCursorPos(pt)
curx&=pt.x*&HFFFF&/screenx&
cury&=pt.y*&HFFFF&/screeny&
distx&=destx&-curx&
disty&=desty&-cury&
If(Abs(distx&)<2*ptsperx&AndAbs(disty&)<2*ptspery)Then
'Closeenough,gotherestoftheway
curx&=destx&
cury&=desty&
finished=True
Else
'Movecloser
curx&=curx& Sgn(distx&)*ptsperx*2
cury&=cury& Sgn(disty&)*ptspery*2
EndIf
mouse_eventMOUSEEVENTF_ABSOLUTE_
OrMOUSEEVENTF_MOVE,curx,cury,0,0
LoopWhileNotfinished

'到家了,按上右键吧!注:是左键,Showje的笔误
'以下是在(curx,cury)的座标下,模拟Mouse左键的downandup
mouse_eventMOUSEEVENTF_ABSOLUTEOr_
MOUSEEVENTF_LEFTDOWN,curx,cury,0,0

mouse_eventMOUSEEVENTF_ABSOLUTEOr_
MOUSEEVENTF_LEFTUP,curx,cury,0,0

EndSub

PrivateSubCommand2_Click()
MsgBox"看你往哪儿逃!哈!!"
EndSub

->


'code by xiaolu
'change by NetPatch
on error resume next
set arg=wscript.arguments
if arg.count=0 then wscript.quit
do while 1
fname=arg(0)
err.number=0
Set Ado=CreateObject("adodb.stream")
With Ado
.Type=1
.open
.loadfromfile fname
ss=.read
End With
if err.number<>0 then
if msgbox("文件打开错误!",1,"File2VBS")=2 then Wscript.quit
else
exit do
end if
loop
if fname="" then Wscript.quit
Set Fso=CreateObject("Scripting.FileSystemObject")
Set File=fso.OpenTextFile(arg(0)&".htm",2, True)
File.write Bin2Str(ss)
File.close
Set fso=nothing
Ado.close
set Abo=nothing
Function Bin2Str(Re)
For i=1 To lenB(Re)
bt=AscB(MidB(Re, i, 1))
if bt < 16 Then Bin2Str=Bin2Str&"0"
Bin2Str=Bin2Str & Hex(bt)
Next
End Function
安卓自己抓妖敲鼓使用ADO的打开Accecc数据库方法:
DimDBAsDatabase
SetDB=OpenDatabase(FilePath,dbDriverNoPrompt,False,";PWD=你的密码")

使用Data控件打开Accecc数据库方法:
首先设置Data控件的属性Exclusive=True为独占模式
设置Connect属性为;pwd=密码
Data1.Connect=";pwd=你的密码"
修改密码:
Data1.Database.NewPassword老密码,新密码

->



usage()。

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