[solved] getting the name of the xml file just loaded - it works but why?

  • with following action I read the xml.url and do extract the filename between fist "/" from right and before the final ".xml",
    but why is the result containing the final .xml, all values shown with trace show that it should not be the case...

    and debug output shows:

    so finally: why is finalname = "virtualtour1.xml" and not "virtualtour1"?
    and I doublechecked the variables I used in this action are not declared/used in any other part of my code...

    Liebe Gruesse,
    Georg

    2 Mal editiert, zuletzt von gkaefer (22. Dezember 2011 um 16:40)

  • https://krpano.com/docu/actions/#subtxt

    subtxt(finalname,get(url),get(letter-first),get(letter-final));

    letter-final is 47 which you're setting to the length of the string you want back.
    virtuartour1 has 10 letters if you just wanted to get that .. or maybe I misread something..

  • https://krpano.com/docu/actions/#subtxt

    subtxt(finalname,get(url),get(letter-first),get(letter-final));

    letter-final is 47 which you're setting to the length of the string you want back.
    virtuartour1 has 10 letters if you just wanted to get that .. or maybe I misread something..

    omg - ok see it... subtext values are not from position x to position y - its from position x and y characters to right...so .xml is also included...
    *wink* thanks - sometimes you're looking at some line of code and your blind...

    Georg

  • ok final action giving correct result is:

    trace shows now the complete filename, because I finally used txtadd to add the .xml ...

    Liebe Gruesse,
    Georg

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!