Sign in to follow this  
Followers 0
Toppy

Weird IF problem

13 posts in this topic

#1 ·  Posted (edited)

Hi, I've got a little script, that check for a mouseclick over a Firefox Control (MozillaWindowClass5)....

However, the part below DOESN'T check for a click as one would expect, it actually DOES a click & closes the window :)

What's wrong with the code below please ?

It doesn't check for but executes the controlclick & directly closes the window "Resized" ?!?

If ControlClick("Resized", "", "MozillaWindowClass5") = 1 Then
WinClose ( "Resized" )
EndIf
Edited by Toppy

Share this post


Link to post
Share on other sites



Well the first line in the help file for controlclick:

ControlClick

--------------------------------------------------------------------------------

Sends a mouse click command to a given control.


Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs

Share this post


Link to post
Share on other sites

i dont think you need the "= 1" part either..


FootbaG

Share this post


Link to post
Share on other sites

So, there's NO way to CHECK FOR a ControlClick to happen then ? :">

Share this post


Link to post
Share on other sites

sorry, i didnt read ur whole post about polling to see if that happens... umm, um going to say, im not sure, better ask one of the more experienced devs, but im leaning torwards no, but i could be wrong..


FootbaG

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

So, there's NO way to CHECK FOR a ControlClick to happen then ?  :">

<{POST_SNAPBACK}>

There is no way to check for a mouse click on a controll using ControlClick. ControlClick will send a click and return if it was successful. Edited by Ejoc

Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs

Share this post


Link to post
Share on other sites

So the definate answer is : NOT POSSIBLE ? :)

Share this post


Link to post
Share on other sites

So the definate answer is : NOT POSSIBLE:)

<{POST_SNAPBACK}>

guess I'll use caps,

The DEFINATE answer to YOUR QUESTION is NO


Start -> Programs -> AutoIt v3 -> AutoIt Help File -> Index -> (The Function you are asking about)----- Links -----DllStruct UDFsRSA Crypto UDFs

Share this post


Link to post
Share on other sites
THANK YOU ! :)

Share this post


Link to post
Share on other sites

wasn't the PRIMARY DOWN event included in the _IsPressed UDF?

I remember seeing something like that somewhere on this forum.....


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

yea.. whats ur point :)


FootbaG

Share this post


Link to post
Share on other sites

check if control exists

get the coordinates to the control

if mouse left click in control coordinates, then do something


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

Just to make sure no one is limiting AutoIt here, there is pretty much nothing it cannot do. You may have to figure out a way around some issues that come up, but I would say just about anything is possible.

I am back on the forums. I know I havent been on in a while. Hello everyone. I have started my own computer business and have been kinda busy with that, among other things.

Enjoy,

JS


AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

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