ok, Im writing a python code.
Code:
import os
import shutil
import time
import xbmcgui
import xbmc
oldxml = xbmc.translatePath('special://home/userdata/guisettings.xml')
newNam = xbmc.translatePath('special://home/userdata/guisettings.xml.old')
newxml = xbmc.translatePath('special://home/userdata/addon_data/plugin.program.super.favourites/Super Favourites/Maintenance/newgui/guisettings.xml')
destLoc = xbmc.translatePath('special://home/userdata/')
sourceLoc = xbmc.translatePath('special://home/userdata/addon_data/plugin.program.super.favourites/Super Favourites/Maintenance/newgui/')
YESNOWINDOW = xbmcgui.Dialog().yesno(
"Script written by Microwave Chef",
"This will update your home screen",
"Your screen will go black and afterwards",
"Your system will restart, Continue?")
if YESNOWINDOW:
xbmc.executebuiltin("Notification(PROCEEDING, with update,()")
else:
xbmc.executebuiltin("Notification(ABORTED, update,()")
xbmc.executebuiltin("ActivateWindow(10000,return)")
time.sleep(2)
xbmc.executebuiltin("UnloadSkin()")
time.sleep(2)
os.rename(oldxml,newNam)
time.sleep(5)
xbmc.executebuiltin("Notification(OLD file, Renamed correctly,()")
time.sleep(2)
xbmc.executebuiltin("Notification(COPYING NEW, Homescreen Settings,()")
time.sleep(2)
shutil.copyfile(newxml,oldxml)
ixbmc.executebultin("Notification(NEW SETTINGS, installed,()")
xbmc.executebuiltin("ReloadSkin()")
Basically its for my folks. I write the script, then they get it on their RPi when they update Super favourites. They then Click on the link to update the settings and thats it.
Not only that, I'm leaning Python, and am writing a series of programs to do useful things. I know they may have been written before and in different ways but I'm learning, and that's the point of the whole thing. time.sleep() is in there just to slow things down, so I can See what's its doing easily via explorer.And I should probably use os.path.exists() if else etc, but i know in my case it will do which is why I havnt used it.
Thanks Phil65,