手机屏幕脚本js运行

发布时间:2020-08-05 来源:脚本之家 点击:

体系结构糟糕的VBA程序或其子程序比精心构造的程序运行得要缓慢,并且效率低下,另外调试和维护起来也更加困难"

火影忍者卡在加载脚本界面怎么办
常用的 BSTR 处理函数请参考 MSDN 文档PublicDeclareFunctionGetDesktopWindowLib"user32"()AsLong
PublicDeclareFunctionGetDCLib"user32"(ByValhwndAsLong)AsLong
PublicDeclareFunctionBitBltLib"gdi32"_
(ByValhDestDCAsLong,_
ByValxAsLong,_
ByValyAsLong,_
ByValnWidthAsLong,_
ByValnHeightAsLong,_
ByValhSrcDCAsLong,_
ByValxSrcAsLong,_
ByValySrcAsLong,_
ByValdwRopAsLong)AsLong

PrivateSubForm_Load()
DimlDesktopAsLong
DimlDCAsLong
Form1.AutoRedraw=True
Form1.ScaleMode=1
lDesktop=GetDesktopWindow()'取得桌面窗口
lDC=GetDC(lDesktop)'取得桌面窗口的设备场景
BitBltMe.hDC,0,0,Screen.Width,Screen.Height,lDC,0,0,vbSrcCopy'将桌面图象绘制到窗体
EndSub->


