Jump to content

CTRL+C?


BuddyBoy
 Share

Recommended Posts

Noob question... How do you do like, if CTRL+C is pressed on a certain coord, it will remember that coord and then start the other coding after ctrl+c is pressed? Any help be great, ty

EDIT: Its kinda unclear there... I want it to record the mouse position once ctrl+c is pressed, then to activate the coding.

Edited by BuddyBoy
Link to comment
Share on other sites

I dont think thats what i want... Maybe you can explain it? But i want the user to be able to move there mouse to anywhere on the screen, press ctrl+c, it records that position they are at with the mouse, then does the coords.... "change 311 and 132 to the coords you wanted. " That means a specific coordinate doesnt it?

Link to comment
Share on other sites

  • Moderators

O, thank you guys. It works fine, but i got a question, so my knowledge of AutoIt increases more :whistle: What does the...

Until BitAND (_ISpressed("11"),_IsPressed("43"))

what does the numbers in there mean?

If you look at the _IsPressed() function in the help file, it will show the hex values it needs for the keys it represents. Edited by SmOke_N

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

well i ran into more problems, that maybe you guys can help me solve?

If BitAND(GUICtrlRead($Checkbox_2), $GUI_CHECKED) = $GUI_CHECKED Then
            MsgBox(0,"(blah)", 10)
            Do
            Sleep (100)
            $pos = MouseGetPos ()
            Until BitAND (_ISpressed("11"),_IsPressed("43"))
            While 1             
                MouseClick("right")
                Sleep(600)
                MouseClick("right")
                Sleep(600)
                MouseClick("right")
                Sleep(600)
                MouseClick("right")
                Sleep(600)
                MouseClick("right")
                Sleep(600)
                MouseClick("right")
                Sleep(600)
                MouseClick("right")
                Sleep(600)
                MouseClick("right")
                Sleep(600)
                MouseClick("right")
                Sleep(600)
                MouseClick("right")
                Sleep(600)
                MouseClick("right")
                Sleep(600)
                Send('{F1}')
                Sleep(11000)
                Send('{F8}')
                Sleep(100)
                Send('{F1}')
                Sleep(11000)
                Send('{F8}')
                Sleep(100)
            WEnd
        EndIf

The other coding is at top of script, but i have 2 questions...

1. I tried putting send('{ctrldown}') right at begining of the while 1, and it wouldnt do it...

2. Is there anyway i can put in MouseClick("right", -the corrds of the ctrl+c-) <--- I want all 11 of those mouse clicks to click on the coords of the ctrl+c... any ideas?

Thanks if you can once again help me :whistle:

EDIT: Thanks smoke, ill check that out now :)

Edited by BuddyBoy
Link to comment
Share on other sites

2. Is there anyway i can put in MouseClick("right", -the corrds of the ctrl+c-) <--- I want all 11 of those mouse clicks to click on the coords of the ctrl+c... any ideas?

Every place you put this:

MouseClick("right")oÝ÷ Ù©§Ü"¶aÆ®¶­sdÖ÷W6T6Æ6²gV÷C·&vBgV÷C²Âb33c·÷5³ÒÂb33c·÷5³ÒÃ

then it will click at those coords.

Link to comment
Share on other sites

Every place you put this:

MouseClick("right")oÝ÷ Ù©§Ü"¶aÆ®¶­sdÖ÷W6T6Æ6²gV÷C·&vBgV÷C²Âb33c·÷5³ÒÂb33c·÷5³ÒÃ

then it will click at those coords.

I knew it had something to do with pos something, didnt know for sure tho, thanks man... but i keep trying to put Send('{CTRLDOWN}') and begining of the while 1 and it wont hold it down while it does the mouse clicks? any idea it wont work?

EDIT: Now i got the ctrl+c working but this is what i have for the ctrldown, and it wont seem to hold ctrldown the whole while 1....

If BitAND(GUICtrlRead($Checkbox_2), $GUI_CHECKED) = $GUI_CHECKED Then
            MsgBox(0,"blah", 10)
            Do
            Sleep (100)
            $pos = MouseGetPos ()
            Until BitAND (_ISpressed("11"),_IsPressed("43"))
            While 1             
                Send('{CTRLDOWN}');<---- right here, this wont seem to work :(
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                Send('{F1}')
                Sleep(11000)
                Send('{F8}')
                Sleep(100)
                Send('{F1}')
                Sleep(11000)
                Send('{F8}')
                Sleep(100)
            WEnd
        EndIf
Edited by BuddyBoy
Link to comment
Share on other sites

Hmm, i think i might have figured out, just have little problem....

If BitAND(GUICtrlRead($Checkbox_2), $GUI_CHECKED) = $GUI_CHECKED Then
            MsgBox(0,"blah", 10)
            Do
            Sleep (100)
            $pos = MouseGetPos ()
            Until BitAND (_ISpressed("11"),_IsPressed("43"))
            While 1
                Func ctrl () ----- says it has no matching EndFunc, but i do... (I did declare it with kotkeyset, its just at top of script....)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    MouseClick("right",$pos[0],$pos[1],1)
                    Sleep(600)
                    Send('{F1}')
                    Sleep(11000)
                    Send('{F8}')
                    Sleep(100)
                    Send('{F1}')
                    Sleep(11000)
                    Send('{F8}')
                    Sleep(100)
                EndFunc;----------says this doesnt match with the Func ctrl ()
            WEnd
        EndIf
Edited by BuddyBoy
Link to comment
Share on other sites

This should work. :whistle:

If BitAND(GUICtrlRead($Checkbox_2), $GUI_CHECKED) = $GUI_CHECKED Then
            MsgBox(0,"blah", 10)
            Do
            Sleep (100)
            $pos = MouseGetPos ()
            Until BitAND (_ISpressed("11"),_IsPressed("43"))
            While 1
                Send("{ctrldown}")
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                Send('{F1}')
                Sleep(11000)
                Send('{F8}')
                Sleep(100)
                Send('{F1}')
                Sleep(11000)
                Send('{F8}')
                Sleep(100)
                Send("{ctrlup}")
            WEnd
        EndIf
Link to comment
Share on other sites

This should work. :whistle:

If BitAND(GUICtrlRead($Checkbox_2), $GUI_CHECKED) = $GUI_CHECKED Then
            MsgBox(0,"blah", 10)
            Do
            Sleep (100)
            $pos = MouseGetPos ()
            Until BitAND (_ISpressed("11"),_IsPressed("43"))
            While 1
                Send("{ctrldown}")
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                MouseClick("right",$pos[0],$pos[1],1)
                Sleep(600)
                Send('{F1}')
                Sleep(11000)
                Send('{F8}')
                Sleep(100)
                Send('{F1}')
                Sleep(11000)
                Send('{F8}')
                Sleep(100)
                Send("{ctrlup}")
            WEnd
        EndIf
thanks for trying, but no it didnt work :)
Link to comment
Share on other sites

ooooh, I don't think you can do If BitAND(GUICtrlRead($Checkbox_2), $GUI_CHECKED) = $GUI_CHECKED Then.

This should work:

If GUICtrlRead($Checkbox_2) = $GUI_CHECKED Then :whistle:

By the way, is this part of an automization script for a game? :)

Edited by veldrinn
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...