Announcement

Collapse
No announcement yet.

Something is wrong in that actions code ??

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

  • Something is wrong in that actions code ??

    I want to choose a package from serial number. Looking at log file :
    [Performing Actions]
    START: Perform action: Mid String
    Variable = %MidStringResult%
    Source = X381-02-584L
    Start at = 5
    Number of characters = 2
    Result = 15
    END: Perform action: Mid String


    START: Perform action: GOTO Label
    Target label = 02
    (On Error) User notification mode = Simple
    (On Error) Action = Continue
    Result = 1
    END: Perform action: Fin

    The extraction of 02 is good, but after the assign value for package variable is not done


    The actions code is below (note : the label 01, 02, 03 are in red on my page)

    Mid String(%MidStringResult% = mid 2 characters of "%UserSerialNumber% starting at 5)
    GOTO Label (%MidStringResult%)
    01
    Assign Value (%PackageVariable1% = true)
    GOTO Label Fin
    02
    Assign Value (%PackageVariable2% = true)
    GOTO Label Fin
    03
    Assign Value (%PackageVariable3% = true)
    Fin


    Thanks for help

  • #2
    Re: Something is wrong in that actions code ??

    Hi,

    Are you sure that there are no spaces before or after your label? If you use a Show Message Box action on %MidString% what value does it display?

    What happens if you just use an Assign Value action to set %MidString% to "02"?


    MSI Factory The Next Generation Intelligent Setup Builder

    Comment


    • #3
      Re: Something is wrong in that actions code ??

      Thanks for the answer but I don't see any space.
      And why when I create the action
      the code GOTO Label 02 is in blue (quite normal) and when I create the Label
      it appears in red ?
      Nevertheless I have done some other tries :
      - using One Assign Value action, the result is good
      - finally, I replace the GOTO Label / label structure by
      a structure of successives IF / ENDIF like :
      IF(%MidString% = 01)
      Assign Value (%PackageVariable1% = true)
      END IF
      IF(%MidString% = 02)
      Assign Value (%PackageVariable2% = true)
      END IF
      .........
      and it works !

      Comment


      • #4
        Re: Something is wrong in that actions code ??


        the code GOTO Label 02 is in blue (quite normal) and when I create the Label it appears in red ?
        Red is the default color for labels. We gave them a different color to make them easier to spot. You can change the colors in the preferences if you want.
        --[[ Indigo Rose Software Developer ]]

        Comment

        Working...
        X