Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 12 of 12
  1. #1
    Join Date
    Mar 2005
    Posts
    9

    getting " " to strings.. ?

    Ok.. im experimenting to "learn" for my project..
    and here´s the problem ..

    Code:
    sRegfile = Dialog.FileBrowse(true,"test",_DesktopFolder,"Regfiles (*.reg)|*.reg|");
    sWindir = _WindowsFolder
    sRegedit = String.Concat(sWindir,"\\regedit.exe");
    sExecute_me = String.Concat(" /s ",sRegfile[1]);
    Dialog.Message("hej",sExecuteme);
    Shell.Execute(sRegedit,"open",sExecute_me,"",SW_SHOWNORMAL);
    yeah yeah .. i know theres possibly as many ways to do this as there are
    users on this forum .
    but.. im a total newbie.. so thats the way i done it..

    this works fine as long as sRegfile dont contain spaces..

    so how can i get some " " in there..
    eg.
    c:\yada yada yada\more\regfile.reg
    "c:\yada yada yada\more\regfile.reg"

    some must know what im asking 'bout. ?

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    enclose the variable in quotes.

    Shell.Execute(sRegedit,"open","\""..sExecute_me.." \"","",SW_SHOWNORMAL);

  3. #3
    Join Date
    Mar 2005
    Posts
    9
    ok .. have to try that ..

    thanx

  4. #4
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    ...or you can combine single and double quotation marks.

    sMethod1 = "\"c:\\yada yada yada\\more\\regfile.reg\"";
    sMethod2 = '"c:\\yada yada yada\\more\\regfile.reg"';

    It might be easier to read than the escaped quotation; but it is just a habbit.

    yeah yeah .. i know theres possibly as many ways to do this as there are
    users on this forum .
    However, there are more then two members...

  5. #5
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    I'm glad I got in early. I'll be interested in seeing the 8,767th way of doing this

  6. #6
    Join Date
    Jan 2000
    Posts
    2,002
    Another real easy way of doing it is to use double square brackets:

    Code:
    MyText = [[This is my "Text"!  See how I can use all sorts of \unescaped\ stuff! I can even put
    
    Line breaks in it!
    
    ....
    
    ..
    
    .
    ..
    
    I say, 'this is fun']];

  7. #7
    Join Date
    Sep 2004
    Posts
    60
    Quote Originally Posted by Brett
    Another real easy way of doing it is to use double square brackets:
    That rocks!

    I do have to wonder how we could have figured that out on our own from the help file though.

  8. #8
    Join Date
    Mar 2005
    Posts
    9
    Quote Originally Posted by Worm
    I'm glad I got in early. I'll be interested in seeing the 8,767th way of doing this
    ... i did say POSSIBLY....

  9. #9
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Quote Originally Posted by Absynthe
    That rocks!

    I do have to wonder how we could have figured that out on our own from the help file though.
    It's stated in the Help file in AMS 5.

    Do this to get to it:

    Click the F1 key when AMS 5 is active with a project.

    Then type in Bracket and then choose the Using Comments listing (the first one of two).

    Then scroll a few lines and you will see it explained.

    I hope that helps.
    Intrigued

  10. #10
    Join Date
    Oct 2001
    Location
    Norway
    Posts
    939
    Quote Originally Posted by Silo_97
    i did say POSSIBLY....
    Sure, you are safe!

    I'm glad there isn't 8,767 solutions to this issue! It's like buying a tie; if the salshop assistant is showing up more then three ties, then I have to ask my wife for help. (I hate to go shopping.)

    I didn't know about the third solution (Brett's). Don't tell me more; or I must ask my wife to help me!

    The help note Intrigued mention can also be found in the SUF70 help doc. Search for keyword 'comments' and select topic 'Using Comments'. However, it is about source comments; not about assigning values to a variable.

  11. #11
    Join Date
    Mar 2005
    Posts
    9
    I Thank you all for the help..

    i solved my problem ..

    surely ill be back.. (gonna try text file writing now)

  12. #12
    Join Date
    Sep 2004
    Posts
    60
    Quote Originally Posted by Intrigued
    It's stated in the Help file in AMS 5.

    Do this to get to it:

    Click the F1 key when AMS 5 is active with a project.

    Then type in Bracket and then choose the Using Comments listing (the first one of two).

    Then scroll a few lines and you will see it explained.

    I hope that helps.
    Ahhh, but I only use SUF7

Similar Threads

  1. Comparing Two Strings
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 10-03-2003, 01:23 PM
  2. Prb with Count Delimited Strings
    By arnaud in forum AutoPlay Media Studio 4.0
    Replies: 4
    Last Post: 09-29-2003, 11:03 AM
  3. Pass string's pointer in CallDLL function
    By sonysys in forum Setup Factory 6.0
    Replies: 1
    Last Post: 09-12-2003, 02:05 PM
  4. How does SF6 interpret strings and numbers?
    By rise4peace in forum Setup Factory 6.0
    Replies: 1
    Last Post: 03-15-2003, 05:11 PM
  5. Registry strings greater than 300 characters
    By Lee Edwards in forum Setup Factory 5.0
    Replies: 1
    Last Post: 11-13-2000, 03:52 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