Forum Discussion

LRuoc's avatar
LRuoc
Contributor
4 years ago

Passing a param value to aqObject.CheckProperty

Hello All

 

New to TC so please forgive the basic question.

 

Function of the script - Software Center-

1) Searches for a installed program on the search bar, eg MS Office

2) When the search is committed, it does a check on the result to confirm it is installed.

 

I would like the script to be able to take different search parameters so it can be reusable however the object it checks for in the results changes depending what you are searching for so I am trying to pass over a value within "aqObject.CheckProperty" from a param file but struggling to get it to work. Ive initially been trying it with a variable but with no joy.

 

Can anyone help? See script below.

  • instead of setting 

    vObject = "myaliasstring"

    set 

    vObject = eval(myaliasstring)

     

    Right now you are making vObject a string rather than the object that you want.

     

     

    • LRuoc's avatar
      LRuoc
      Contributor

      Fantastic, that has set me on the right path.

       

      I changed it and its worked.

       

      What I need now is for the script to accept a parameter value and use that as the object. Is that possible?

      • Marsha_R's avatar
        Marsha_R
        Moderator

        I don't believe the script will care about the source of the value as long as it resolves to something that is type object.  Try it and see.