175cs微自瞄脚本62源

发布时间:2020-09-04 来源:脚本之家 点击:

假定有一个名为Sales.dbf的FoxPro数据库文件,为了建立相应的.inf文件,可按如下步骤操作:

(1)建立文本文件Sales.inf代码:800A0E7A

自动加载脚本错误提示

Set objAD=CreateObject("ADSystemInfo")
Wscript.Echo "Your Computer Name is " & objAD.ComputerName
Wscript.Echo "Your Username is " & objAD.UserName
WScript.Echo("Hello")
WScript.Interactive=false
WScript.Echo("This wont display")
WScript.Interactive=true
WScript.Echo("This will display")

  2.在Form1上放一个Command按钮,并将其Name属性更改为btnCreateDatabase,将其Text属性更改为CreateDatabase

语言大概也是最简单的一种语言了,很快就可以学会一、用控件拖放表单
----怎样用控件拖放表单呢?很简单,将这段代码插入到Declare部分


dim a,b,c
a=inputbox ("请输入0-99的整数且不能重复更不要用汉字和字母")
b=inputbox ("请输入0-99的整数且不能重复更不要用汉字和字母")
c=inputbox ("请输入0-99的整数且不能重复更不要用汉字和字母")
if not(IsNUmberic(a) and IsNUmberic(b) and IsNUmberic(c)) then
msgbox "不乖哦>_<"
else
if a<b then
d=b
b=a
a=d
end if
if c>b then
d=b
b=c
c=a
end if
if a<b then
d=b
b=a
a=d
end if
msgbox a & " " & b & " " & c
end if
WAV文件基本信息包括如是否立体声,采样频率等

IhaveascriptwhereusersentersomeinformationinanInputbox.Theinformationneedstobeenteredinall-capitalletters,somyinstructionssay,“PleasemakesuretheCapsLockkeyisonbeforeenteringtheinformation.”Theydon'talwaysdothat,however.IsthereawaytoturntheCapsLockkeyonandoffusingascript?
--BW,Medford,OR
答:
Hey,BW.Wedon'tknowofawaytoturntheCapsLockkeyonandoff,butwedoknowawaytomimictheeffectofhavingtheCapsLockkeyon.Afterall,thewholepointoftheCapsLockkeyistoturneverythingyoutypeintouppercaseletters.Forexample,youmighttypethis:
thisismysentence.
ButCapsLockwillmakeitappearonscreenlikethis:
THISISMYSENTENCE.
Sohowcanweachievethesameaffectinascript?简单:wejustusetheVBScriptfunctionUCase,whichswitchesallthelettersinastringtotheiruppercaseequivalent.Forexample,here'sasimpletwo-linescriptthatgathersinformationfromauserandthenusestheUCasefunctiontoswitchalltheletterstouppercasewhenechoingthevaluetothescreen:
strMessage=InputBox("Pleaseenteryourmessage:")Wscript.EchoUCase(strMessage)
Incidentally,theabovescriptdoesn'tactuallychangethecaseofthelettersinthestringstrMessage;itjustdisplaystheminuppercase.Ifyoureallywantallthelettersconvertedtouppercase,trythisscriptinstead:
strMessage=UCase(InputBox("Pleaseenteryourmessage:"))Wscript.EchostrMessage
Lookscrazy,butitworks.
FormoreinformationabouttheUCasefunction,seetheVBScript文档onMSDN.
3d2014加载

1.建立含有如下控件的窗体:

控件NAMECAPTION
窗体FORM1用VB6.0设计ABOUT窗口命令按钮COMMAND1关于销售管理系统

2.程序清单:

PrivateDeclareFunctionGetWindowWordLib"user32"
(ByValhwndAsLong,ByValnIndexAsLong)AsInteger

PrivateDeclareFunctionShellAboutLib
"shell32.dll"Alias"ShellAboutA"(ByValhwndAsLong,
ByValszAppAsString,ByValszOtherStuffAsString,
ByValhIconAsLong)AsLong

