Sign in to follow this  
Followers 0
shiv

how to use ObjCreate with .item in the script

2 posts in this topic

Hi All,

I have spent lot of time on internet to know that how do we use ObjCreate and  .item in our autoit scripts. but no such productive information is found related to both

I have some code which i want to understand

$oSection = ObjCreate('Scripting.Dictionary')
$Section.Add("Action","")
$Section.Add("ConfrmAction","")
$Section.Add("Value","")
$Section.Add("EmailID","")



$Section.Item('Action') = $sAction
$Section.Item('ConfrmAction') = True
$Section.Item('Value') = $sValue
$Section.Item('EmailID') = ''

Well this code might be unclear to you, but the only thing which i want to understand that

1. what is the use of objCreate

2. what .item is doing in the code above.

Beside that if you can please elaborate the concept of using objCreate and .item it would be very helpful . Because in the help file objCreate is not very much of helpful.

Thanks

Share this post


Link to post
Share on other sites



ObjCreate creates a reference to a COM object so you can access the properties and methods.

Looks like item returns a single object by name out of a collection of items.

The description of the dictionary object can be found here.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0