write a program to display the system specifications of
client system with the help of vb script.
Answer / vasanth
Sub Screen_Resolution
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer
& "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * From
Win32_DisplayConfiguration")
For Each objItem in colItems
'msgbox "Name: " & objItem.DeviceName
'msgbox "Color depth: " & objItem.BitsPerPel
'msgbox "Horizontal resolution: " & objItem.PelsWidth
'msgbox "Vertical resolution: " & objItem.PelsHeight
If objItem.PelsWidth <> 1024 Or objItem.PelsHeight <> 768
Then
MsgBox "Current screen resolution is "
&objItem.PelsWidth& " by " &objItem.PelsHeight
MsgBox "Scripts cannnot be executed, We only support 1024
by 768 "
ExitAction()
End if
Next
End Sub
Is This Answer Correct ? | 0 Yes | 0 No |
In the Web page we have a table link, if we click on that link all the contents under that link will be sorted (asscending/Descending). Now i want to check in which order the list is ? for that i need to get the data in to some var How can i get that cells data?
I wrote the vbscript code on notepad i was geeting run time error "object required line 1" my code is set usernameobj=Descriptive.Create() usernameobj( "name").value="Username" set passwordobj=Descriptive.Create() passwordobj("name").value="password" set signinobj=Descriptive.Create() signin("name").value="sigin" browser("gmail").page("gmail").WebEdit("usernameobj").set ("enter username") Browser("gmail").Page("gmail").WebEdit("passwordobj").Setsec ure.Crypt.Encrypt("entr password") browser("gmail").page("gmail").WebButton("siginobj").click pls tell me whats wrong
Why to use option explicit in vb script?
Write a VB Script to count blank Lines in a notepad
Mention when to use function procedures and what are its characteristics?
how to write basic programs in VB Script like addition, multiplication?
Diff between web table ,datatable and data base (QTP)
What is the use of option explicit statement?
What is the main difference between function and sub-procedure?
How can you create an object in vbscript?
Hi, Anybody could tell me What is the script for Reverse of Given number. Ex:236--632. Thanks in Advance..
Can we create Crystal Report object in QTP?If yes then what it is and what are its various properties?