Jump to content

VBScript convert help


Recommended Posts

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

Link to comment
Share on other sites

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 .

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...