Jump to content

ControlCommand and "IsEnabled" working properly?


 Share

Recommended Posts

I have updated to the V3.2.6.0 release. I registered the DLL, modified the call to the ControlClick() routine, to add the X, and Y Parameters, and started to test the application using the AutoIT functionality. The problem is that whenever the program gets to the point where it is using the ControlCommand() routine with the "IsEnabled" parameter, but routine never returns a 1 ( Yes it's Enabled ) like it did in the previous version of the DLL.

I would think that it's a configuration issue, except the only thing changing from the old way to this was was the registration of the DLL, modify the ControlClick() call, and then recompile the executable. The Data being used is exactly the same from the previous execution to now. The program having the actions applied to is also the same. So, I'm running out of ideas of how it could be a setup, or configuration issue.

I didn't find any other post about this, so I was wondering if this is a known issue. If there is another post about this, can someone point me to it?

Link to comment
Share on other sites

I didn't use earlier versions, so can't say how the function might have been changed, but it appears to be working fine both as a com object and as a dll call.

The com object returns the result directly and the dll call passes the result back in a variable. This is as it was before?

Here's code as a VB com object:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim oAU As Object

Dim st As String

oAU = CreateObject("AutoITX3.Control")

oAU.Run("notepad.exe")

st = oAU.ControlCommand("Untitled", "", "Edit1", "IsEnabled", "")

MsgBox(st)

End Sub

And as a dll call in Delphi:

{from pascal wrapper: procedure AU3_ControlCommand(Title,Txt,Control,Command,Optional:lpstr; var buffer: array of char; BufSize:integer); stdcall external 'AutoItX3.dll';}

procedure TForm1.Button9Click(Sender: TObject);

var buffer: array [0..10000] of char;

begin

AU3_Run('Notepad.exe','',SW_NORMAL);

AU3_ControlCommand('Untitled','','Edit1','IsEnabled', '',buffer,1);

ShowMessage(buffer);

end;

Perhaps you could post some of your code.

Edited by BobK
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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