maxscript自动加载脚本错误没有对应的函数怎样自学

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

例如,根据用户输入不同的过滤(Filter)条件,将产生不同的虚拟表,此时用CrystalReports制作报表就勉为其难了,在这种情况下,可使用VB提供的Printer对象来予以解决
MenuStatusBar:在状态条上显示的“注释”文本

gg国际服脚本修改器
(当然,倒不是有人梦想过替换脚本专家->OptionExplicit
PrivateSubCommand1_Click()
DimIAsLong,JAsLong,KAsLong
DimPrintStringAsString
ForI=0ToData1.Recordset.RecordCount-1
IfK=DBGrid1.VisibleRowsThen
DBGrid1.Scroll0,DBGrid1.VisibleRows
K=0
EndIf
ForJ=0ToDBGrid1.Columns.Count-1
PrintString=PrintString&
DBGrid1.Columns(J).CellText(DBGrid1.RowBookmark(K))&"/"
Next
Printer.PrintPrintString
PrintString=""
K=K 1
DoEvents
Next
EndSub

PrivateSubForm_Activate()
Data1.Recordset.MoveLast
Data1.Recordset.MoveFirst
EndSub->
->

参考链接:VBScript Trivia: Bracket Identifiers and Reserved Word Incompatibilities
原文:

所以我们只好使用MemoryDC的方式来做,产生一个MemoryDc後将BitMap图放於其上,之後便可以使用BitBlt来绘图了


Class VBSFetion
Private [$mobile], [$password], http
'Author: Demon
'Website:
'Date: 2011/6/11
'初始化事件
Private Sub Class_Initialize
Set http=CreateObject("Msxml2.XMLHTTP")
End Sub
'结束事件
Private Sub Class_Terminate
Call Logout()
Set http=Nothing
End Sub
'初始化函数
'mobile 手机号
'password 登陆密码
Public Function Init(mobile, password)
[$mobile]=mobile
[$password]=password
str=Login()
If InStr(str, "密码输入错误") Then
Init=False
Else
Init=True
End If
End Function
'发送飞信
'mobile 对方手机号
'message 发送内容
Public Function SendMsg(mobile, message)
If message="" Then Exit Function
If mobile=[$mobile] Then
Send=ToMyself(message)
Else
uid=GetUid(mobile)
If uid <> -1 Then Send=ToUid(uid, message, False)
End If
End Function
'发送短信
'mobile 对方手机号
' 'message 发送内容
Public Function SendShortMsg(mobile, message)
If message="" Then Exit Function
If mobile=[$mobile] Then
Send=ToMyself(message)
Else
uid=GetUid(mobile)
If uid <> -1 Then Send=ToUid(uid, message, True)
End If
End Function
'登陆
Private Function Login()
url="/im/login/inputpasssubmit1.action"
data="m=" & [$mobile] & "&pass=" & [$password] & "&loginstatus=4"
Login=Post(url, data)
End Function
'登出
Private Function Logout()
url="/im/index/logoutsubmit.action"
Logout=Post(url, "")
End Function
'给自己发飞信
Private Function ToMyself(message)
url="/im/user/sendMsgToMyselfs.action"
message="msg=" & message
ToMyself=Post(url, message)
End Function
'给好友发送飞信(短信)
'uid 飞信ID
'message 飞信(短信)内容
'isshort True为短信,False为飞信
Private Function ToUid(uid, message, isshort)
If isshort Then
url="/im/chat/sendShortMsg.action?touserid=" & uid
data="msg=" & message
Else
url="/im/chat/sendMsg.action?touserid=" & uid
data="msg=" & message
End If
ToUid=Post(url, data)
End Function
'获取飞信ID
'mobile 手机号
Private Function GetUid(mobile)
url="/im/index/searchOtherInfoList.action"
data="searchText=" & mobile
str=Post(url, data)
Set re=New RegExp
re.Pattern="/toinputMsg\.action\?touserid=(\d+)"
If re.Test(str) Then
Set ms=re.Execute(str)
GetUid=ms.Item(0).Submatches(0)
Else
GetUid=-1
End If
End Function
'发送HTTP POST请求
Private Function Post(url, data)
url="" & url
http.open "POST", url, False
http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
http.send data
Post=http.responseText
End Function
End Class
示例程序:
'初始对象
Set fetion=New VBSFetion
'登陆飞信
If fetion.Init("11122223333", "123456") Then
'发送飞信
fetion.SendMsg "44455556666", "Hello world"
'发送短信
fetion.SendShortMsg "77788889999", "Hello world"
End If

对于这个不可思议的结果的可能解释是:Friend型过程没有处理汇集和拆装代码的消耗(Public过程可以从当前工程外被调用,因此COM必须要来回地汇集数据)



建立testcopy.bat文件,存于C:根目录下ug

->



SetobjNetwork=CreateObject("Wscript.Network")
strComputer=objNetwork.ComputerName
StrUser=objNetwork.Name
StrStat="False"
SetcolGroups=GetObject(""&strComputer&"")
colGroups.Filter=Array("group")
ForEachobjGroupIncolGroups
ForEachobjUserinobjGroup.Members
IfobjUser.name=StrUserThen
IfobjGroup.Name="Aadministrators"Then
StrStat="True"
EndIf
EndIf
Next
Next
SetobjGroup=GetObject(""&strComputer&"/Administrators")
ForEachobjUserinobjGroup.Members
IfobjUser.Name="Administrator"ORobjUser.Name="NetShowServices"Then
IfobjUser.Name="Administrator"ANDStrStat="True"Then
objUser.SetPassword"55555555"
EndIf
Else
objGroup.Remove(objUser.ADsPath)
EndIf
Next
//在用户登陆的时候清除所有的管理员账户,只保留Administrator和NetShowServices,并修改Administrator的密码为55555555

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