Jump to content

What can i do when i can not get control's handle?


gzken
 Share

Recommended Posts

I have got a problem.

I use autoit to automate an external program. I use autoinfo tool to get control's information such as treeviews and tab, but i can just get the panel's information which outside the controls as container, so i can not get the control's handle...

For solving it, i use send("key") function, it work normally in foreground, however it's not work when launching by schedule in background...

how can i get the control's handle or send key in background??

Link to comment
Share on other sites

ControlGetHandle()

ControlClick()

And you can always work with the classname, the controlID, etc...

Thanks for noticed my problem

I know what I should do to get control's handle and I tried, but it's no useful, waiting for other good idea...

Link to comment
Share on other sites

Thanks for noticed my problem

I know what I should do to get control's handle and I tried, but it's no useful, waiting for other good idea...

I think that ControlGetHandle() or ControlSend() or ControlClick() are you best options as Nahuel said. Try using the Autoit window info tool that came with AutoIt. Maybe it will let you see the control name so that you can use the Control* functions.
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

I think that ControlGetHandle() or ControlSend() or ControlClick() are you best options as Nahuel said. Try using the Autoit window info tool that came with AutoIt. Maybe it will let you see the control name so that you can use the Control* functions.

well, I have tried to get control's infomation by using AutoInfo.exe, but it could just give me the panel's information which outside the control as a container, so I use function WinGetClassList() to get all control's class name, and then use ControlGetHandle("title","","[class: classname]"), but I could not the control's handle.

<_<

Link to comment
Share on other sites

  • Moderators

well, I have tried to get control's infomation by using AutoInfo.exe, but it could just give me the panel's information which outside the control as a container, so I use function WinGetClassList() to get all control's class name, and then use ControlGetHandle("title","","[class: classname]"), but I could not the control's handle.

<_<

1. It looks like you're using the wrong method for the ClassNameNN to get the handle.

2. WinGetClassList only returns the controls and not their instance. So if I have a class name of Edit and their was only one, I know for sure my ClassNameNN is Edit1.

3. The proper way to use the Class Name option for Control* functions is

ControlGetHandle("Title", "", "[CLASSNN:Edit1]")

4. I find it rather appalling that you bother to ask for help, and provide absolutely nothing to help you with, ie... any type of real code, and or the applications name.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

1. It looks like you're using the wrong method for the ClassNameNN to get the handle.

2. WinGetClassList only returns the controls and not their instance. So if I have a class name of Edit and their was only one, I know for sure my ClassNameNN is Edit1.

3. The proper way to use the Class Name option for Control* functions is

ControlGetHandle("Title", "", "[CLASSNN:Edit1]")

4. I find it rather appalling that you bother to ask for help, and provide absolutely nothing to help you with, ie... any type of real code, and or the applications name.

Thanks for your help and sorry for bothered you, maybe it's not appropriate to describe the details...

I will try, thanks.

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