2010-01-01, 12:45
Hello Boys and Girls...
Sometimes, something that seems so easy or so obvious to you may not be so
easy for someone else.
I always figured most people had their own special way of automatically updating
their libraries but it seems i was mistaken. There are dozens of ways of doing this
but here i will explain one that will open up so many other possibilities for end-users.
Here we go...
What you need :
- Knowledge of the Windows Task Scheduler
- AutoIt v3
- Wget for Windows (mirror)
If you prefer, you can use FireFox instead of WGet.
So install the full AutoIt Suite and use this code and save it into a file with the .au3 extension
XBMCLibUpdate-wget.au3
Once you have edited the code to use your username and password as well as
the correct IP address for your XBMC, save it, right-click on the file in Explorer
and select Compile Script.
This will create the executable file you can use in the Windows Task Scheduler.
Pretty easy no?
Tips :
- Instead of an IP, you can use the hostname of the XBMC machine
- If you are running the script from the XBMC machine, localhost can be used instead of IP
- The wget.exe file is a standalone .exe so you can put it anywhere you want as long as you point to the right one in the script source
- AutoIt comes with an extensive help file (.chm). Each function has examples and there are lots of pre-made scripts to use. Check these out for some fun advanced features to help you automate anything you can think of.
-Pr.
Sometimes, something that seems so easy or so obvious to you may not be so
easy for someone else.
I always figured most people had their own special way of automatically updating
their libraries but it seems i was mistaken. There are dozens of ways of doing this
but here i will explain one that will open up so many other possibilities for end-users.
Here we go...
What you need :
- Knowledge of the Windows Task Scheduler
- AutoIt v3
- Wget for Windows (mirror)
If you prefer, you can use FireFox instead of WGet.
So install the full AutoIt Suite and use this code and save it into a file with the .au3 extension
XBMCLibUpdate-wget.au3
Code:
; **********************************************************
; When this script starts it updates the XBMC Video Library
; **********************************************************
; ***********************************************************************
; WGet is available at http://gnuwin32.sourceforge.net/packages/wget.htm
; or http://users.ugent.be/~bpuype/wget/
; ***********************************************************************s
Run("C:\UnixTools\wget.exe http://user:pass@xbmcip/xbmcCmds/xbmcHttp?command=ExecBuiltIn%28UpdateLibrary%28video%29%29", "", "")
; ********************************
; Delete the file created by wget
; ********************************
FileDelete("C:\UnixTools\xbmcHttp@command=ExecBuiltIn%28UpdateLibrary%28video%29%29")
; ***********
; Script end
; ***********
Exit
Once you have edited the code to use your username and password as well as
the correct IP address for your XBMC, save it, right-click on the file in Explorer
and select Compile Script.
This will create the executable file you can use in the Windows Task Scheduler.
Pretty easy no?
Tips :
- Instead of an IP, you can use the hostname of the XBMC machine
- If you are running the script from the XBMC machine, localhost can be used instead of IP
- The wget.exe file is a standalone .exe so you can put it anywhere you want as long as you point to the right one in the script source
- AutoIt comes with an extensive help file (.chm). Each function has examples and there are lots of pre-made scripts to use. Check these out for some fun advanced features to help you automate anything you can think of.
-Pr.