Jump to content

Recommended Posts

Posted

AU3_API void WINAPI AU3_WinActivate(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText);

I converted it to VB.NET, but it won't work. Here are my parameters:

(ByVal Title As String, Optional ByVal Text As String = "") As IntPtr

MouseMove and Sleep work fine. Any reason why WinActivate isn't working?

  • Replies 54
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

I want to try WinTitleMatchMode, but I can't because AutoItSetOption also won't work.

(ByVal Mode As String, ByVal Value As Long) As Integer

Any ideas?

Posted

Well, still can't get this working. Would be awesome if someone would look into it. Richard, you know everything about AutoItX. Help a brother! :D

Posted

I don't claim to know everything about it. In fact, I haven't even touched it in a very long time.

Get rid of As IntPtr and declare it as a sub instead. It doesn't return anything.

I was really hoping that would work, but it didn't. :( I PM'ed you the whole declaration, if you don't mind.

Posted

You forgot the Unicode attribute in the sub version.

Ugh, that didn't work, either. I don't understand how some functions work and some don't. :(

Posted

Grade? We're not here to do your homework.

I just need help with one declaration... After that, I'll be able to look at why my declarations didn't work and fix the others. C'mon, help! You know you want to. :D

Posted

I tried. I haven't touched VB.Net in years so honestly I was guessing.

I see. Owell, I got it working. Now I'm only having problems with AU3_Error. I used:

(ByVal Value As Integer) As Integer

I call it like this:

(AU3_Error(0))

I receive error:

Unable to find an entry point named 'AU3_Error' in DLL 'AutoItX3'.

My guess is the declaration is incorrect. I tried removing the ByVal, but that resulted in the same error. Any tips?

Posted

There is no function named AU3_Error.

In the exported functions list for AutoIt:

AU3_API long AU3_error(void);

It's in the same spot as the rest of the API. Right? :(

Posted

Err.. well no parameters. It returns int.

I don't entirely understand.

AU3_Error As Integer... (No paramaters)

Results in error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Posted

You may need to change the calling convention to match the dll. I don't remember what convention you need though because I don't have AutoIt installed.

Why should I have to do that? All the other functions work fine, thus far. The paramter in c++ is (void), that means "nothing" in VB.NET. I should only have to change the parameters, but none work.

Posted

Ok, let's scrap that question for now. Are these the correct paramters for WinGetHandle?

AU3_API void WINAPI AU3_WinGetHandle(LPCWSTR szTitle, /*[in,defaultvalue("")]*/LPCWSTR szText, LPWSTR szRetText, int nBufSize);

(ByVal Title As String, ByVal Text As String, ByVal szText As String, ByVal Buffer As Integer) As Integer

In the original AutoIt language, there are only two parameters; the last two don't exist, so I'm not sure on what to put for "szText". From google, I understand the buffer size, and 256 seems to be efficient.

What should I put for sztext?

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...