StringReplace funktioniert nicht.

  • hi @ all,
    ich habe hier ein problem mit der Funktion "StringReplace".
    Und zwar habe ich einen "Unverwendbaren" downloadlink eines Youtube videos
    und einen "Verwendbaren" downloadlink eines Youtube videos.
    jetzt habe ich diese 2 links in Strings eingeteilt($1,$2)
    Dann habe ich versucht mit StringReplace($1,"% 2 f","/") aus dem Unverwenbaren link das "% 2 f" in "/" umzuwandeln.
    das Geht aber nicht. hier mein Code:

    Spoiler anzeigen
    [autoit]

    $1="v2.lscache2.c.youtube.com%2fvideoplayback%3fip%3d0.0.0.0%26sparams%3did%252cexpire%252cip%252cipbits%252citag%252cburst%252cfactor%26itag%3d5%26ipbits%3d0%26signature%3d1c0adc35dafb826adf9d7ceb57cdbc7f6abf84d5.9caada609e78078b9ef464df460c0d439260f399%26sver%3d3%26expire%3d1252256400%26key%3dyt1%26factor%3d1.25%26burst%3d40%26id%3d3f1ca6c0dee76104/"
    $2="v2.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id,expire,ip,ipbits,itag,burst,factor&itag=5&ipbits=0&signature=1C0ADC35DAFB826ADF9D7CEB57CDBC7F6ABF84D5.9CAADA609E78078B9EF464DF460C0D439260F399&sver=3&expire=1252256400&key=yt1&factor=1.25&burst=40&id=3f1ca6c0dee76104"
    StringReplace($1,"%2f","/")
    StringReplace($1,"%3f","?")
    StringReplace($1,"%3d","=")
    MsgBox(0,"Test1",$1)
    MsgBox(0,"test2",$2)

    [/autoit]


    Mfg Roggazzz
    Click Ctrl-C to copy. (hides when lost focus)
    Click Ctrl-C to copy. (hides when lost focus)

  • Spoiler anzeigen
    [autoit]

    $1="v2.lscache2.c.youtube.com%2fvideoplayback%3fip%3d0.0.0.0%26sparams%3did%252cexpire%252cip%252cipbits%252citag%252cburst%252cfactor%26itag%3d5%26ipbits%3d0%26signature%3d1c0adc35dafb826adf9d7ceb57cdbc7f6abf84d5.9caada609e78078b9ef464df460c0d439260f399%26sver%3d3%26expire%3d1252256400%26key%3dyt1%26factor%3d1.25%26burst%3d40%26id%3d3f1ca6c0dee76104/"
    $2="v2.lscache2.c.youtube.com/videoplayback?ip=0.0.0.0&sparams=id,expire,ip,ipbits,itag,burst,factor&itag=5&ipbits=0&signature=1C0ADC35DAFB826ADF9D7CEB57CDBC7F6ABF84D5.9CAADA609E78078B9EF464DF460C0D439260F399&sver=3&expire=1252256400&key=yt1&factor=1.25&burst=40&id=3f1ca6c0dee76104"
    $1 = StringReplace($1,"%2f","/")
    $1 = StringReplace($1,"%3f","?")
    $1 = StringReplace($1,"%3d","=")
    $1 = StringReplace($1,"%26","&")
    $1 = StringReplace($1,"%25",",")
    $1 = StringReplace($1,"2c","")
    MsgBox(0,"Test1",$1&@CRLF&@CRLF&$2)

    [/autoit]

    MfG Schnuffel

    "Sarkasmus ist die niedrigste Form des Witzes, aber die höchste Form der Intelligenz."
    Val McDermid

    über mich...

    ich habe meine Erfahrungen hauptsächlich gesammelt in (grobe Übersicht):

    - RibbonBar Automation
    - MySQL Nutzung
    - GUIs in vielerlei Ausprägung
    - Nutzung von Powershell / Batch in AutoIt
    - Windows Automatisierung

    außerhalb von AutoIt:

    - Sprachen: PS, Batch, php, html(5), javascript, (perl eingeschränkt), vbs
    - Powershell (AD, WPF inkl. Multi-Threading, ...)
    - Deployment-Automatisierung ohne SCCM
    - Office-Nutzung mit COM-Object (AutoIt, PowerShell)
    - ActiveDirectory und alles was damit zusammenhängt
    - Hyper-V Clustering (Converged / Hyper Converged)
    - Serverhardware (Konfiguration, Aufbau, Architektur, Betrieb)

    Lieblingsthema:

    günstige Automatisierung von Vorgängen, für die andere Firmen viel Geld nehmen

    more to come ...