Passing the name of a plugin to a function?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Stobe
    Forum Member
    • Jan 2004
    • 51

    Passing the name of a plugin to a function?

    I want to call a function that will resize a shape plugin. With the below example, how do I setup the argument?

    function MyFunction (shape1name, shape2name)
    yada yada
    end

    And How do I call it with the actual shape's name?

    i.e.
    MyFunction (what_goes_here, what_goes_here);

    Thanks as always!
    Stobe
  • rexzooly
    No longer a forum member
    • Jul 2007
    • 1512

    #2
    function MyFunction (shape1name, shape2name)
    shape1name = ----
    shape2name = ----
    end

    maybe i have kinda forgot so please don't hold me to it code just pees out if
    my ears lol.

    Comment

    • ShadowUK
      No longer a forum member
      • Oct 2007
      • 1321

      #3
      MyFunction("Plugin1", "Plugin2"); -- ?

      Comment

      • Stobe
        Forum Member
        • Jan 2004
        • 51

        #4
        within the function, I wish to manipulate the shape plugin.

        Better example:

        function MyFunction (shape1name, shape2name)
        Plugin.SetSize(shape1name, 30, 30);
        Plugin.SetSize(shape2name, 30, 30);
        end

        with shapes named "shape1" and "shape2", would I call it as

        MyFunction ("shape1", "shape2");

        or

        MyFunction (shape1, shape2);

        ?

        I'm getting weird argument errors so far with what I've tried.

        -Stobe

        Comment

        • rexzooly
          No longer a forum member
          • Jul 2007
          • 1512

          #5
          ya you could also just include the name its self but you could also add more function alaty is the function was smarter to include them or something i don't know been some months since i played with making functions

          Comment

          • Dermot
            Indigo Rose Customer
            • Apr 2004
            • 1790

            #6
            This one

            Code:
            MyFunction ("shape1", "shape2");
            Dermot

            I am so out of here :yes

            Comment

            • Stobe
              Forum Member
              • Jan 2004
              • 51

              #7
              You guys are soooo quick. Thanks!

              I got it working, and my argument error was a darned capitalization type not related to my initial question, aargh!

              Thanks again!
              -stobe

              Comment

              Working...
              X