Sign in to follow this  
Followers 0
hoelldrio

controlsettext not working

3 posts in this topic

Hello everybody,

I try to set same text in an edit box. Until last month everything's working fine. But after an update of this program I am editing (since 5 years), only 'controlgettext' is working. 'controlsettext' failed.

With other programs I don't have this problem. Only with one of them. I just tried same mouseclick simulations. I tried 'send' and every potential solution I find by google. Nothing is working to edit a single box. I can not reach the edit box for writing or getting focus. Only reading works fine.

Does anybody know these problem?

This is a workaround for my testings:

$get=ControlGetText("LupasRename - [C:\Windows\system32\]", "", "[CLASS:Edit; INSTANCE:2]")
MsgBox(16,"",$get)
if not ControlSetText("LupasRename - [C:\Windows\system32\]", "", "[CLASS:Edit; INSTANCE:2]", "edit") Then
MsgBox(16,"","not found")
EndIf

For this program 'Lupas Rename' everthing is working. In another program only 'controlgettext' is working. 'controlsettext' don't.

 

Thanks a lot...

Share this post


Link to post
Share on other sites



I don't know why it's not working for you. I just downloaded the standalone zip file and ran the exe. It set the text just fine for me (Using your exact code). There could be multiple instances of the program running. Try logging off or restarting your computer.

Share this post


Link to post
Share on other sites

Here is the solution:

Programs change policy statements and policy configurations when they habe been updated.

After these changings maybe you can only edit by script when you get full admin rights. 

For that you have to add
#RequireAdmin

at the beginning of your code.

In my case it was the solution.

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