Question

7
Replies
4596
Views
FionaCherry Member since 2017 23 posts
RBC
Posted: June 2, 2017
Last activity: July 28, 2017
Closed

C# in Pega Robotics

Hi everyone,

Your assistance will be great appreciated.

I have the following C# script that I want to run; however, I am received anerror.

SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindowsClass();

string filename;

foreach ( SHDocVw.InternetExplorer ie in shellWindows)
{
    filename = Path.GetFileNameWithoutExtension( ie.FullName ).ToLower();

    if ( filename.Equals( "iexplore" ) )
        MessageBox.Show( "Web Site   : {0}", ie.LocationURL );

    if ( filename.Equals( "explorer" ) )
        MessageBox.Show( "Hard Drive : {0}", ie.LocationURL );
}

I already added the "Microsoft Internet Controls" and "Microsoft Internet Controls" references, but I received the following error message:

Script is invalid.

The type or namespace name 'SHDocVw' cound not be found (are you missing a using directive or an assembly reference?)

Can someone please assist?

Robotic Process Automation
Moderation Team has archived post
Share this page LinkedIn