The code below is what is run when the user chooses a help from the menu in bespoke system. It should open a HTML file whcih has all the help but it falls over with a when executing the create object line "oShell = CREATEOBJECT( 'WScript.Shell' )". They get a "Class definition WSCRIPT.SHELL is not found" error message.
I can't seem to find anything useful on this anywhere and no eaxamples seem to indicate any declarations or files that are required to run this object.
If I can't resolve this then I may have to resort to using the RUN command.
Code That Runs The Help
=======================
* Create a string hyperlink using the executable path and the help directory
cUrl= "'" + gcrootdir + 'Help\home.htm' + "'"
* Check that file exists
if file(&cUrl)=.t. then
* The file has been found
* Use the built in class for opening file (assumes html file association)
oShell = CREATEOBJECT( 'WScript.Shell' )
* Build a command line to be issued as the following two lines of syntax will not work
* oShell.Run(cUrl)
* oShell.Run('x:\develop\oap6\test\help\home.html')
cCommand="oshell.run(" + cUrl + "
"
&cCommand
* Remove the object you created
oShell = .NULL.
RELEASE oShell
else
* the file has not been found
messagebox("Unable to locate the helpfile, unable to display help",0+64,_screen.caption)
endif
I can't seem to find anything useful on this anywhere and no eaxamples seem to indicate any declarations or files that are required to run this object.
If I can't resolve this then I may have to resort to using the RUN command.
Code That Runs The Help
=======================
* Create a string hyperlink using the executable path and the help directory
cUrl= "'" + gcrootdir + 'Help\home.htm' + "'"
* Check that file exists
if file(&cUrl)=.t. then
* The file has been found
* Use the built in class for opening file (assumes html file association)
oShell = CREATEOBJECT( 'WScript.Shell' )
* Build a command line to be issued as the following two lines of syntax will not work
* oShell.Run(cUrl)
* oShell.Run('x:\develop\oap6\test\help\home.html')
cCommand="oshell.run(" + cUrl + "
&cCommand
* Remove the object you created
oShell = .NULL.
RELEASE oShell
else
* the file has not been found
messagebox("Unable to locate the helpfile, unable to display help",0+64,_screen.caption)
endif