Jump to content

Deletion problem


Recommended Posts

Hello. After many weeks of hoping it would just 'fix itself' I now come to you, humbled, for the solution to my AutoIt ills. ;)

I have the following script in place to update my XBMC library on a home theater PC:

Run("E:\XBMC Mod Files\wget.exe http://xbmc:123@localhost:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn%28UpdateLibrary%28video%29%29", "", "")

Dim $Wget = "E:\XBMC Mod Files\xbmcHttp@command=ExecBuiltIn%28UpdateLibrary%28video%29%29"

If FileExists($Wget) Then
    FileDelete($Wget)
    If FileExists($Wget) Then
        MsgBox(0, "Not Deleted", "The file was not deleted.")
    Else
        MsgBox(0, "Deleted", "The file was deleted.")
    EndIf
Else
    MsgBox(0, "Please locate", "Please locate and delete the file 'Wget'.")
EndIf

FileRecycle("E:\XBMC Mod Files\xbmcHttp@command=ExecBuiltIn%28UpdateLibrary%28video%29%29")

Exit

It creates an untyped file and should theoretically then delete it. It worked marvelously until the last time I updated AutoIt. Now it seems that (and this is my guess) it cannot parse the "%28" in the file anymore. I forget how I came to this assumption because it was a few weeks ago. Instead of deleting or "not deleting" the file, it says it cannot locate the file. The 'FileRecycle' bit at the end was just to try going at it another way.

Is there any other way to handle this?

Because of the way XBMC is handled I'm pretty sure I can't rename the file, unfortunately.

P.S. If it matters:

Win7 64 bit

SciTE v1.79

Link to comment
Share on other sites

Are you sure the file is named "xbmcHttp@command=ExecBuiltIn%28UpdateLibrary%28video%29%29" ? Can you see a file named exactly like this on your E drive in XBMC Mod Files? If you can't AutoIt won't be able to find it too.

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

Are you sure the file is named "xbmcHttp@command=ExecBuiltIn%28UpdateLibrary%28video%29%29" ? Can you see a file named exactly like this on your E drive in XBMC Mod Files? If you can't AutoIt won't be able to find it too.

The file is named "xbmcHttp@command=ExecBuiltIn(UpdateLibrary(video))" exactly as shown in the quotes. However %28 and %29 are used in the script to indicate ( and ) respectively.

Link to comment
Share on other sites

The file is named "xbmcHttp@command=ExecBuiltIn(UpdateLibrary(video))" exactly as shown in the quotes. However %28 and %29 are used in the script to indicate ( and ) respectively.

I don't suppose someone could test this on their machine to let me know if it is in fact trouble parsing the "%28"?

Link to comment
Share on other sites

AutoIt doesn't parse anything, why do you believe that?

MsgBox(0, "", "E:\XBMC Mod Files\xbmcHttp@command=ExecBuiltIn%28UpdateLibrary%28video%29%29")

If you need the string "xbmcHttp@command=ExecBuiltIn(UpdateLibrary(video))" then use that string. Not whatever that first thing was supposed to be.

Link to comment
Share on other sites

Thank you so much! Apparently before the last update it would recognize %28 and %29 as ( and ) so would delete them even though the file name wasn't the same. After changing the file to the exact filename it works like a charm. ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...