Jump to content
Sign in to follow this  
mattw112

VBScript convert help

Recommended Posts

mattw112

I'm not sure I understand how to convert this part of a vbscript I have...

SMSCILocalizedProperties.Description = "Test Description"
SMSCILocalizedProperties.DisplayName = "Test Display Name"
SMSCILocalizedProperties.InformativeURL = "http://www.yahoo.com"
SMSCILocalizedProperties.LocaleID = "1033"

' Create an array to hold the SMS_CI_LocalizedProperties object.
newDescriptionInfo = Array(SMSCILocalizedProperties)

Is this taking the four things listed and putting them in an array called newDescriptionInfo? If so in Autoit wouldn't I just do something like:

_ArrayAdd($newDescriptionInfo, $SMSCILocalizedProperties.Description = "Test Description" )
_ArrayAdd($newDescriptionInfo, $SMSCILocalizedProperties.DisplayName = "Test Display Name" )
_ArrayAdd($newDescriptionInfo, $SMSCILocalizedProperties.InformativeURL = "http://www.yahoo.com" )
_ArrayAdd($newDescriptionInfo, $SMSCILocalizedProperties.LocaleID = "1033" )

Thanks,

Terry

Share this post


Link to post
Share on other sites
Juvigy

SMSCILocalizedProperties should be an object. You should have created it in the beginning with ObjCreate or ObjGet functions.

Post here the whole vbs script.There is also an VBS to AutoIt converter somewhere around here that can be helpful .

Share this post


Link to post
Share on other sites
mattw112

Hi I'm really just interested in what this specific section is doing, and if my code would be an accurate representation of how to do it in AutoIT. I know about the converter tool, I've tried it several times over the last several years, but never with much luck.

Share this post


Link to post
Share on other sites
trancexx

Hi I'm really just interested in what this specific section is doing, and if my code would be an accurate representation of how to do it in AutoIT. I know about the converter tool, I've tried it several times over the last several years, but never with much luck.

No, it's wrong.

VBS:

newDescriptionInfo = Array(SMSCILocalizedProperties)
AutoIt:

Local $newDescriptionInfo[1] = [$SMSCILocalizedProperties]

But I think that's to dumb to be real.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
mattw112

Thanks,

The four lines above that though, in vbscript are those somehow getting put into that array?

SMSCILocalizedProperties.Description = "Test Description"

SMSCILocalizedProperties.DisplayName = "Test Display Name"

SMSCILocalizedProperties.InformativeURL = "http://www.yahoo.com"

SMSCILocalizedProperties.LocaleID = "1033"

or what are they doing?

Thanks,

Terry

PS - This vbscript is straight from SCCM SDK from Microsoft so might be dumb, but it is real.

Share this post


Link to post
Share on other sites
trancexx

They are for setting properties of that object. My VBS is kinder garden level, so wait for someone else if you want better explanation on that code.

All I see is array with one element - object.

Edited by trancexx

♡♡♡

.

eMyvnE

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.