majstang Posted July 25, 2010 Share Posted July 25, 2010 (edited) As you certainly know the possibility to schedule seconds in Recording Service has been removed or have never been possible in the first place, I dont know. This Autohotkey script, tested and works on Windows XP, is for those who wanna have the possibility to reschedule recording timers starttime or endtime using seconds. The script must be executed in a certain order otherwise it wont work. A good time to run the script are after your AutosearchTimer has finished, when there is plenty of new recording timers for the script to work with. Then do the following: 1. Close Webinterface if Open 2. Stop service (rightclick on RS systrayicon and click on Stop Service) 3. Execute the script (doubleclick on the compiled .exe or the uncompiled .ahk) 4. Restart service (rightclick on RS systrayicon and click on Start Service) Your timers has now second scheduling in them. You can set by yourself how many seconds you wanna alter your recordings start- or endtime with using negative or positive values. The changes will be applied on ALL timers located in the svctimers.xml. You can only change either starttime or endtime not both on the same time. In order to change starttime and endtime you have to run the script twice after manually inactivating and activating the right codelines in the script (use ; to inactivate codelines, remove ; to activate a codeline). Before using the script set Timebuffer Beginning to 0 minutes and Timebuffer End to 1 minutes in Recording Service--Configuration. Enjoy! FileRead, MyXml, C:\Documents and Settings\All Users\Application Data\CMUV\DVBViewer\config\svctimers.xml loop,parse,MyXml,`n,`r { Ifinstring,A_LoopField,Date=" { data:=A_LoopField pos:=regexmatch(data,"Date=.(\d.*). Start",date_s) ;Changes Date if for example recording starts 00:00:00 and a negative value is used below. pos:=regexmatch(data,"Start=.(\d.*). End",time_s) ;Changes Start time on all recording timers. Dont use both Start and End time change at the same time. ;pos:=regexmatch(data,"End=.(\d.*). Action",time_s) ;Changes End time on all recording timers. Use ; to inactivate lines. newdate:=change_it(date_s1,time_s1) ;newdate += -1,min ;Changes minutes if this is wanted otherwise have this line inactivated. newdate += 1,sec ;Negative values makes recordings to start 1-59 seconds earlier compared to original starttime. Opposite for positive values. The change will be applied on ALL timers located in svctimers.xml. FormatTime, new_date,%newdate%, dd.MM.yyyy FormatTime, new_time,%newdate%, HH:mm:ss StringReplace, data,data,%date_s1%,%new_date% StringReplace, data,data,%time_s1%,%new_time% newfile .=data "`n" Continue } newfile .=A_LoopField "`n" } filedelete,C:\Documents and Settings\All Users\Application Data\CMUV\DVBViewer\config\svctimers.xml fileappend,%newfile%,C:\Documents and Settings\All Users\Application Data\CMUV\DVBViewer\config\svctimers.xml ;msgbox end of conversion change_it(date,time){ StringReplace, date,date,.,,all StringReplace, time,time,:,,all d=%date%%time% StringMid, year,d,5,4 StringMid, month,d,3,2 StringMid, day,d,1,2 StringMid, time,d,9,6 return year month day time } Edited July 25, 2010 by majstang Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.