Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to create alias in vb script how can i create?
please help me
Posted
Comments
psgviscom 6-Mar-12 0:37am    
Are you asking about aliases object

1 solution

 
Share this answer
 
v2
Comments
patilvaibhavrao 6-Mar-12 1:48am    
can u provide 1 example please
psgviscom 6-Mar-12 4:46am    
Here is one example
Sub WindowExistsExample
' Specifies the Alias object
Set AliasObj = Aliases.notepad.dlgFont
' Checks whether the Font window exists
If AliasObj.Exists Then
Log.Message("The Font window exists")
Else
Log.Error("The Font window does not exist.")
End If
End Sub
psgviscom 6-Mar-12 4:47am    
Another example
Sub AliasesExample
' Obtains the object that corresponds to the Notepad main window
Set AliasObj = Aliases.notepad.wndNotepad
' Checks whether the specified window exists
If AliasObj.Exists Then
' Enters text in the Notepad editor
AliasObj.Keys("Hello, world.")
Else
Log.Error("Notepad is not running.")
End If
End Sub

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900