Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: Can’t run jscript from version 2.0 Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
astro43
Newbie
Newbie


Joined: September 18 2008
Online Status: Offline
Posts: 4
Posted: September 18 2008 at 03:04 | IP Logged Quote astro43

I have a number of jscripts (file type .js) that I have been executing from within version 1.03.4.12 with no problems (using ph_runscript). These scripts no longer work in version 2.0.0. The new format of the ph_runscript command has eliminated the specification of the WSH language. It seems that only vbscripts can now be executed. I'm even having trouble invoking a PowerHome function within a test vbscript file (eg, ph.macro).

__________________
Chris Murray
Back to Top View astro43's Profile Search for other posts by astro43
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: September 18 2008 at 09:19 | IP Logged Quote dhoward

Chris,

Sorry to have missed documenting this .

Not to worry though, you can still run Jscript or any other language supported by WSH. VBScript is just the default.

At the top of your script files, just include this line:
Code:
@language="jscript"


The WSH also supports include directives as well. They would looks like this:

Code:
#include="global.vbs"


Let me know if this gets you back working or if you have any other questions or problems.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum