Sign in to follow this  
Followers 0
mdavid

Delphi WinWaitActive problem with null string for text

2 posts in this topic

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?

Share this post


Link to post
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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0