Announcement

Collapse
No announcement yet.

search doesn't work in a specific instance

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

  • search doesn't work in a specific instance

    okay, i have a weird instance where the search box returns no results, when i know that the file DOES exist...

    basic code example:
    while statement(
    Get Delimited String (%title% = string 1 in %blahblah%, delimiter , )
    Search for File (%fileexists% = location of %title%.bsp) << searches in %AppDir% recursively
    Show Dialog (had it show contents of %title% and %fileexists%)


    okay, i tried a similar thing OUTSIDE of the while, and it worked

    basic example:
    Assign Value (%title% = bird)
    Search for File (%result% = location of %title%.bsp)
    Show Dialog (had it show contents of %title% and %result%)

    what's the deal? it'll work outside a while, but not inside?? btw, both searches were searching within %AppDir% recursively, with the same variable for %title%

  • #2
    Re: search doesn't work in a specific instance

    Might be an error in your while statement... Try posting the code...

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment


    • #3
      Re: search doesn't work in a specific instance

      that was one of my first thoughts, but the while works properly (i have it parsing out lines for other purposes, such as the %title% line is to be displayed in a listbox, and it does so without any problem)

      so the only non-functioning part of the while is the search

      i'll post it soon tho, since i haveta type it all manually (y'all are working on that for sf7, right? lol... if u need beta-testing, lemme know, i'm totally up for new features [img]/ubbthreads/images/icons/smile.gif[/img]

      Comment


      • #4
        Re: search doesn't work in a specific instance

        okay, here ya go:
        <pre>
        IF (%CheckBox1% = True)
        Count Delimited Strings (%filestotal% = number of strings in %result%, delimiter = ; )
        Assign Value (%string% = 0)
        Assign Value (%filelist% = )
        Assign Value (%filenum% = 0)
        WHILE ((%string% < %filestotal%) AND (%string% >= 0))
        Get Delimited String (%downloadlist% = string %string% in %result%, delimiter = ; )
        Get Delimited String (%lid% = string 0 in %downloadlist%, delimiter = ,)
        Get Delimited String (%title% = string 1 in %downloadlist%, delimiter = ,)
        Get Delimited String (%size% = string 2 in %downloadlist%, delimiter = ,)
        Get Delimited String (%sizenew% = string 3 in %downloadlist%, delimiter = ,)
        Assign Value (%mapfound% = FALSE)
        Search for File (%mapexists% = location of %title%.bsp)
        Count Delimited Strings (%mapexists_total% = number of strings in %mapexists%, delimiter = ; )
        Assign Value (%newstring% = 0)
        WHILE ((%newstring% < %mapexists_total%) AND (%newstring% >= 0))
        Get Delimited String (%file_string% = string %newstring% in %mapexists%, delimiter = ; )
        Count Delimited Strings (%map_line% = number of strings in %file_string%, delimiter = \)
        Get Delimited String (%file_title% = string %map_line% in %file_string%, delimiter = .)
        Show Message Box (%title% %file_title%)
        IF ("%title%.bsp" = %file_title%)
        Assign Value (%mapfound% = TRUE)
        Assign Value (%newstring% = %filestotal%)
        END IF
        Assign Value (%newstring% = %filestotal%)
        END WHILE
        Assign Value (%string% = %string% + 1)
        IF (%mapfound% = FALSE)
        Assign Value (%filenum% = %filenum% + 1)
        Assign Value (%filelist% = %filelist%;%filenum%. %title% Size: %sizenew%)
        END IF
        END WHILE
        END IF
        </pre>

        Comment


        • #5
          Re: search doesn't work in a specific instance

          Hi,

          What is the value of %title%.bsp before you run your Search for File action? Use a Message box to test this value. Also are you using a custom directory for your searching? If so, and it contains a variable, test its value before you search for your file.

          MSI Factory The Next Generation Intelligent Setup Builder

          Comment


          • #6
            Re: search doesn't work in a specific instance

            like i said, it works properly, the while is running through about 100 lines of delimited lines, and in each one, the dynamic %title% is pulled properly from 'string 1 of %downloadlist%'... i already tested that with a dialog box, and like i also mentioned, it also gets echoed into the ListBox

            as for the Custom Directory, i also mentioned that the directory i search is %AppDir%... i tried %AppDir% recursively, and %AppDir%\maps specifically, neither work in the while, although both work outside of the while

            Comment


            • #7
              Re: search doesn't work in a specific instance

              What I would like you to do is create a Message Box action before your File Search action and have the following to be displayed:

              "%Title%"

              Include the quotes. I would like to see if there are any spaces before or after the contents of that variable, or perhaps a carriage return.

              Also check your Search for file action for any spaces in any of the fields that should not be there, such as after the file name.

              Comment


              • #8
                Re: search doesn't work in a specific instance

                darryl, good point, thx so much for mentioning that [img]/ubbthreads/images/icons/smile.gif[/img]

                in the web script that passes the data to sf6, i had spaces after the ;

                lmao, stupid me... thanks tho!! your a life saver! (the red kind, cus they're the best, lmao)

                Comment


                • #9
                  Re: search doesn't work in a specific instance

                  I'm happy to hear that was the source of your problems and has been resolved.

                  Comment

                  Working...
                  X