Sign in to follow this  
Followers 0
BuddyBoy

CTRL+C?

21 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Sry to bump, but it got a page back, and i really would appreciate some help please :whistle:

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

You cant have a func inside a while loop.. not like that

Just remove the 2 func lines


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

Read my other thread above this one, the ctrldown wont work in almost any way :whistle:

Share this post


Link to post
Share on other sites

Well the func there wont do you any good :whistle:


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

Try this simple script and see if it writes test where the marker is

ClipPut("Test")
Send("{CTRLDOWN}")
Send("v")
Send("{CTRLUP}")

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

Just look at my thread in general help CTRLDOWN... theres many errors that wont work with MY script :whistle:

Share this post


Link to post
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

Share this post


Link to post
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 :)

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

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

Oh ? Well, it looks awfully similar to what's used in the example for GUICtrlCreateRadio.

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