Announcement

Collapse
No announcement yet.

Events to run Scripts with args

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Events to run Scripts with args

    I want a script to create a delayed event which runs a script at a specific entry point with a calling argument.

    Can anyone help me with how I do this in HS2?

    The script name doesn't seem to be stored in eventclass property .scripts which is where you could find things in HS1.

    hs.AddAction will let me run a script at the Main entry point with no argument.

    I can't see how to get the extra data in that i need.

    Help please!

    #2
    Perfect - thanks.

    Feel I should have been able to work that out myself!

    Comment


      #3
      What was the solution to adding a paramater to the AddAction "script" call? I have been unsuccessful in figuring this out.
      Regards, Bob

      Comment


        #4
        To add ab action script...

        If I am understanding the question the code would be

        Code:
        [COLOR=SeaGreen]'defines the double quote[/COLOR]
        Dim dQuote As Char = Chr(34)
        [COLOR=SeaGreen]''Defines the Script with a paramamter of stuff[/COLOR]
         Dim myScript As String = "myscript.vb(" & dQuote & "Main" & dQuote & "," & _
                        dQuote & stuff & dQuote & ")"
        [COLOR=SeaGreen]'adds the action[/COLOR]
        hs.AddAction(myEvent.evref, 5, myScript)
        James

        Running HS 3 on Win10 .

        Comment


          #5
          Thanks. I also found that solution in another thread last night. Works like a charm.
          Regards, Bob

          Comment

          Working...
          X