Question

7
Replies
4688
Views
Fiona Fok (FionaCherry)
RBC

RBC
CA
FionaCherry Member since 2017 23 posts
RBC
Posted: June 2, 2017
Last activity: July 28, 2017
Posted: 2 Jun 2017 11:18 EDT
Last activity: 28 Jul 2017 14:46 EDT
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 an error.

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, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.