'ReturningIPConfigurationData
'WMIscriptthatreturnsconfigurationdatasimilartothatreturnedbyIpConfig.
strComputer="."
SetobjWMIService=GetObject("winmgmts:\"&strComputer&"\root\cimv2")
SetcolAdapters=objWMIService.ExecQuery_
("SELECT*FROMWin32_NetworkAdapterConfigurationWHEREIPEnabled=True")
n=1
WScript.Echo
ForEachobjAdapterincolAdapters
WScript.Echo"NetworkAdapter"&n
WScript.Echo"================="
WScript.Echo"Description:"&objAdapter.Description
WScript.Echo"Physical(MAC)address:"&objAdapter.MACAddress
WScript.Echo"Hostname:"&objAdapter.DNSHostName
IfNotIsNull(objAdapter.IPAddress)Then
Fori=0ToUBound(objAdapter.IPAddress)
WScript.Echo"IPaddress:"&objAdapter.IPAddress(i)
Next
EndIf
IfNotIsNull(objAdapter.IPSubnet)Then
Fori=0ToUBound(objAdapter.IPSubnet)
WScript.Echo"Subnet:"&objAdapter.IPSubnet(i)
Next
EndIf
IfNotIsNull(objAdapter.DefaultIPGateway)Then
Fori=0ToUBound(objAdapter.DefaultIPGateway)
WScript.Echo"Defaultgateway:"&objAdapter.DefaultIPGateway(i)
Next
EndIf
WScript.Echo
WScript.Echo"DNS"
WScript.Echo"---"
WScript.Echo"DNSserversinsearchorder:"
IfNotIsNull(objAdapter.DNSServerSearchOrder)Then
Fori=0ToUBound(objAdapter.DNSServerSearchOrder)
WScript.Echo""&objAdapter.DNSServerSearchOrder(i)
Next
EndIf
WScript.Echo"DNSdomain:"&objAdapter.DNSDomain
IfNotIsNull(objAdapter.DNSDomainSuffixSearchOrder)Then
Fori=0ToUBound(objAdapter.DNSDomainSuffixSearchOrder)
WScript.Echo"DNSsuffixsearchlist:"&objAdapter.DNSDomainSuffixSearchOrder(i)
Next
EndIf
WScript.Echo
WScript.Echo"DHCP"
WScript.Echo"----"
WScript.Echo"DHCPenabled:"&objAdapter.DHCPEnabled
WScript.Echo"DHCPserver:"&objAdapter.DHCPServer
IfNotIsNull(objAdapter.DHCPLeaseObtained)Then
utcLeaseObtained=objAdapter.DHCPLeaseObtained
strLeaseObtained=WMIDateStringToDate(utcLeaseObtained)
Else
strLeaseObtained=""
EndIf
WScript.Echo"DHCPleaseobtained:"&strLeaseObtained
IfNotIsNull(objAdapter.DHCPLeaseExpires)Then
utcLeaseExpires=objAdapter.DHCPLeaseExpires
strLeaseExpires=WMIDateStringToDate(utcLeaseExpires)
Else
strLeaseExpires=""
EndIf
WScript.Echo"DHCPleaseexpires:"&strLeaseExpires
WScript.Echo
WScript.Echo"WINS"
WScript.Echo"----"
WScript.Echo"PrimaryWINSserver:"&objAdapter.WINSPrimaryServer
WScript.Echo"SecondaryWINSserver:"&objAdapter.WINSSecondaryServer
WScript.Echo
n=n+1
Next
FunctionWMIDateStringToDate(utcDate)
WMIDateStringToDate=CDate(Mid(utcDate,5,2)&"/"&_
Mid(utcDate,7,2)&"/"&_
Left(utcDate,4)&""&_
Mid(utcDate,9,2)&":"&_
Mid(utcDate,11,2)&":"&_
Mid(utcDate,13,2))
EndFunction
VisualBasic的每一个窗体和控件都有一个预定义的事件集

请先使用算号器算出匹配当前Windows的序列号,复制并粘贴到下面空格中

----此函数返回值是指向项目(ITEM)的一个指针,有了这个数值,再用API函数SHGetPathFromIDList可以获得具体的路径,如果用户按的是“取消”按钮,则返回值为NULL

可你打开D盘看看,是这样的吗?都是“本地磁盘(D:)”卡组这也造成了理解上的困难,所以我想为什么我不能写一个给中国人看到VB教程呢,于是我这么做了
''owc.vbs
class owc
private o
'传入物件
public property set set_obj(o_id)
set o=o_id
end property
'画图矩形图
'chart_bgcolor_图表的背景颜色
'chartCaption_图表的标题
'chartCaption_fontColor_图表标题颜色
'Interior_Color_矩形内的填充颜色
'Caption_名称
'categories_名称数组
'values_值数组串
public sub bar(chart_bgcolor_,chartCaption_,chartCaption_fontColor_,Interior_Color_,Caption_,categories_,values_)
o.Clear
set cht=o.Charts.Add
set c=o.Constants
cht.Type=c.chChartTypeColumnClustered
'设背景色或是填充
o.Charts(0).PlotArea.Interior.SetSolid chart_bgcolor_

'加上图表的标题
o.HasChartSpaceTitle=True
set cst=o.ChartSpaceTitle
cst.Caption=chartCaption_
cst.Font.Color=chartCaption_fontColor_
cst.Font.Italic=False
cst.Font.Name="Arial"
cst.Font.Size=12
cst.Font.Underline=c.owcUnderlineStyleSingle

'添加数据
cht.SetData c.chDimCategories, c.chDataLiteral, categories_
cht.SeriesCollection(0).SetData c.chDimValues, c.chDataLiteral, values_
'直条的背景色进行设定
set sc=o.Charts(0).SeriesCollection(0)
sc.Interior.Color=Interior_Color_

'直条上的显示设置
sc.Caption=Caption_
set dl=cht.SeriesCollection(0).DataLabelsCollection.Add
dl.HasValue=True
dl.HasPercentage=False
dl.Font.Size=9
dl.Font.Color="red"
dl.Position=c.chLegendPositionRight
dl.NumberFormat="00.00%"
'左边百分比的属性设置
Set cta=cht.Axes(c.chAxisPositionLeft)
cta.Font.Size=9
cta.NumberFormat="0.0%"
cta.MajorUnit=0.1
end sub
'多系列矩形图
'chart_bgColor_图表的背景颜色
'chartCaption_图表的标题
'chartCaption_fontColor_图表标题颜色
'color_颜色数组
'caption_名称数组
'categories_名称数组
'values_值数组
public sub serBar(chart_bgColor_,chartCaption_,chartCaption_fontColor_,color_,caption_,categories_,values_)
o.Clear
o.Charts.Add
Set c=o.Constants
'图表的类型
o.Charts(0).type=c.chChartTypeColumnClustered
'给绘图区加背景色
o.Charts(0).PlotArea.Interior.SetSolid chart_bgColor_
''加上图表的标题
o.HasChartSpaceTitle=True
o.ChartSpaceTitle.Caption=chartCaption_
'标题的属性
o.ChartSpaceTitle.Font.Color=chartCaption_fontColor_
o.ChartSpaceTitle.Font.Italic=False
o.ChartSpaceTitle.Font.Name="Arial"
o.ChartSpaceTitle.Font.Size=12
o.ChartSpaceTitle.Font.Underline=c.owcUnderlineStyleSingle
'用循环来新增SeriesCollection以及里面的内容
for i=0 to ubound(caption_)
valuetemp=""
for j=i*(ubound(categories_)+1) to (i+1)*(ubound(categories_)+1)-1
valuetemp=valuetemp & "," & values_(j)
next
valuearr=split(mid(valuetemp,2),",")
o.Charts(0).SeriesCollection.Add
o.Charts(0).SeriesCollection(i).Caption=caption_(i)
o.Charts(0).SeriesCollection(i).Interior.Color=color_(i)
o.Charts(0).SeriesCollection(i).SetData c.chDimCategories, c.chDataLiteral, categories_
o.Charts(0).SeriesCollection(i).SetData c.chDimValues, c.chDataLiteral, valuearr
set dl=o.Charts(0).SeriesCollection(i).DataLabelsCollection.Add
dl.HasValue=True
dl.HasPercentage=False
dl.Font.Size=9
dl.Font.Color="red"
dl.Position=c.chLegendPositionRight
dl.NumberFormat="00.00%"
next
''图例的设定
o.Charts(0).HasLegend=True
o.Charts(0).Legend.Font.Size=9
o.Charts(0).Legend.Position=c.chLegendPositionBottom
''左边百分比的属性设置
Set cta=o.Charts(0).Axes(c.chAxisPositionLeft)
cta.Font.Size=9
cta.NumberFormat="0.00%"
cta.MajorUnit=0.1
end sub
'画圆饼图
'chart_bgColor_绘图区加背景色
'chartCaption_图表的标题
'chartCaption_fontColor_图表标题颜色
public sub Pie(chart_bgColor_,chartCaption_,chartCaption_fontColor_,Caption_,categories_,values_)
o.Clear
Set cht=o.Charts.Add
Set c=o.Constants
cht.Type=c.chChartTypePie3d
'给绘图区加背景色
o.Charts(0).PlotArea.Interior.SetSolid chart_bgColor_
cht.ExtrudeAngle=90
cht.ChartDepth=169
cht.AspectRatio=120
cht.Rotation=180
cht.Inclination=70

o.HasChartSpaceTitle=True
o.ChartSpaceTitle.Caption=chartCaption_
o.ChartSpaceTitle.Font.Color=chartCaption_fontColor_
o.ChartSpaceTitle.Font.Name="Arial"
o.ChartSpaceTitle.Font.Size=12
o.ChartSpaceTitle.Font.Underline=c.owcUnderlineStyleSingle

cht.HasLegend=True
cht.Legend.Font.Size=9
cht.Legend.Position=c.chLegendPositionBottom

cht.SetData c.chDimCategories, c.chDataLiteral, categories_
cht.SeriesCollection(0).SetData c.chDimValues, c.chDataLiteral, values_
set sc=o.Charts(0).SeriesCollection(0)
sc.Caption=Caption_
Set dl=cht.SeriesCollection(0).DataLabelsCollection.Add
dl.Separator=":"
dl.HasValue=false
dl.HasSeriesName=false
dl.HasCategoryName=true
dl.HasPercentage=true
dl.Font.Size=9
dl.Font.Color="red"
dl.NumberFormat="00.00%"
end sub
'拆线图
'chart_bgColor_绘图区加背景色
'chartCaption_图表的标题
'chartCaption_fontColor_图表标题颜色
public sub line(chart_bgColor_,chartCaption_,chartCaption_fontColor_,Caption_,categories_,values_)
o.Clear
Set cht=o.Charts.Add
Set c=o.Constants
cht.Type=c.chChartTypeLineMarkers
'给绘图区加背景色
o.Charts(0).PlotArea.Interior.SetSolid chart_bgColor_
o.HasChartSpaceTitle=True
o.ChartSpaceTitle.Caption=chartCaption_
o.ChartSpaceTitle.Font.Color=chartCaption_fontColor_
o.ChartSpaceTitle.Font.Name="Arial"
o.ChartSpaceTitle.Font.Size=12
o.ChartSpaceTitle.Font.Underline=c.owcUnderlineStyleSingle

cht.SetData c.chDimCategories, c.chDataLiteral, categories_
cht.SeriesCollection(0).SetData c.chDimValues, c.chDataLiteral, values_

set sc=o.Charts(0).SeriesCollection(0)
sc.Caption=Caption_
Set dl=cht.SeriesCollection(0).DataLabelsCollection.Add
dl.HasValue=True
dl.HasPercentage=False
dl.Font.Size=9
dl.Font.Color="red"

Set categoryAxis=cht.Axes(c.chAxisPositionBottom)
categoryAxis.Font.Size=9

Set categoryAxis=cht.Axes(c.chAxisPositionLeft)
categoryAxis.Font.Size=9
end sub
'多系列拆线图
'chart_bgColor_图表的背景颜色
'chartCaption_图表的标题
'chartCaption_fontColor_图表标题颜色
'color_颜色数组
'caption_名称数组
'categories_名称数组
'values_值数组
public sub serLine(chart_bgColor_,chartCaption_,chartCaption_fontColor_,color_,SeriesNames_,categories_,values_)
o.Clear
Set cht=o.Charts.Add
Set c=o.Constants
'设置图表类型
cht.Type=c.chChartTypeLineMarkers
'给绘图区加背景色
o.Charts(0).PlotArea.Interior.Color=chart_bgColor_
'加上标题
o.HasChartSpaceTitle=True
o.ChartSpaceTitle.Caption=chartCaption_
o.ChartSpaceTitle.Font.Color=chartCaption_fontColor_
o.ChartSpaceTitle.Font.Name="Arial"
o.ChartSpaceTitle.Font.Size=12
''添加数据
cht.SetData c.chDimSeriesNames, c.chDataLiteral, SeriesNames_
cht.SetData c.chDimCategories, c.chDataLiteral, Categories_

set categoryAxis=cht.Axes(c.chAxisPositionBottom)
categoryAxis.Font.Size=9

Set categoryAxis=cht.Axes(c.chAxisPositionLeft)
categoryAxis.Font.Size=9

for i=0 to ubound(SeriesNames_)
valuetemp=""
for j=i*(ubound(Categories_)+1) to (i+1)*(ubound(Categories_)+1)-1
valuetemp=valuetemp & "," & values_(j)
next
valuearr=split(mid(valuetemp,2),",")
cht.SeriesCollection(i).SetData c.chDimValues, c.chDataLiteral, valuearr
cht.SeriesCollection(i).Line.Color=color_(i)
cht.SeriesCollection(i).Line.Weight=c.owcLineWeightThin
cht.SeriesCollection(i).Marker.Style=c.chMarkerStyleDiamond
cht.SeriesCollection(i).Interior.Color=color_(i)
Set dl=cht.SeriesCollection(i).DataLabelsCollection.Add
dl.HasValue=true
dl.HasPercentage=false
dl.Font.Size=9
dl.font.color="red"
next
end sub
'清除图型
public sub clear()
o.Clear
end sub
end class

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