Author |
|
pingmustard Newbie
Joined: September 13 2010
Online Status: Offline Posts: 18
|
Posted: November 07 2012 at 02:11 | IP Logged
|
|
|
I'm trying to test some VBS execution within PH, and running into some unhelpful error messages. This is the example call within PH:
ph_runscript_0 (5000, "c:\PH_ASP\ph.vbs", "main()")
it yeilds the output:
Formula Evaluation
Execution time: 0.109 seconds.
The formula evaluates to: *** INITIALIZE ERROR - Filename: c:\ph_asp\ph.vbs | Function: main | Source: | Error Number: 0 | Description: | Line: 0 | Column: 0 | Text: ***
The actual content of ph.vbs is fairly simple:
sub main ()
msgbox ("hello world")
end sub
I've verified using cscript.exe that I can execute ph.vbs correctly (adding extra line to call main).
Could someone tell me what I'm doing wrong? This looks like a trivial task but I've tried changing syntax (removing parenth, converting to functions, etc. ) to no avail.
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: November 07 2012 at 08:57 | IP Logged
|
|
|
Ping,
Assuming you're on the 2.1.4 beta, two things to check.
First, make sure that ph_scriptserver.ocx is properly registered with:
regsvr32 c:\powerhome\ph_scriptserver.ocx
Next, make sure that you've enabled the script server to run within PowerHome by navigating in the PH Explorer to PowerHome|Setup|Preferences and verify that "Load Script Server" is checked. Remember if you make a change here, you must reinit or restart for the change to take effect.
Give that a try and let me know.
Dave.
|
Back to Top |
|
|
pingmustard Newbie
Joined: September 13 2010
Online Status: Offline Posts: 18
|
Posted: November 11 2012 at 21:41 | IP Logged
|
|
|
Dave, I had to do both your recommendation (OCX reg AND change the PH pref). That fixed the problem ! :)
FYI, maybe this could added to the help file or updated in the error message to be more self helping? I couldn't find any info to figure this out prior (checked help file and online forum).
|
Back to Top |
|
|