AutoHotkey Community

It is currently May 26th, 2012, 9:25 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: ControlClick malfunction
PostPosted: August 2nd, 2009, 9:19 pm 
Offline

Joined: November 13th, 2008, 7:21 am
Posts: 51
Hello!
I had employed the script ControlClick for several programs on my computer and was functioning efficiently till lately wherein the application to a new script does not execute the command Instead it merely render the concerned button prominet by enlighting the button with interrupted lines It does not click the button I am unaware why this malfunction had developed and require your guidence to surmount this hassle
Regards,
alza68.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2009, 2:43 am 
Offline

Joined: January 26th, 2009, 7:14 am
Posts: 32
can you post your code..lets try to debug it..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2009, 6:50 am 
Offline

Joined: November 26th, 2008, 4:16 pm
Posts: 32
Sinkfaze has suggested a possible workaround to your problem in the past.
http://www.autohotkey.com/forum/viewtopic.php?t=44022


Report this post
Top
 Profile  
Reply with quote  
 Post subject: To Kiszleg
PostPosted: August 3rd, 2009, 11:02 am 
Offline

Joined: November 13th, 2008, 7:21 am
Posts: 51
Run,C:\WINDOWS\system32\calc.exe
#IfWinActive,Calculator
ControlClick,5,Calculator
return

This is a simple a simple script with nothing complicated but there is no response whatsoever Now none of the script function with ControlClick Earlier scripts function alright
Regards,
alza68.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2009, 11:04 am 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
You are probably want to use WinWaitActive and not #IfWinActive the #IfWinActive is for hotkeys and such as you don't have them in your example

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
PostPosted: August 3rd, 2009, 11:36 am 
Offline

Joined: November 13th, 2008, 7:21 am
Posts: 51
My sincere gratitude for correcting me, I was wondering would this be specific for calculator window or for all windows Since I prefer this function merely for calculator window hence I used this particualr command #IfWinExist Please guide me on this
Regards,
alza68.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2009, 11:44 am 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
Code:
Run,C:\WINDOWS\system32\calc.exe
WinWaitActive, Calculator ; this will give the program the time to start up and "halt" the script before sending the ControlClick below
ControlClick,5,Calculator
return


Read the docs to understand the difference: (Note #If and If ARE different)
http://www.autohotkey.com/docs/commands/IfWinActive.htm
http://www.autohotkey.com/docs/commands/IfWinExist.htm
http://www.autohotkey.com/docs/commands ... Active.htm

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
PostPosted: August 3rd, 2009, 12:21 pm 
Offline

Joined: November 13th, 2008, 7:21 am
Posts: 51
Please correct me on this script this does not function too on when I intend to press certain buttons
IfWinExist,History alza68
{
#IfWinActive www.isc.ro
,::ControlClick,<,www.isc.ro,,Left,1
.::ControlClick,>,www.isc.ro,,Left,1
!,::ControlClick,<<,www.isc.ro,,Left,1
!.::ControlClick,>>,www.isc.ro,,Left,1
IfWinNotExist,Hstory alza68
Return
}
Return
Remember This requires two windows to present to execute the script The first window is a must "History alza68"
The second window is where the shortcut keys is to be executed "wwwisoro"
The Two windows are quoted


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2009, 2:26 pm 
Offline

Joined: May 27th, 2007, 9:41 am
Posts: 4999
I don't understand the why you would need IfWinExist,History alza68 at all, if you simply use this
Code:
#IfWinActive www.isc.ro
,::ControlClick,<,www.isc.ro,,Left,1
.::ControlClick,>,www.isc.ro,,Left,1
!,::ControlClick,<<,www.isc.ro,,Left,1
!.::ControlClick,>>,www.isc.ro,,Left,1
Return
It should already work for this specific window only, why add the extra check? Again you seem to be misunderstanding the various IfWin... #IfWin. Read the docs again, it is very clear if study the examples.

_________________
AHK FAQ
TF : Text files & strings lib, TF Forum


Report this post
Top
 Profile  
Reply with quote  
PostPosted: August 3rd, 2009, 2:49 pm 
Offline

Joined: November 13th, 2008, 7:21 am
Posts: 51
To Hugov
I have tried your script It merely hilights the button momentarily but does not click the button.I am back to square one. oh! by the way You had asked me why I wanted to use the window " History alza68" since I tried to use click instead and found that if under ordinary circumstances that is without the window "History alza68" would click different button and led me to several disasters.
Although you had corrected the script and i did execute it, but does not fuction and it like as I had stated in the begining. the Buttons are highlighted momentarily without the expected click. Please guide me on this issue.
Regards,
alza68.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 3rd, 2009, 3:20 pm 
Quote:
Reliability

To improve reliability -- especially during times when the user is physically moving the mouse during the ControlClick -- one or both of the following may help:

1) Use SetControlDelay -1 prior to ControlClick. This avoids holding the mouse button down during the click, which in turn reduces interference from the user's physical movement of the mouse.

2) Specify the string NA anywhere in the sixth parameter (Options) as shown below:

SetControlDelay -1
ControlClick, Toolbar321, WinTitle,,,, NA

"NA" avoids marking the target window as active and avoids merging its input processing with that of the script, which may prevent physical movement of the mouse from interfering (but usually only when the target window is not active). However, this method might not work for all types of windows and controls.
Remarks
As implied in the above quote, not all windows will respone the same way to ControlClick. Some windows may require the use of a combination of the other options for ControlClick. Sometimes you must just determine what works by trial and error. (and unforunately there are some window controls that will just not respond).


Report this post
Top
  
Reply with quote  
 Post subject: Unsuccessful yet!
PostPosted: August 3rd, 2009, 5:27 pm 
Offline

Joined: November 13th, 2008, 7:21 am
Posts: 51
Hello! Guest
I am afraid none of these tips or hints turned successful.I did configure SetcontrolDelay to -1 and NA as the sixth option in the ControlClick.It does highlight the button momentarily but does not click as expected. I find that quite strange. Its rather annoying a handy and well directed command is very unreliable at the most indispensilbe circumstances. Any other method to correct this mishap is always welcome.
Regards,
alza68.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], BrandonHotkey, Google [Bot], wolverineks and 60 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group