Announcement

Collapse
No announcement yet.

Is there a way to do this in Setup Factory??

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is there a way to do this in Setup Factory??

    I can do this in Autoplay, but would like to just use Setup Factory

    %TempInfo% = EditFieldObject[UnLockCodeBox].GetText
    %ALLNUMBERS% = String.Replace ("%TempInfo%", "f", "5")
    %ALLNUMBERS% = String.Replace ("%ALLNUMBERS%", "e", "4")
    %ALLNUMBERS% = String.Replace ("%ALLNUMBERS%", "d", "3")
    %ALLNUMBERS% = String.Replace ("%ALLNUMBERS%", "c", "2")
    %ALLNUMBERS% = String.Replace ("%ALLNUMBERS%", "b", "1")
    %ALLNUMBERS% = String.Replace ("%ALLNUMBERS%", "a", "0")
    %TMPDIV% = Evaluate (%ALLNUMBERS% / %DaysSinceBuilt%)
    %UnLockCalc% = Variable.FormatNumber (%TMPDIV%, 0, Truncate)
    TextObject[Text2].SetText ("%UnLockCalc%")

  • #2
    Re: Is there a way to do this in Setup Factory??

    Setup Factory 6.0 currently does not contain a "String Replace" action, however it is possible.

    What you will have to do is take your string, get the length of it, then create a loop that will execute the number of times to get through the string's length and use that count as the strings index.

    You will need to go through the string one character at a time and create a series of IF control structures to check if the current index equals each of the target values. You would proceed in creating a new string one character at a time by concatenating values using string concatenation "+". You can use the "Assign Value" action for that.

    That is the design you would need to accomplish the AutoPlay actions you provided.

    Hope that helps.

    Comment


    • #3
      Re: Is there a way to do this in Setup Factory??

      What are you trying to do with the code? Are you trying to implement the software unlock code example completly in SF60?

      For what it is worth (as the person who originally wrote the code) I use AutoPlay to branch between two alternatives; 1) a SF60 executable that has a submit to web action to register - my prefered action, or 2) executing a version of the setup program that has been obfuscated in with a meaningless file name like DATA.RDL. This version of the setup program has no online registration, access is controlled via having to call in to get the Autoplay unlock code. After they do the two step of calling in and getting the unlock code my AutoPlay page copies the DATA.RDL to their temp dir, renames it, executes it, then deletes it.

      Comment


      • #4
        Re: Is there a way to do this in Setup Factory??

        can you use multiple characters as a delimiter?

        if so; wouldn't it be easier to get delimited string; index 0, 2 and then concat the 1st / replacement chars / 2nd

        Comment

        Working...
        X