Jump to content

Recommended Posts

Posted

Hi,

Does anyone know why I have to move the mouse over the "Take Photo" button (button turns blue) before it will take picture?

I use: ControlClick("Quick Capture", "", "Button1"). If the mouse is not put over the "Take Photo" button there is not taken any photo.

I would like not to use the mouse. Then it will work at any resolution.

I have attached picture of info window.

post-58671-0-00317300-1315409896_thumb.j

Posted

You're using the classnamenn parameter incorrectly I'm thinking, From the help file:

  Quote

ControlSend("Untitled - Notepad", "", "[CLASSNN:Edit1]", "This is some text")

This is for Notepad, but I think if you change the "Button1" to "[CLASSNN:Button1]" instead or perhaps "[CLASS:Button; INSTANCE:1]" it might work. If you wanted to use the Text of the button, you'd have to change that to "Take &Photo" .

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

  Reveal hidden contents

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Posted

I have tried with:

ControlClick("Quick Capture", "", "[CLASSNN:Button1]")

That didn't work

Then

ControlFocus ( "Quick Capture", "", "[CLASSNN:Button1" )

ControlClick("Quick Capture", "", "[CLASSNN:Button1]")

That didn't work.

Posted

  On 9/7/2011 at 6:53 PM, D4RKON3 said:

why you didn't try AutoIt Window Info to find your control id?

then for example if your control's id is 1003 you can do it this way:

ControlClick("Quick Capture", "", 1003)

I tried that. But it only works if the mouse cursor is hold over the button. (when the mouse cursor is over the button - the button turns blue. And then ControlClick("Quick Capture", "", 1003) works.

But I would like to activate the button without moving the mouse.

Posted

Have you tried sending the window itself an ALT-P? That button should activate by hitting Alt + P so if you send that to the window, you won't need controlclick. The window might also need to be the active window.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

  Reveal hidden contents

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Posted

  On 9/7/2011 at 7:46 PM, BrewManNH said:

Have you tried sending the window itself an ALT-P? That button should activate by hitting Alt + P so if you send that to the window, you won't need controlclick. The window might also need to be the active window.

I have tried with hitting Alt + P. It works if I let the mouse cursor stay over the button before I press Alt + P. But as soon as the mouse is somewhere else on the screen while hitting Alt + P - it doesnt work.

Strange..... I have never seen this before. Only with this Logitech Webcam Software.

Posted

  On 9/8/2011 at 5:59 AM, D4RKON3 said:

I think you can use ControlGetPos() and then use MouseMove() and then perform a MouseClick().

Also you can you use this:

BlockInput(1)

BlockInput(0)

I didn't think of that. Perfect solution to this problem.

Thanks

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
×
×
  • Create New...