| || |
Multiple commands on the same line
Not sure if people knew this (as no-one uses it in code samples) but you can have multiple commands on one line.
MsgBox "1" : MsgBox "2" : MsgBox "3"
This works for VBScript&WSH, it will work for QTP commands but never seen 2 QTP statements short enough to have on the same line (unless you use with statements) [img]images/icons/wink.gif[/img]
Re: Multiple commands on the same line
Yep. You can even have a conditional statement on one line.
Instead of 5 lines:
If a=b Then
You can have only one
If a=b Then MsgBox "1" Else MsgBox "2"