Jump to content

Plz help me write this code


Recommended Posts

I wanna write code do as :

when mouse get cursor ( not ID cursor), computer will do some function, how write this code ?

This is my cursor same as icon ( i cant upload it :wacko:, not permitted to upload :D )

what do you mean by "mouse get cursor"??

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

I wanna write code do as :

when mouse get cursor ( not ID cursor), computer will do some function, how write this code ?

This is my cursor same as icon ( i cant upload it :wacko:, not permitted to upload :D )

what do you mean by "mouse get cursor"??

Cheers

Kurt

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

i dun know how explain exacterly ab it.

Check it :

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size: X: 21 Y: 40 W: 32 H: 33

Control ID: 13057

ClassNameNN: Static1

Text:

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

i mean " Control Under Mouse " ( CUM), this is my CUM's info.

I wanna write a code which relize ( or "catch" ) that CUM.

Link to comment
Share on other sites

...I...catch...CUM.

You just HAD to go there :D:wacko: Using I, catch and CUM in the same sentence

Anyway...

(assuming you are making a GUI)

$info=GUIGetCursorInfo(["winhandle"])
;I'd omit the parameter so you can just get the active window info

and i belive $info[4] has the information your looking for

EDIT:

I think i misunderstood the question

Edited by Paulie
Link to comment
Share on other sites

:D I got it. Here is your answer and solution.

$msg = MsgBox( 4, 'AutoIt Help', 'Would you like to see your answer to help you with your problem?' )
    Select
        Case $msg = 6
            RunWait(@COMSPEC & ' /c Start AutoIt.chm')
            Exit
        Case $msg = 7
            Exit
    EndSelect

Doesn't anyone read the AutoIt help files anymore?

Spoiler

 

"...Yes, I am a criminal. My crime is that of curiosity. My crime is that of judging people by what they say and think, not what they look like.My crime is that of outsmarting you, something that you will never forgive me for." --The Mentor

"Mess with the best, die like the rest!!" -Hackers

"This above all to thine own self be true." -William Shakespeare

"Corruption is only as corrupted as the individual makes it out to be." -i386

 

style7,AutoIt.png

 

 

Link to comment
Share on other sites

I checked help but i dun do anything :wacko:

Thx smoke_n, I'm looking for it ^^, I'll try use this code and write my program :D. Hope it 'll run ^^

I tried but seem i cant :D. I need help again.

I wanna write code which click morse while CUM =

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size: X: 21 Y: 40 W: 32 H: 33

Control ID: 13057

ClassNameNN: Static1

Text:

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

how write this code ?

Edited by hoang anh
Link to comment
Share on other sites

  • Moderators

Maybe he means he wants to trap the Mouse cursor state? (hand, pointer, etc)

http://www.autoitscript.com/autoit3/docs/f...seGetCursor.htm

If that's not it, maybe write what you want in your native tongue, because no one knows what your saying in english.

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

I wanna write code which click mo u se while C ontrol U nder M ouse =

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size: X: 21 Y: 40 W: 32 H: 33

Control ID: 13057

ClassNameNN: Static1

Text:

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

how write this code ?

ControlClick('title', 'text', 'Static1')

So far as I can understand of request.

:D

Link to comment
Share on other sites

  • Moderators

ControlClick('title', 'text', 'Static1')

So far as I can understand of request.

:wacko:

Your good at word puzzles and text twist too aren't you :D

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

Quite right!

My native language is Spanish, and I usually take a lot of time before posting, as I read and check my text, so i won't annoy other members who out of their own time are willing to provide help.

Sometimes i'm so concerned about the English grammar that I get my point lost, but few can say I don't make the effort of writing propper English, just out of RESPECT.

IVAN

in fact, It takes so long that I got beaten by 3 posts before posting my answer, which makes is out of place.

Edited by ivan
Link to comment
Share on other sites

uhm....

very hard to explain my situation , and my English not good too :whistle:.

I'm trying explain ab what my program can do ( not code ). I want write 1 function; and while run it, mouse 'll (auto) click when control ID change .... ( as i wrote )

I not sure ppl can understand what i'm saying :). So, I'll try MHz's code, Mhz, can u give some exam ab this code??

Link to comment
Share on other sites

If the ControlID is changing, then try using the ClassNameNN. AutoIt Info Tool CUM.

This runs Calculator which maybe called something else in your language.

Run('calc.exe')
WinWait('Calc')
Sleep(2000)

; Use ClassNameNN "Button5" as AutoIt Info Tool shows
ControlClick('Calc', '', 'Button5')

Sleep(2000)

; Paste text to the "Edit1" control
ControlSetText('Calc', '', 'Edit1', '7777777777777777777777')

Sleep(3000)
WinClose('Calc')

:whistle:

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