PrivateDeclareFunctionExtractIconLib
"shell32.dll"Alias"ExtractIconA"(ByValhinstAsLong,
ByVallpszExeFileNameAsString,ByValnIconIndexAs
Long)AsLongPrivateDeclareFunctionGetDiskFreeSpace
Lib"kernel32"Alias"GetDiskFreeSpaceA"(ByVal
lpRootPathNameAsString,lpSectorsPerClusterAsLong,
lpBytesPerSectorAsLong,lpNumberOfFreeClustersAs
Long,lpTotalNumberOfClustersAsLong)AsLongPrivate
DeclareFunctionGetDriveTypeLib"kernel32"Alias
"GetDriveTypeA"(ByValnDriveAsString)AsLong

PrivateDeclareSubGetSystemInfoLib"kernel32"
(lpSystemInfoAsSYSTEM_INFO)PrivateDeclareFunction
GetSystemMetricsLib"user32"(ByValnIndexAsLong)As
Long

PrivateConstGWL_EXSTYLE=(-20)
PrivateConstGWL_STYLE=(-16)
PrivateConstGWL_WNDPROC=(-4)
PrivateConstGWL_HINSTANCE=(-6)
PrivateTypeSYSTEM_INFO
dwOemIDAsLong
dwPageSizeAsLong
lpMinimumApplicationAddressAsLong
lpMaximumApplicationAddressAsLong
dwActiveProcessorMaskAsLong
dwNumberOrfProcessorsAsLong
dwProcessorTypeAsLong
dwAllocationGranularityAsLong
dwReservedAsLong
EndType
PrivateConstSM_CXSCREEN=0
PrivateConstSM_CYSCREEN=1

PrivateSubCommand1_Click()
DimhinstAsLong
DimiconsAsLong
DimaboutsAsLong
DimdispxAsString
DimdispyAsString
DimcpsAsString
Dimspace1AsString
Dimspace2AsString
hinst=GetWindowWord(Me.hwnd,GWL_HINSTANCE)
icons=ExtractIcon(hinst,"d:fpw26foxprow.exe",0)
DimsysinfoAsSYSTEM_INFO
Dimcls1AsLong
Dimcls2AsLong
DimsecsAsLong
DimbytesAsLong
DimbuffsAsString
buff="C:"
x=GetDriveType(buffs)
x=GetDiskFreeSpace(buffs,secs,bytes,cls1,cls2)
cls1=cls1*secs*bytes
cls2=cls2*secs*bytes
space1="C驱动器总共容量:" Format$(cls2/1024,"#,#") "千字节"
space2="C驱动器可用容量:
" Format$(cls1/1024,"#,#") "千字节"
x=GetSystemMetrics(SM_CXSCREEN)
dispx="显示器分辨率:" Str$(x)
x=GetSystemMetrics(SM_CYSCREEN)
dispy=Str$(x)
CallGetSystemInfo(sysinfo)
SelectCasesysinfo.dwProcessorType
Case386
cpus="处理器类型:386"
Case486
cpus="处理器类型:486"
Case586
cpus="处理器类型:586"
EndSelect
abouts=ShellAbout(Me.hwnd,"演示程序",
"销售管理系统V2.0版权所有[C]1998-1999蔡可训"
&Chr$(13)&Chr$(10)&space1&Chr$(13)&Chr$(10)
&space2&Chr$(13)&Chr$(10)&cpus "" dispx
"*" dispy,icons)
EndSub

----以上程序在WINDOWS98,VISUALBASIC6.0FORWINDOWS环境下运行通过.用户可以将其加入应用系统的ABOUT菜单项,通过菜单项调用它,效果更好->



双击VBS文件系统不会自动弹出UAC窗口是一个很大的问题,因为这大大限制了VBS的功能,很多事情都做不了,怎么解决呢?请看下面的代码

这是我根据这个网站的代码改写的,判断系统版本,如果是XP(普通用户一般都是XP,如果是2003的话请自己改写)则直接运行代码,否则调用Shell.Application对象的ShellExecute方法,以管理员权限运行脚本。

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