
Could not loccate automation class named .....
RasWin.Application may not be the correct ProgID. Just because Word and
Excell use .Application doesn't mean that every app does.
If the app supports OLE Automation you can find it with the OLE Viewer (see
previous post).
Or use the
VBA editor in Excel (<Alt> <F11>) and try adding a reference
(tools menu) to that exe.
Don't be surprised if it doesn't work.
If your app doesn't support OLE automation you can use the WSHShell.run
method and use 'sendkeys' or 'scriptit' to automate execution.
Regards,
Ian
WSH FAQ http://wsh.glazier.co.nz/frame.htm
Quote:
>Hi,
>I am trying to make a simple java script to active a program
>that runs on windows called rasmol. I have modified a jscript
>that comes from a microsoft site that runs excel.
>When it runs it comes up with:
> 'Windows Scripting Host -Script Execution Error'
>Category: 'WScript.CreateObject'
>Description:'Could not locate automation class named Raswin.Application'
>Code:
>> var objRM = WScript.CreateObject("RasWin.Application");
>> objRM.Visible = true;
>Telling it where the application is stored doesn't work either.
>var objRM = WScript.CreateObject("c:\\zips\\raswin.exe");
>I am sure this is a simple problem that faces people when they just
>start using scripts. Could anyone tell me how to launch the application and
>then send commands to it?
>Cheers
>Heather