Jump to content

Recommended Posts


Posted

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>

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...