Announcement

Collapse
No announcement yet.

Ini files - getting value names, values

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

  • Ini files - getting value names, values

    If I get AMS to retrieve a value, or valuename, and said value/valuename does not exist, what is returned in the specified variable?

  • #2
    Re: Ini files - getting value names, values

    Just a note - Whenever you want to test and display variable values during runtime tests simply insert a dialog(s) to display it's value. You can easily remove the dialog later when you're done testing.

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment


    • #3
      Re: Ini files - getting value names, values

      I have tried the dialog box, and say for example I had told the get value action to store in variable %example%. It says in the dialog box %example% when I test it. I dont want any actions to be done if the ini value action doesnt get anything.
      So I used the if action soemwhat like
      if %example% = "%example%
      and also tried it without the quotations.
      It should not be performing the actions, as they are all inside if actions, so nothing at all should happen. It seems to be the main problem I am having that is wrecking everyything else. Any ideas?

      Comment


      • #4
        Re: Ini files - getting value names, values

        Before you get the info from the INI file, set the variable you're using to something like "RETURNED_NOTHING", and test for that string value. This way you have something valid to check against.

        Comment


        • #5
          Re: Ini files - getting value names, values

          The problem with using:

          if(%example% = "%example%")

          ...is that it will always be true.

          If the variable isn't set to anything, then both of them will still be the string "%example%".

          If the variable is set to something, it gets expanded in both places, so if it was "tree frog" then you'd have:

          "tree frog" = "tree frog"

          ...which is obviously the same.

          (Note that putting quotes around a variable doesn't make any difference in this case.)
          --[[ Indigo Rose Software Developer ]]

          Comment

          Working...
          X