Announcement

Collapse
No announcement yet.

Using Variables -vs- hard coded strings

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Using Variables -vs- hard coded strings

    Christian,

    I love the idea of this plugin! I am able to launch remote web pages, and send text to other computers on the network with no problems.

    Now, the problem

    I am trying to launch a program on another computer and pass that program arguments. This is no problem, if I manually code the message as a STRING. I am having problems trying to get it to work with VARIABLES though. I need this to work in this way as the "args" variable will change constantly.

    Here is what I have tried:
    hs.Plugin("Message Server").MessageExeLink prog, args, "", "Johns-desktop"

    The "Prog" contains: "C:\callers\TimedPicture27.exe"
    the "args" contains "c:\callers\picture.jpg,10,800,600"

    Thus the FULL string I would like set to the client is:
    C:\callers\TimedPicture.exe c:\callers\picture27.jpg,10,800,600

    I have tried every variation of quotes, spaces ect, and just can not get this to work. I hope you can help me get the syntax correct. Thanks!

    Also, while I am asking, what is the command to send the message to all currently connected clients? I know this can be done on the message page, but what is the command for VB scripts to pass.
    Visit My Home Seer Site at:
    www.JohnWPB.com
    Created with LCARS

    #2
    JohnWPB, Christian must be really busy, he is usually very quick to respond. I too am a great fan of this plug-in and will try to help if I can.
    On the building of the string for the program arguments I think this might work
    hs.Plugin("Message Server").MessageExeLink "cstr(prog)&cstr(args)", "", "Johns-desktop" (this one I’m not totally sure on)
    The problem of sending to all clients is a little easier. In most commands for message server the last set of quotes is for the clients. Just leave it null to send to all clients connected. In most of my message server scripts I code this with a variable and do a check routine to determine who has their "message enable" virtual switch on and then build a string to fill the "clients" variable. I posted an example of this in another thread in the message server forum if you need an example. (I’m not sure how to show that link here or I would for you, board rookie here) Hope that helps, Terry

    Comment


      #3
      Terry,

      JohnWPB asked me this by email too and I was waiting the reply.
      It was the cstr() missing the problem.

      Thanks,
      Christian

      Comment


        #4
        Thanks for the response.

        I guess it really should read:

        hs.Plugin("Message Server").MessageExeLink cstr(prog)&cstr(args), "", "Johns-desktop"

        not

        hs.Plugin("Message Server").MessageExeLink "cstr(prog)&cstr(args)", "", "Johns-desktop"

        I had quotes around the variables.

        Comment

        Working...
        X