Jump to content

Recommended Posts

Posted

Hi, 

I am running an exe file through Autoitx in dotnet core Api. It is working fine in local, but when I deployed in IIS, it is not working. Window is not getting focussed. I tried WinActive command, but no luck. Please help me

Posted

Sorry for that. 

This is the code I have tried. 
 

                AutoItX.Run("C:\\Program Files (x86)\\RAMAS Risk Calc 4\\RiskCalc.exe", "C:\\Program Files (x86)\\RAMAS Risk Calc 4");
                AutoItX.Sleep(15000);

                AutoItX.WinActivate("Risk Calc", "");
                AutoItX.WinSetOnTop("Risk Calc", "", 1);

                AutoItX.ControlSetText("Risk Calc", "", "[CLASSNN:TSRichEdit1]", "Sending");

                AutoItX.Send("Text");


                var response = AutoItX.ControlGetText("[Class:TMainForm]", "", "[CLASSNN:TSRichEdit1]");

                IntPtr winHandle = AutoItX.WinGetHandle("Risk Calc");

                AutoItX.WinKill(winHandle);

 

In localhost, I am getting response as "Sending Text", but in hosted environment, getting empty string as response. 
Please let me know if you need more information

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...