Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

cribban

Member
  • Joined

  • Last visited

  • Country

    Sweden
  1. 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>
  2. 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>
  3. This should do the trick, with this code you can type in "wpi.hta School 20" and it will select School and set timer to 20 seconds: <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!='' ) { load_checks = params[params.length - 2]; timer = 'on'; secs = timeparams[params.length - 1]; } </script>
  4. Keep in mind, it is case-sensitive, it has to be typed in exactly as it is written in the configuration files. Maybe it can be done so it is not case-sensitive
  5. I have 9 different configurations, i've tested so far with 5 of them and it worked flawlessly. I do not see any problems with using parameter. I added the parameter code, right after the timers.js and before the handleerrors script. When looking at wpi.hta (from version 4.3.5) i added the code at line 111 I'm using WPI for network install here at work and am very happy with it, thanks to your hard work kelsenellenelvian!
  6. Nicely done, i implemented the code to my WPI and works great. But what if i would like to trigger the installation automatically with parameter, can that be done? i.e. i type in commandline "wpi.hta school install" and then wpi checks school and automagically triggers install action?? EDIT: Figured it out: <script language="javascript"> var params = oApp.commandLine.split(" "); var wpiparam=params[params.length - 1]; if( wpiparam!='' ) { load_checks = params[params.length - 1]; timer = 'on'; secs = '5'; } </script>
  7. EDIT: Sorry was a bit too quick, found this post, http://www.msfn.org/board/index.php?showtopic=50910, with a working solution, since i then can assign a temporary variable SWPATH in the registry whatever value i want. Thanks

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.