Kelsenellenelvian Posted December 21, 2005 Share Posted December 21, 2005 Thank you very much Look for a new release in the next couple of days. Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted December 21, 2005 Share Posted December 21, 2005 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? Link to comment Share on other sites More sharing options...
cribban Posted December 21, 2005 Share Posted December 21, 2005 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> Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted December 21, 2005 Share Posted December 21, 2005 Thanks all seems to be good here now. Link to comment Share on other sites More sharing options...
cribban Posted December 22, 2005 Share Posted December 22, 2005 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> Link to comment Share on other sites More sharing options...
Kelsenellenelvian Posted December 22, 2005 Share Posted December 22, 2005 All initial tests are positive it looks great thanks... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now