-
QTP调用winrar压缩
2009-12-08 16:36:16
Dim command(3)
command(0)="c:"
command(1)="cd \"
command(2)="cd c:\Program Files\WinRAR"
command(3)="WinRAR a -r -ep1 D:\project\QTP\文档\test.rar D:\project\QTP\文档"
SystemUtil.Run "cmd.exe"
For i=0 to UBound(command)
Window( "object class:=ConsoleWindowClass" ).Type command(i)
Window( "object class:=ConsoleWindowClass" ).Type micReturn
Next -
QTP运行写入日志文件
2009-12-08 16:32:13
Option Explicit
'==========================================================================
' 脚本说明: 写入日志文件
'
' AUTHOR: 孙强
' DATE : 2009-12-8
'
' COMMENT:
'
'==========================================================================
'调用写入日志文件入口
'==========================================================================
'Dim sFoldername,sComtenet
'sFoldername = "D:\temp\"
'sComtenet = "测试脚本调用"
'WriteLog sFoldername,sComtenet
'==========================================================================
' 写入日志文件入口
'==========================================================================
Function WriteLog(sFoldername,sComtenet)
Dim LogTime,sFilename
LogTime = FormatDateTime(Date, 0)&" "&Time&"-------"
sComtenet = LogTime&sComtenet
sFilename = sFoldername&"\QTPlog.txt"
Dim oFSO
'创建文件系统对象
Set FSO = CreateObject ("Scripting.FileSystemObject")
Dim CheckFolderExists,CheckfileExists
'检查日志存放文件夹是否存在
CheckFolderExists = oFSO.FolderExists(sFoldername)
If CheckFolderExists = True Then
'检查日志文件是否存在
CheckfileExists = oFSO.FileExists(sFilename)
If CheckfileExists = True Then
AppendToFile sFilename,sComtenet
Else WriteToFile sFilename,sComtenet
End If
Else CreateFolderDemo sFoldername
WriteToFile sFilename,sComtenet
End If
End Function
'==========================================================================
' 追加Log文件
'==========================================================================
Function AppendToFile(sFilename, sComtenet)
Dim fso,OpenFile
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Set fso = CreateObject("Scripting.FileSystemObject")
Set penFile = fso.OpenTextFile(sFilename, ForAppending, True)
OpenFile.WriteLine(sComtenet)
OpenFile.Close
End Function
'==========================================================================
'写入Log文件
'==========================================================================
Function WriteToFile(sFilename, sComtenet)
Dim fso,CreateFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set CreateFile = fso.CreateTextFile(sFilename, True)
CreateFile.WriteLine(sComtenet)
CreateFile.Close
End Function
'==========================================================================
'创建文件夹
'==========================================================================
Function CreateFolderDemo(sFlodername)
Dim fso, f
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateFolder(sFlodername)
End Function -
QTP批量执行并发邮件
2009-12-08 16:29:04
Option Explicit
'*****************************************************************
'脚本说明:公共变量声明,路径根据实际环境修改
'*****************************************************************
Dim ReportLocation '报告存放路径
ReportLocation = "D:\project\QTP\qtpscript\"
Dim QtpLocation 'Qtp安装路径
QtpLocation = "D:\softwaretesting\Mercury Interactive\QuickTest Professional\bin\QTPro.exe"
'*****************************************************************
'脚本说明:启动QTP
'*****************************************************************
Dim WshShell,oExec
set WshShell = WScript.CreateObject("WScript.Shell")
Set Exec = WshShell.Exec (QtpLocation)
Set WshShell = Nothing
WScript.Sleep 60000 '等待1分钟
'*****************************************************************
'脚本说明:判断文件是否存在,存在删除
'*****************************************************************
Dim oFSO
' 创建一个文件系统对象
set FSO = CreateObject ("Scripting.FileSystemObject")
CheckFileExists(ReportLocation)
Function CheckFileExists (FilePath)
FilePath = FilePath &"测试结果1.html"
' 检查文件是否存在,如果存在删除
CheckFileExists = oFSO.FileExists(FilePath)
'MsgBox CheckFileExists
If (CheckFileExists = true) Then
oFSO.DeleteFile (FilePath)
End if
End Function'*****************************************************************
'脚本说明:批量执行脚本并生成摘要报告
'*****************************************************************
Dim oMTM
' 创建 Multi Test Manager 对象
Set MTM = CreateObject("MultiTestManager.Application")
oMTM.Visible = True' 修改运行时的默认设置
Dim oRunSettings
Set RunSettings = oMTM.Preferences.RunSettings
oRunSettings.Iterations = 1
oRunSettings.CloseQuickTest = True
'打开注释启用定时调度
'oRunSettings.ScheduleRun = True
'oRunSettings.Day = 3
'oRunSettings.Month = 12
'oRunSettings.Year = 2009
'oRunSettings.Second = 00
'oRunSettings.Minute = 55
'oRunSettings.Hour = 15
' 修改报告的默认设置
Dim oReportSettings
Set ReportSettings = oMTM.Preferences.ReportSettings
oReportSettings.CreateReport = True
oReportSettings.OverwriteReport = False
oReportSettings.DefaultLocation = False
oReportSettings.ReportLocation = ReportLocation '报告存放路径
oReportSettings.ReportName = "测试结果"
oReportSettings.ViewReport = True
'批量执行脚本:脚本的目录,是否执行,执行结果存放位置
oMTM.AddTestScript. "D:\project\QTP\qtpscript\rarTest", True,ReportLocation
'oMTM.AddTestScript. "D:\project\QTP\qtpscript\rarTest", True,ReportLocation 根据脚本进行添加' 运行脚本
oMTM.Run
while ( oMTM.IsRunning )
Wend
oMTM.Quit
Set RunSettings = Nothing
Set ReportSettings = Nothing
Set MTM = Nothing'*****************************************************************
'脚本说明:将运行结果发送邮件
'*****************************************************************
Dim SendTo, Subject, Body, Attachment
'SendTo ="test@163.com;test1@163.com" '发送多个邮箱以分号分割
SendTo ="test@163.com"
Subject ="自动化测试结果"
Body ="自动化测试结果"
Attachment =ReportLocation&"测试结果1.html"
'SendMail SendTo, Subject, Body, AttachmentFunction SendMail(SendTo, Subject, Body, Attachment)
Dim ol,Mail
Set l=CreateObject("Outlook.Application")
Set Mail=ol.CreateItem(0)
Mail.to=SendTo
Mail.Subject=Subject
Mail.Body=Body
If (Attachment <> "") Then
Mail.Attachments.Add(Attachment)
End If
' Mail.display '邮件显示
Mail.Send
ol.Quit
Set Mail = Nothing
Set l = Nothing
End Function -
庆祝51Testing软件测试网成立五周年
2009-04-28 14:51:44
普天同庆,庆祝51Testing软件测试网成立五周年,他给我很多帮助,让我在测试的海洋里面,自由的遨游,祝愿51Testing,未来越办越好,访问量蒸蒸日上。
51Testing软件测试网:http://www.51testing.com
-
希望大家帮我投票
2009-01-07 13:36:55
帮我投个票啊
http://www.webspherechina.net/club/viewthread.php?tid=6230&page=1&extra=
2. 我和我的朋友WebSphere的小故事 sunqiang1024
,谢谢啊 -
用DOS命令安装删除服务
2008-09-26 17:48:13
安装服务
sc create Svnservice binpath= "d:\subversion\bin\svnserve.exe --service -r E:\projectversion" displayname= "Svnservice" depend= Tcpip删除服务
sc delete Svnservice修改配置
sc config Svnservice binpath= "d:\subversion\bin\svnserve.exe --service -r E:\projectversion" displayname= "Svnservice" depend= Tcpip
设置为自启动
sc config Svnservice start= auto启动服务
net start Svnservice -
QTP将错误信息写到数据库中
2008-09-08 14:42:02
1、在SQL Server中新建数据库QTP,并新建表Q_Message,字段ID,自动增加,字段Message,varchar255
2、在管理工具中新建ODBC的数据源
3、将错误信息存储到数据库中
On Error Resume Next
Dim a,b,c
a=0
b=1
c=b/a
ErrorHandle()Public Function ErrorHandle()
If Err.Number <> 0 ThenDB("Error Num: " & Err.Number & "; Error Src: " & Err.Source & "; Error Desc: " & Err.Descrīption)
End If
End FunctionPublic Function DB (sql)
Dim cmd,aa
aa="INSERT INTO Q_Message(Message) VALUES ('"&sql&"')"
Set cmd=createobject("adodb.command")
cmd.activeconnection="Driver={SQL Server};Server=TJMDCL-SUNQIANG;Uid=sa;Pwd=sa;DATABASE=QTP;"
cmd.CommandType = 1
cmd.CommandText = aa
cmd.Execute()
Set cmd.activeconnection=Nothing
Set cmd=Nothing
End Function -
Linux安装问题一(ftp)
2008-09-03 16:26:43
1、service vsftpd start ,启动ftp服务,即可登录ftp了
2、如果需要root也要登录,需要修改两个配置文件
(1)/etc/vsftpd.user_list
(2)/etc/vsftpd.ftpusers
将里面的root注释掉,然后service vsftpd restart即可
-
Linux安装问题一(telnet)
2008-09-03 15:17:59
今天安装了Linux,当安装完成好后,使用另外一台机器进行telnet登录,提示23端口被拒绝了。
解决办法:
1、直接停止防火墙:service iptables stop
2、在图形界面选择安全级别:将telnet等服务配置进去
3、在/etc/sysconfig/iptables 文件中加入
-A RH-Lokkit-0-50-INPUT -p tcp -m tcp --dport 1521 --syn -j ACCEPT
指定你打开的端口,然后service iptables restart
-
(原创)QTP安装视频教程
2008-08-27 15:00:14
一直没有时间,今天抽空录制了QTP的安装视频教程,和大家分享一下,同时也为那些安装出问题朋友,提供一下参考QTP安装教程http://bbs.51testing.com/thread-108263-1-1.html -
最好用的vbs编辑工具,不信进来看看,o(∩_∩)o...
2008-08-27 11:02:04
最好用的vbs编辑工具,不信进来看看,o(∩_∩)o...
-
LR-调用DLLdemo
2008-08-14 18:00:33
终于在工作之余,做了一个dll的文件,虽然还有很多不完美的地方,但是从中学会了很多东西,使用的是delphi,可见测试真的是个大的海洋,只有自己掌握的足够的知识,才能在测试这个大的海洋中,尽情了享受测试所带了的乐趣。希望自己继续努力,将测试做的心中完美的绿洲。
-
LR-数值转字符
2008-06-11 14:33:19
char filename[1024];
int i=0;
i=i+1;
sprintf (filename, "Value=集团-000%d", i);
lr_output_message("Full path of file is %s", filename); -
中英文职位对照表(转载)
2008-05-28 09:45:59
中英文职位对照表Developmental Educator发展教育家Head Teacher高级教师Foreign Language Teacher外语教师Librarian图书管理员Guidance Counselor指导顾问Music Teacher音乐教师Library Technician图书管理员Nanny保姆Physical Education Teacher物理教师Principal校长School Psychologist心理咨询教师Teacher教师Art Instructor艺术教师Computer Teacher计算机教师College Professor大学教授Coach教练员Vocational Counselor职业顾问Tutor家教、辅导教师Retail Store Manager零售店经理Food Service Manager食品服务经理Executive Marketing Director市场行政总监HMO Administrator医疗保险管理Assistant Vice-President副总裁助理Production Manager生产经理Chief Executive Officer(CEO)首席执行官Property Manager房地产经理Chief Operations Officer(COO)首席运营官Branch Manager部门经理Controller(International)国际监管Claims Examiner主考官Director of Operations运营总监Controller(General)管理员Field Assurance Coordinator土地担保协调员General Manager总经理Hospital Administrator医院管理President总统Import/Export Manager进出口经理Product Manager产品经理Insurance Coordinator保险协调员Project Manager项目经理Inventory Control Manager库存管理经理Regional Manager区域经理Manufacturing Manager制造业经理Vending Manager售买经理Telecommunications Manager电信业经理Vice-President副总裁Transportation Manager运输经理Warehouse Manager仓库经理Art Administrator艺术主任Actor/Actress男演员/女演员Commercial Artist/Instructor商业艺术家Art Director艺术总监Theatrical Director戏剧总监Choreographer舞蹈教练Fashion Designer服装设计师Comedian喜剧演员Film Production Assistant电影摄制助理Dancer舞蹈家Graphic Artist/Designer画家/画面设计师Model模特Interior Designer装饰设计师Musician音乐家Production Coordinator制片协调员Photographer摄影师Production(Tour)Manager制片经理(外景)Visual Artist视觉艺术家Science Writer科学作家Zoologist动物学家Agricultural Scientist农业科学家Astronomer天文学家Chemistry Research Assistant化学研究助理Chemist化学家Forester/Park Ranger森林/公园护林员Forest Scientist林木科学家Laboratory Assistant实验室助理Geologist地质学家Laboratory Technician实验室技师Geophysicist地球物理学家Research Associate研究员Physicist物理学家Marine Biologist海洋生物学家Meteorologist气象学家Sanitation Inspector卫生检查员Wait Person侍应生Customer Service Manager客户服务经理Cashier出纳员Fast Food Worker快餐工Chef厨师Health Club Manager健康俱乐部经理Cosmetologist美容师Hotel Concierge宾馆门房Hotel Manager饭店经理Food Inspector食品检查员Hotel Clerk饭店职员Restaurant Manager餐厅经理Hairstylist发型师Flight Attendant空中服务员Stewardess空中小姐Electronics Engineer电子工程师Chemical Engineer化学工程师Environmental Engineer环境工程师Electrical Engineer电力工程师Facilities Engineer设备工程师Field Engineer施工工程师Manufacturing Engineer制造业工程师Nuclear Engineer核能工程师Mechanical Engineer机械工程师Plastics Engineer整形工程师Assistant Editor编辑助理Associate Editor助理编辑Broadcast Producer广播制作人Author作家Editorial Director编辑主任Columnist专栏作家Managing Editor执行编辑Correspondent通讯记者Production Editor制作编辑Editor编辑Public Relations公共关系Events Planner活动策划Public Relations Assistant公共关系助理Journalist新闻记者Radio Announcer电台播音员Proofreader校对Radio Program Director广播节目总监Publicist广告员Symposium Coordinator研讨会协调员Reporter记者Television Director电视导演Translator翻译员Television Producer电视制片人Typesetter排字工人Television Production Engineer电视制片工程师Writer作者Clinical Director医疗主任Cardiologist心脏病专家Fitness Instructor健美师Home Health Aide家庭护理Hospital Supervisor医院管理员Nurse护士Medical Technologist医疗专家Nursing Supervisor护士长Nursing Administrator看护员Nutritionist营养学家Veterinary Assistant助理兽医Pharmacist药学师Pharmacy Technician药品技师Psychiatrist精神病医师Physical Therapist理疗师Surgeon外科医生Respiratory Therapist有氧治疗师Pediatrician儿科医生Speech Pathologist语言心理学家Applications Programmer应用软件程序员Computer Operator电脑操作员Computer Operations Supervisor电脑操作主管Hardware Engineer硬件工程师Computer Technician电脑技术员MIS Manager电脑部经理Developmental Engineer开发工程师Operations Analyst操作分析Director of Information Services信息服务主管Project Manager项目经理LAN Administrator局域网管理员Systems Analyst系统分析Manager of Network Administration网络管理经理Systems Engineer系统工程师Product Support Manager产品支持经理Systems Programmer系统程序员Police Officer警员Fire Fighter消防员Police Sergeant警官Guard保卫Assistant Attorney General首席检察官助理Law Clerk法律职员Attorney律师Vice-President of Sales销售副总裁Wholesale Buyer批发采购员Vice-President of Marketing市场副总裁Travel Agent旅行代办员Senior Account Manager高级客户经理Telemarketing Director电话销售总监Sales Administrator销售主管Telemarketer电话销售员Regional Sales Manager地区销售经理Tele-Interviewer电话调查员Regional Account Manager地区客户经理Salesperson销售员Real Estate Appraiser房地产评估师Sales Representative销售代表Merchandising Manager采购经理Sales Manager销售经理Marketing Consultant市场顾问Sales Executive销售执行者Marketing Assistant市场助理Sales Assistant销售助理Marketing and Sales Director市场与销售总监Retail Buyer零售采购员Market Research Analyst市场调查分析员Real Estate Manager房地产经理Manufacturer’s Representative厂家代表Real Estate Broker房地产经纪人Director of Subsidiary Rights分公司权利总监Purchasing Agent采购代理Callback Representative复查代表Product Developer产品开发Assistant Account Executive客户管理助理Marketing Manager市场经理Advertising Manager广告经理Marketing Intern市场实习Advertising Coordinator广告协调员Marketing Director市场总监Advertising Assistant广告助理Insurance Agent保险代理人Ad Copywriter(Direct Mail)广告文撰写人Account Manager客户经理Account Representative客户代表Accounting Payable Clerk应付帐款文员Accounting Assistant会计助理Assistant Portfolio Manager组合基金经理助理Accounting Manager会计经理Accounts Receivable Clerk应收帐款文员Accounting Clerk会计文员Certified Public Accountant注册会计师Senior Accoutant高级会计Chief Financial Officer首席财务官Audit Manager审计经理Collections Officer收款负责人Actuarial Anaylst保险分析员Insurance Underwriter保险承销商Auditor审计师Bank Administrator银行事务管理员Junior Accountant初级会计Loan Administrator贷款管理员Bank Treasurer资金调拨Management Accountant管理会计Billing Clerk票据文员Mortgage Underwriter抵抻保险员Billing Supervisor票据管理员Payroll Manager工资经理Bookkeeper档案管理Staff Auditor审计员Bookkeeping Clerk档案管理助理Stock Broker股票经纪人Budget Analyst预算分析Tax Accountant税务会计Credit Analyst信用分析Tax Inspector税务检查员Credit Manager信用管理经理Vice-President of Administration and Finance财务行政副总裁Financial Analyst财务分析Vice-President of Finance财务副总裁Financial Consultant财务顾问Loan Servicer贷款服务Financial Manager财务经理Financial Planner财务计划员Bank Clerk银行出纳Assistant Personnel Officer人事助理Benefits Coordinator员工福利协调员Assistant Vice-President of Human Resources人力资源副总裁助理Compensation Manager薪酬经理Director of Human Resources人力资源总监Employment Consultant招募顾问Employer Relations Representative员工关系代表Facility Manager后勤经理Job Placement Officer人员配置专员Personnel Consultant员工顾问Labor Relations Specialist劳动关系专员Personnel Manager职员经理Training Coordinator培训协调员Recruiter招聘人员Vice-President of Human Resources人力资源副总裁Training Specialist培训专员Administrative Director行政主管File Clerk档案管理员Executive Assistant行政助理Office Manager办公室经理Executive Secretary行政秘书Receptionist接待员General Office Clerk办公室文员Secretary秘书Inventory Control Analyst存货控制分析Staff Assistant助理Order Entry Clerk订单输入文员Telephone Operator电话操作员Vice-President of Administration行政副总裁Typist打字员 -
众志成城,万众一心,支持我们的同胞
2008-05-14 13:51:08
现在可以通过短信捐款了,编辑1或2,发送至1069999301,即向“红十字救援行动捐款1或2元”http://info.msn.com.cn/star/24406.shtml,我刚试了,可以,这也是咱们大家的一点点爱心。
献给坚强的中国:
当风雪阻断归路, 我们彼此取暖!
当主权面对挑战, 我们亮出利剑!
当圣火遭遇屈辱, 我们义无反顾!
当病毒吞噬生命, 我们用爱弥补!
当列车冲出轨道, 我们竭诚互助!
当震撼撕裂大地, 我们开山辟路!
勇敢面对磨难, 挺起中国人的脊梁!
加油,同胞! 加油,中国! -
测试工具下载地址共享
2008-04-23 09:52:22
-
Eclipse启动后,日志查看
2008-04-17 10:27:45
获取方法如有下几种:
(一)窗口 > 显示视图 > 其它 … > PDE 运行时 > 错误日志
此时就会显示出一系列日志内容
如我的日志信息显示如下:
Could not install bundle lomboz/eclipse/plugins/org.eclipse.emf.ecore.sdo.editor_2.1.0.jar
Bundle "org.eclipse.emf.ecore.sdo.editor" version "2.1.0" has already been installed from:
update@../Myeclipse/eclipse/plugins/org.eclipse.emf.ecore.sdo.editor_2.1.0/
(二) 帮助 > 关于 Eclipse SDK > 配置详细信息 > 查看错误日志
(三)查找指定的文件
找到你所指定的工作空间 ->.metadata->.log
(四)使用 Eclipse 启动参数
-consolelog,将 Eclipse 平台的错误日志镜像到用来运行 Eclipse 的控制台。(与 -debug 组合时很方便使用。-debug [optionsFile])
将平台置于调试方式,并从给定位置处的文件装入调试选项(如果指定的话)。此文件指示哪些调试点可用于插件以及是否已启用它们。
如果未给出文件位置,则平台在启动 eclipse 的目录中查找称为 ".options" 的文件。 URL 和文件系统路径都可作为文件位置。 )在启动 eclipse 的同时会把错误日志显示在 shell/command 窗口中.
-
执行windows脚本宿主的权限(转载)
2008-04-15 10:44:53
对于开机提示"在该机执行windows脚本的权限.请与管理员联系"的 解决方法
首先检查系统是否使用了脚本的权限,既打开"internet选项"的"安全"选项卡里"字定义"级别",看看"active空件及服务"禁用的选项.
接着运行 regsvr32 scrrun,dll
最后关键的一不就是看看注册表的位置HKEYp_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDEONS scrīpt HOST\SETTINGS
在有边的窗中是不是有个名为ENABLED的DWORD键直,有的话把它删除或者把值该为1即可
-
42条值得一生珍藏的英文格言(转载)
2008-04-08 09:32:20
1、A contented mind is the greatest blessing a man can enjoy in this world.
知足是人生在世最大的幸事。
-Joseph Addison(美国作家艾迪生)
2、If you would know the value of money, go and try to borrow some.
要想知道钱的价值,就想办法去借钱试试。
-Benjamin Franklin(美国总统富兰克林)
3、If you wish to succeed, you should use persistence as your good friend,
experience as your reference, prudence as your brother and hope as your sentry.
如果你希望成功,当以恒心为良友,以经验为参谋,以谨慎为兄弟,以希望为哨兵。
-Thomas Edison(美国发明家爱迪生)
4、Health is certainly more valuable than money,
because it is by health that money is procured.
健康当然比金钱更为重要,因为我们所赖以获得金钱的就是健康。
-Samuel Johnson(英国作家约翰逊)
5、That man is the richest whose pleasure are the cheapest.
能处处寻求快乐的人才是最富有的人。
-Henry David Thoreau(美国作家梭罗)
6、Sometimes one pays most for the things one gets for nothing.
有时候一个人为不花钱得到的东西付出的代价最高。
-Albert Einstein(美国科学家爱因斯坦)
7、Will, work and wait are the pyramidal cornerstones for success.
意志、工作和等待是成功的金字塔的基石。
-Louis Pasteur(法国化学家巴斯勒)
8、All the splendor in the world is not worth a good friend.
人世间所有的荣华富贵不如一个好朋友。
-Voltaire(法国思想家伏尔泰)
9、There is a great different between exposure of
the mind and that of the body.
表露思想和展露身体之间存在极大的不同。
-William Hazlitt(英国批评家散文家哈滋里特)
10、To travel hopefully is a better thing than to arrive,
and the true success is to labor.
怀着希望去旅行比抵达目的地更愉快;而真正的成功在于工作。
-Robert Louis Stevenson(英国作家史蒂文森)
11、The greater a man is, the more distasteful is praise and flattery to him.
一个人越伟大,对表扬和奉承就越反感。
-John Burroughs(美国博物学家巴勒斯)
12、I might say that success is won by three things:
first, effort; second, more effort; third, still more effort.
可以说成功要靠三件事才能赢得:努力,努力,再努力。
-Thomas Hardy(英国诗人小说家哈代)
13、Success often depends upon knowing how long it will take to succeed.
成功常常取决于知道需要多久才能成功。
-Charles Montesquieu(法国思想家孟德斯鸠)
14、Only those who have the patience to do simple things
perfectly ever acquire the skill to do difficult things easily.
只有有耐心圆满完成简单工作的人,才能够轻而易举的完成困难的事。
-Friedrich Schiller(德国剧作家诗人席勒)
15、You have to believe in yourself. That's the secret of success.
你必须相信自己,这是成功的关键。
-Charles Chaplin(美国演员卓别林)
16、A man can succeed at almost anything for which
he has unlimited enthusiasm.
无论何事,只要对它有无限的热情你就能取得成功。
-C. M. Schwab(美国实业家施瓦布)
17、The man who has made up his mind to win will never say "impossible".
凡是决心取得胜利的人是从来不说"不可能的"。
-Bonapart Napoleon(法国皇帝拿破仑)
18、Progress is the activity of today and the assurance of tomorrow.
进步是今天的活动,明天的保证。
-Emerson(美国思想家爱默生)
20、Our destiny offers not the cup of despair,
but the chalice of opportunity.
命运给予我们的不是失望之酒,而是机会之杯。
-Richard Nixon(美国总统尼克松)
21、Miracles sometimes occur, but one has to work terribly for them.
奇迹有时候是会发生的,但是你得为之拼命的努力。
-C. Weizmann(爱尔兰总统魏茨曼)
22、It never will rain roses.
When we want to have more roses we must plant trees.
天上不会掉下玫瑰来,如果想要更多的玫瑰,必须自己种植。
-G. Eliot(英国小说家艾略特)
23、If you have great talents, industry will improve them;
if you have but moderate abilities, industry will supply their deficiency.
如果你很有天赋,勤勉会使其更加完善;如果你能力一般,勤勉会补足其缺陷。
-Joshuas Reynolds(美国散文家雷诺兹)
24、Great works are performed not by strength , but by perseverance.
完成伟大的事业不在于体力,而在于坚韧不拔的毅力。
-Samuel Johnson(英国作家和评论家约翰逊)
25、Genius only means hard-working all one's life.
天才只意味着终身不懈的努力。
-Mendeleyev(俄国化学家门捷列耶夫)
26、Few things are impossible in themselves; and it is often for want of will ,
rather than of means, that man fails to succeed.
事情很少又根本做不成的;其所以做不成,与其说是条件不够,不如说是由于决心不够。
-(La Racheforcauld(法国作家罗切福考尔德)
27、Dare and the world always yields.
If it beats you sometimes, dare it again and again and it will succumb.
大胆挑战,世界总会让步。如果有时候你被它打败了,不断地挑战,它总会屈服地。
-W.M Thackeray(英国小说家萨克雷)
28、All that you do, do with your might; t
hings done by halves are never done right.
做一切事情都应尽力而为,半途而废永远不行。
-R.H. Stoddard(美国诗人斯托达德)
29、A man can fail many times,
but he isn't a failure until he begins to blame somebody else.
一个人可以失败多次,但是只要他没有开始责怪旁人,他还不是一个失败者。
-J.Burroughs(美国博物学家巴勒斯)
30、You can tell the ideals of a nation by its advertisements.
从一个国家的广告可以看出这个国家的理想。
-Norman Douglas(英国作家道格拉斯)
31、The only limit to our realization of tomorrow will be our doubts of today.
实现明天理想的唯一障碍是今天的疑虑。
-Franklin Roosevelt(美国总统罗斯福)
32、The man with a new idea is a crank until the idea succeeds.
具有新想法的人在其想法实现之前是个怪人。
-Mark Twain(美国作家马克?吐温)
33、The important thing in life is to have a great aim,
and the determination to attain it.
人生重要的事情是确定一个伟大的目标,并决心实现它。
-Johann Wolfgang von Goethe(德国诗人、剧作家歌德)
34、Most of the trouble in the world is caused by people wanting to be important.
人世间的大多数烦恼都是由那些想成为重要人物的人惹出来的。
-George Eliot(英国小说家艾略特)
35、If you doubt yourself,
then indeed you stand on shaky ground.
如果你怀疑自己,那么你的立足点确实不稳固了。
-Ibsen(挪威剧作家易卜生)
36、Ideal is the beacon. Without ideal,
there is no secure direction; without direction ,there is no life.
理想是指路明灯。没有理想,就没有坚定的方向;
没有方向,就没有生活。 -Leo Tolstory(俄国作家托尔斯泰)
37、Ideal are like the stars --- we never reach them ,
but like mariners , we chart our course by them.
理想犹如天上的星星,我们犹如水手,虽不能达到天上,
但是我们的航程可凭借它指引。
-Carl Schurz(美国政治家舒尔茨)
38、Have an aim in life, or your energies will all be wasted.
人生应该树立目标,否则你的精神会白白浪费。
-R. Peters(美国法学家彼得斯)
39、Don't part with yourxxxs, When they are gone you may still exist,
but you have ceased to live.
不要放弃你的幻想。当幻想没有了以后,你还可以生存,但是你虽生犹死。
-Mark Twain(马克 吐温)
40、Do not, for one repulse,
give up the purpose that you resolved to effect.
不要只因一次失败,就放弃你原来决心想要达到的目的。
-Willian Shakespeare(莎士比亚)
41、Between the ideal and the reality,
Between the motion and the act, Fall the shadow.
理想与现实之间,动机与行为之间,总有一道阴影。
-Thomas Stearns Eliot(T.S.爱略特)
42、A man is not old as long as he is seeking something.
A man is not old until regrets take the place of dreams.
只要有一个人还有所追求,他就没有老。直到后悔取代了梦想,一个人才算老。
-J. Barrymore(巴里穆尔) -
VBScript With 语句
2008-04-07 10:40:35
VBscrīpt With 语句
with 语句对一个对象执行一系列的语句。
with object
statements
end with参数
object必需的部分。可以是一个对象名称,也可以是返回值为对象的一个函数。
statements
必需的部分。将要对 object 执行的一个或多个命令。
说明
with 语句可以用来对指定的对象执行一系列的语句,但不需要重复地说明对象的名称。例如,如果要修改一个对象的多个属性,可以将所有属性赋值语句放在 with 控制结构中,这样对对象的引用就只需要一次,而不是在每个赋值语句中都引用。下面的例子说明如何使用 with 语句对同一个对象的几个属性进行赋值。with mylabel
.height = 2000
.width = 2000
.caption = "这是mylabel"
end with尽管属性操作是使用 with 语句最多的情况,它的用法并不仅限于此。with 块中可以使用任何合法的语句。
注意 一旦进入了 with 块,object是不可改变的。因此,不能使用一个with语句去改变若干对象的值。
可以嵌套使用 with 语句,将一个 with 块写在另一个块中。然而,由于外部的 with 块的成员被内部的 with 块掩盖,无论内部的 with 块要引用外部的 with 块中的某个对象的什么成员,都必须使用完全限定的对象引用。
重点 不要跳入或跳出 with 块。如果执行了 with 块中的语句却没有执行 with 或 end with 语句,结果将引发错误或其他难以预见的行为。
标题搜索
我的存档
数据统计
- 访问量: 54606
- 日志数: 53
- 图片数: 6
- 文件数: 5
- 建立时间: 2006-12-14
- 更新时间: 2009-12-08