Sign in to follow this  
Followers 0
arjun

Click on Button to activate

6 posts in this topic

I am using third party application (Eg.Oracle based) which consists of lot of buttons. I just want to activate my autoit script on the click of any given buttion.

Please tell me which keyword do i need to use.

Thanks in anticipation.

:)


!!!AUTOIT Rocks!!!^^^^^^^^^^^^

Share this post


Link to post
Share on other sites



Use the autoit info window to the the info of the buttons then use ControlClick to press them. The help file has good info.


Post your code because code says more then your words can. SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y. Use Opt("MustDeclareVars", 1)[topic="84960"]Brett F's Learning To Script with AutoIt V3[/topic][topic="21048"]Valuater's AutoIt 1-2-3, Class... is now in Session[/topic]Contribution: [topic="87994"]Get SVN Rev Number[/topic], [topic="93527"]Control Handle under mouse[/topic], [topic="91966"]A Presentation using AutoIt[/topic], [topic="112756"]Log ConsoleWrite output in Scite[/topic]

Share this post


Link to post
Share on other sites

ContolCommand is also can be used if you don't want to use the mouse.

It is related topic of ControlClick.


[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]

Share this post


Link to post
Share on other sites

It sounds like arjun wants to run a script or event when a button is pressed. I'm not good with GUI, but you will need a script that waits for the Oracle window to Exists, then wait for a button to be pressed. You can either define the buttons from running the AU3Info Tool or something like WinGetClassList. After that, it you'll need to loop to poll if a button is pressed, like GuiGetMsg. I don't know what you can do for 3rd party apps, but hopefully some genius here can help.

Share this post


Link to post
Share on other sites

It sounds like arjun wants to run a script or event when a button is pressed. I'm not good with GUI, but you will need a script that waits for the Oracle window to Exists, then wait for a button to be pressed. You can either define the buttons from running the AU3Info Tool or something like WinGetClassList. After that, it you'll need to loop to poll if a button is pressed, like GuiGetMsg. I don't know what you can do for 3rd party apps, but hopefully some genius here can help.

If that the case, try

ControlCommand ( "title", "text", controlID, "IsChecked", "")

to check if that button is check then run the script.


[font="Palatino Linotype"][size="2"]*** The information contained in this post should be considered and certified WORKS ON MY MACHINE ***[/size][/font][font="Palatino Linotype"][size="2"] [/size][/font]

Share this post


Link to post
Share on other sites

I have tried that but "ischecked" does not seem to work on buttons. I have tried it in loops with no Sleep, Sleep(10), Sleep(100)...it never registers on a button ( it would on a radiobox or checkbox, of course). You can ControlCommand and "check" a button, but it won't register if it is is being pressed. I think he needs something like GuiGetMsg. The only other thing that I can think of is that if by pressing the button it opens up another window, or process, or changes a title..then you could poll for that change and backtrack it to the appropriate button. I'm sure there's a way but I'm no GUI or Dll guy

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