Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 8 of 8
  1. #1
    Join Date
    Sep 2002
    Posts
    39

    Converting . over to _ in variables

    With the software this is installing it needs to have the version number in each one of the files, so I was curious if there was a way to have setup factory look at a number & convert all the .'s in the number to _ & store it in a seperate variable.

    Example, if the version was 1.2 it would store 1_2 in a different variable. If the version was 1.2.1 it would store 1_2_1 in a different variable, etc; etc.

    Right now I am just having to enter the version number in 2 "assign value"'s at the startup section (I want to keep these 2 together because I am going to have to have someone else take of this for me since I am leaving soon, so I am trying to automate it as much as possible). Ideally I would like them to change the version in the "Design" section, but again, I need to keep these 2 variables together, or figure out a way for setup factory to figure out how to convert .'s over to _'s & the only thing that would need to be changed is the version number in the "Design" section.

    Any help would be apreciated here, thanks.

  2. #2
    Join Date
    Jul 2001
    Location
    Indigo Rose Software
    Posts
    1,834

    Re: Converting . over to _ in variables

    Yes, it's possible, but takes a little bit of coding.

    Basically what you would want to do is take the string and treat it like a delimited string with "." as the delimiters. You would then have to loop through the delimited string and concatenate each segment with the "_" character. String concatenation can be accomplished through an Assign Value action using the "+" operator to concatenate two strings, and checking the "Evaluate value as expression" checkbox.

    The actions you will need to use are:
    Count Delimited Strings
    Get Delimited String
    Assign Value
    and one of the available control structures to loop through to create the new string.

    Hope this points you in the right direction.
    Darryl
    Indigo Rose Corporation

    Product Guides: AMS80 | SUF9 | TU30 | VP30 |MSIFACT |DeltaMAX

  3. #3
    Join Date
    Sep 2002
    Posts
    39

    Grin Re: Converting . over to _ in variables

    I'm still pretty foggy on how all this works. You are going into some stuff that I do not normally work with. Let me show you what I've got, then we can go from there.

    The %ProductVer% is 1.2.1
    I need to make the %DuelersVersion% 1_2_1

    Assign Value: %ProductVer% = %DuelersVersion%
    This just sets %DuelersVersion% to whatever the %ProductVer% is.

    Label: Version Conversion
    This is for when it is time to loop, it can begin here again.

    Count Delimited Strings
    ===================
    Store result in variable: %DuelersVersionCountDel%
    Source String: %DuelersVersion%
    Delimiter: .
    I am hoping I am doing this part right. I am under the impression that the string position of where the "." delimiter will be will be stored in the %DuelersVersionCountDel% variable.

    Get Delimited String
    ================
    Store result in variable: %DuelersVersion%
    Source String: %DuelersVersion%
    Delimiter: .
    Item Index: %DuelersVersionCountDel%
    Here I am a little lost. I think that perhaps the %DuelersVersion% should not be in both places, but since I am not sure what it is I am trying to accomplish, I can't really do anything else with it.

    Assign Value
    ===========
    Variable name: %DuelersVersion%
    Value:
    I am totally lost here. I have "Evaluate as an expression" on which allows me to utilize the build functions, but I still don't know what to do.

    IF %DuelersVersion% ????????
    ========================
    I am a little lost here also. I do not know how to check to see if the "." character is still in the %DuelersVersion% variable via the build commands (for the "IF"). If it does find "." in the %DuelersVersion% variable, it will point it back to the "Version Conversion" label.

    I only have another day, maybe 2 to finish this off, so I would appreciate a speediant response. Thanks for your time either way.

  4. #4
    Join Date
    Jul 2001
    Location
    Indigo Rose Software
    Posts
    1,834

    Re: Converting . over to _ in variables

    I have a few things to get out of the way first, but I'll whip you up something and send you an email today that should accomplish your task.
    Darryl
    Indigo Rose Corporation

    Product Guides: AMS80 | SUF9 | TU30 | VP30 |MSIFACT |DeltaMAX

  5. #5
    Join Date
    Jul 2001
    Location
    Indigo Rose Software
    Posts
    1,834

    Re: Converting . over to _ in variables

    I sent you an email with an attached project. Let me know if that accomplishes what you need.

    I tried sending you an email but is was returned. Send our support department an email and we'll reply with the project file. Just mention our correspondence, and I'll pass it along to them to attach, or they'll forward it to me.
    Darryl
    Indigo Rose Corporation

    Product Guides: AMS80 | SUF9 | TU30 | VP30 |MSIFACT |DeltaMAX

  6. #6
    Join Date
    Sep 2002
    Posts
    39

    Re: Converting . over to _ in variables

    emails will not get through without a *** somewhere in the subject. I have a mail filter for blocking spam mail because I get a spam mail every 3 hours or so.

  7. #7
    Join Date
    Jul 2001
    Location
    Indigo Rose Software
    Posts
    1,834

    Re: Converting . over to _ in variables

    Just to let you know, I tried with the *** in the subject line, but it was still returned, so email support@indigorose.com and we'll reply to that email.
    Darryl
    Indigo Rose Corporation

    Product Guides: AMS80 | SUF9 | TU30 | VP30 |MSIFACT |DeltaMAX

  8. #8
    Join Date
    Sep 2002
    Posts
    39

    Re: Converting . over to _ in variables

    My email is Marker0077@Hotmail.com

    I am not sure what email you guys have (I do have a few), but that is the correct one. Indigorose.com is now on my safe list so you should not need *** in the subject to get past my mail filter, but please do it anyways just to be on the safe side. Thanks.

Posting Permissions

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