User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Pass parameters to VB Script (incl spaces)

  1. #1
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export ModuleInstall CreatorInstall Creator Pro

    Join Date
    Jun 2006
    Location
    UK
    Posts
    294
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Pass parameters to VB Script (incl spaces)

    I've currently got a .vbs script which I send 3 parameters to. This works great unless there is spaces in one of the parameters.

    For example I'm passing First Name; Surname; and Template Name using the following code:

    Execute external program --> "wscript.exe "

    with commandline set to "PrintLabel.vbs"+" "+Edittext$( "firstname_edit" )+" "+Edittext$( "surname_edit" )+" "+badgesize+badgetemplate

    If my Surname has a space in it (e.g "Jones Smith") the whole thing screws up as it treats "Jones" and "Smith" as two separate parameters.

    Is there anyway to make it ignore the space??

    Thanks in advance.
    Marc

  2. #2
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Pass parameters to VB Script (incl spaces)

    Maybe you can put " around them? To get a string like this in MMF2:
    Hello " there!
    It would look like this in the expression editor:
    "Hello "" there!"

    Thus, if you want a lone ", you would have to type """"
    Working as fast as I can on Fusion 3

  3. #3
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export ModuleInstall CreatorInstall Creator Pro

    Join Date
    Jun 2006
    Location
    UK
    Posts
    294
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Pass parameters to VB Script (incl spaces)

    All the paramaters are coming from either Edit boxes or global variables so it's not possible to put " around them.

    I think it might be the way I've structured the command line section of the execute external program??

  4. #4
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Posts
    1,305
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)

    Re: Pass parameters to VB Script (incl spaces)

    Of course you can still add quotes - exactly the way LB described.

    "PrintLabel.vbs"+" """+Edittext$( "firstname_edit" )+" "+Edittext$( "surname_edit" )+""" "+badgesize+badgetemplate

    Whether or not adding quotes will solve the problem, I don't know - I haven't tried using this particular extension.

  5. #5
    Clickteam Clickteam
    LB's Avatar
    Join Date
    Jun 2007
    Location
    Richardson, Texas, North America
    Posts
    8,937
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    Re: Pass parameters to VB Script (incl spaces)

    If the quotes method doesn't work, try using the URL encoder to encode special characters into valid characters, ie spaces going to %20 or +
    Working as fast as I can on Fusion 3

  6. #6
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export ModuleInstall CreatorInstall Creator Pro

    Join Date
    Jun 2006
    Location
    UK
    Posts
    294
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Pass parameters to VB Script (incl spaces)

    Thanks All.

    I quickly tried the quote method which has took me a step closer.
    I think I just need to play around with the format of the command line too. Sleep got the better of me last night though

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator ProPatch Maker
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DJFuego's Avatar
    Join Date
    Jul 2006
    Location
    UK
    Posts
    1,410
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Re: Pass parameters to VB Script (incl spaces)

    If you have MMF2 developer you could use the com+ object to code your vbs directly from the MMF app instead of calling an external file.

  8. #8
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Posts
    1,305
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)

    Re: Pass parameters to VB Script (incl spaces)

    Or I believe he could use the .NET extension (doesn't require developer). I misread his first post, and just assumed that's what he was doing already.

  9. #9
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export ModuleInstall CreatorInstall Creator Pro

    Join Date
    Jun 2006
    Location
    UK
    Posts
    294
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Pass parameters to VB Script (incl spaces)

    Thanks for the suggestions.
    I'll have to look into the com+ and .NET extensions.

  10. #10
    Clicker Fusion 2.5 DeveloperiOS Export ModuleSWF Export ModuleInstall CreatorInstall Creator Pro

    Join Date
    Jun 2006
    Location
    UK
    Posts
    294
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Re: Pass parameters to VB Script (incl spaces)

    The URL encoder does work but it inserts either a %20 or a + sign into the text. This text is printed out to a sticky label so it doesn't look too good

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Beta 28 -- Double spaces in string cause line break
    By Jeff in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 17th May 2012, 05:36 PM
  2. Pass a Frame between Applications
    By droberson in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 3rd March 2007, 01:39 PM
  3. New MooServer Monitor Service incl. a MSDK for MMF
    By Patrick in forum File Archive
    Replies: 6
    Last Post: 25th September 2006, 09:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •