Jump to content

Delphi WinWaitActive problem with null string for text


mdavid
 Share

Recommended Posts

I'm using v3 in Delphi. I get an access error when using a null string for text as in:

WinWaitActive("Login Dialog","",20)

but I don't get an access error if I replace the null string by a space as

WinWaitActive("Login Dialog"," ",20)

In autoit script mode neither of these statements gives an access error. Any idea what is going on?

Link to comment
Share on other sites

Well, I found the solution so here it is for anyone interested. In the Delphi wrapper for AutoITX, the strings are all type WideString and if s is a widestring, the null string should be initialized by s := '' + #0.

The #0 is necessary, but only for the null string.

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