December 21, 200520 yr OK found a bug in you last set of code. When wpi is run normally Without switches the display on the clock is messed up do you think you can fix it?
December 21, 200520 yr Ok, i'll admit i'm not very good with javascript stuff, but here's another go at it. The secs parameter is now limited to 3 digits (however, when triggering "wpi.hta School 120" the timer does not list 2:00 instead it says 0:120 do not know why, maybe should limit it to 2 digits you decide). Anyway, the code:<script language="javascript"> var params = oApp.commandLine.split(" "); var wpiparam=params[params.length - 2]; var timeparams = oApp.commandLine.split(" "); var wpitimeparam=timeparams[timeparams.length - 1]; if (wpiparam!='' && (wpitimeparam!='' && wpitimeparam.length < 4)) { load_checks = params[params.length - 2]; timer = 'on'; secs = timeparams[params.length - 1]; }</script>
December 22, 200520 yr I checked out the new manual, and noticed you say it is supported to write "wpi.hta School" and also "wpi.hta School 20" for the timer, that is not true. However, i revised the code a third time and now that all seems to work (could you please verify that for me):<script language="javascript"> var params = oApp.commandLine.split(" "); var wpiparam=params[params.length - 2]; var timeparams = oApp.commandLine.split(" "); var wpitimeparam=timeparams[timeparams.length - 1]; if (wpitimeparam!='') { load_checks = params[params.length -1]; } if (wpiparam!='' && (wpitimeparam!='' && wpitimeparam.length < 4)) { load_checks = params[params.length - 2]; timer = 'on'; secs = timeparams[params.length - 1]; }</script>
Create an account or sign in to comment