Sign in to follow this  
Followers 0
BuddyBoy

CTRLDOWN :(

28 posts in this topic

#1 ·  Posted (edited)

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}");<----- here, it wont send the ctrldown for the whole while 1
                                        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)
            WEnd
        EndIf

Begining of while 1, the ctrl wont hold down through the whole thing, it wont hold down even at all -.-, any ideas?

Edited by BuddyBoy

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

don't know exactly...

just an effort here *** NOT TESTED

If BitAND(GUICtrlRead($Checkbox_2), $GUI_CHECKED) = $GUI_CHECKED Then
    MsgBox(0, "blah", 10)
    Do
        Sleep(100)
        $pos = MouseGetPos()
    Until _IsPressed("43") ; <--- try this           BitAND(_IsPressed("11"), _IsPressed("43"))
    While 1
        Send("{CTRLDOWN}");<----- here, it wont send the ctrldown for the whole while 1 - ?????
        For $x = 1 To 17
            MouseClick("right", $pos[0], $pos[1], 1)
            Sleep(600)
        Next
        Send('{F1}')
        Sleep(11000)
        Send('{F8}')
        Sleep(100)
        Send('{F1}')
        Sleep(11000)
        Send('{F8}')
        Sleep(100)
        Send("{CTRLUP}") ; added
        Sleep(200)
    WEnd
EndIf

8)

Edited by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

Rawr, still wouldnt work, i rearranged the ctrldown in different places i really only the the ctrldown at the:

MouseClick("right", $pos[0], $pos[1], 1)

Sleep(600)

But of course ill add my extra mouse clicks in but i want the ctrldown to do all mouseclicks, not just 1...

Share this post


Link to post
Share on other sites

this does all 17 mouse clicks just like you had before

For $x = 1 To 17
            MouseClick("right", $pos[0], $pos[1], 1)
            Sleep(600)
        Next

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

O i see that now, but the CTRLDOWN still isnt working with my script -.- anymore other ways it could work? :whistle:

EDIT: Could the :

Do
                Sleep(100)
                $pos = MouseGetPos()
            Until _IsPressed("43")

could that be messing up the ctrldown somehow?

Edited by BuddyBoy

Share this post


Link to post
Share on other sites

O i see that now, but the CTRLDOWN still isnt working with my script -.- anymore other ways it could work? :whistle:

EDIT: Could the :

Do
                 Sleep(100)
                 $pos = MouseGetPos()
             Until _IsPressed("43")

could that be messing up the ctrldown somehow?

1

Glad you can see now how this clicks 17 times

2

yes... I wasnted to test what i posted for you because...

A

you have

Until BitAND (_ISpressed("11"),_IsPressed("43"))
            While 1
                    Send("{CTRLDOWN}");<-----

what I was wondering is.... since your actual finger is on the control key AND the script immediately tries to send "control down" there could be an error created .... I don't know

B

I really dont work with this kind of thing and dont care to find out why the "control down" is not working

3

i won't repeat myself ... again

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Alright, im kinda confused, but its ok, i understand you dont wanna help with noob questions... If anyone else can help me that be great thanks!

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Well you can hold the Ctrl down and it will work

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

Run this without holding the ctrl.. and it works... the try again (you got 2 sek to press the ctrl) and it still works

(Dont do like me and press Ctrl + F5 in Scite :whistle:)

Edited by Shevilie

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

Mybad :whistle: Forgot how i tested it :)

hmm im confsued on your example you gave, i need it to still when a user presses ctrl+c it sends ctrldown and then the rest, is that anyway possible?

Share this post


Link to post
Share on other sites

Yep.. look at the script i changed the post to :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

Yep.. look at the script i changed the post to :whistle:

i get what you mean, but how does this go with this coding

If BitAND(GUICtrlRead($Checkbox_2), $GUI_CHECKED) = $GUI_CHECKED Then
    MsgBox(0, "blah", 10)
    Do
        Sleep(100)
        $pos = MouseGetPos()
    Until _IsPressed("43"); <--- try this          BitAND(_IsPressed("11"), _IsPressed("43"))
    While 1
        Send("{CTRLDOWN}");<----- here, it wont send the ctrldown for the whole while 1 - ?????
        For $x = 1 To 17
            MouseClick("right", $pos[0], $pos[1], 1)
            Sleep(600)
        Next
        Send('{F1}')
        Sleep(11000)
        Send('{F8}')
        Sleep(100)
        Send('{F1}')
        Sleep(11000)
        Send('{F8}')
        Sleep(100)
        Send("{CTRLUP}"); added
        Sleep(200)
    WEnd
EndIf

? :) thanks for the help, hope you can answer that question

Share this post


Link to post
Share on other sites

What is the CTRLDOWN supposed to do for you ?

Is it for a game or something ?

Yes, friend requested me to do it, and i couldnt turn him down :whistle: its not for me tho :)

Share this post


Link to post
Share on other sites

Its this MouseClick("right", $pos[0], $pos[1], 1) Its "destroying the ctrldown

#Include <Misc.au3>

    MsgBox(0, "blah", 10)
    Do
        Sleep(100)
        $pos = MouseGetPos()
    Until _IsPressed("43"); <--- try this           BitAND(_IsPressed("11"), _IsPressed("43"))
    While 1
        Send("{CTRLDOWN}");<----- here, it wont send the ctrldown for the whole while 1 - ?????
        For $x = 1 To 17
            MsgBox(0,0,_IsPressed("11"))
            MouseClick("right", $pos[0], $pos[1], 1)
            MsgBox(0,0,_IsPressed("11"))
            Sleep(600)
        Next
        MsgBox(0,0,_IsPressed("11"))
        Send('{F1}')
        Sleep(11000)
        Send('{F8}')
        Sleep(100)
        Send('{F1}')
        Sleep(11000)
        Send('{F8}')
        Sleep(100)
        Send("{CTRLUP}"); added
        Sleep(200)
    WEnd

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

Its this MouseClick("right", $pos[0], $pos[1], 1) Its "destroying the ctrldown

#Include <Misc.au3>

    MsgBox(0, "blah", 10)
    Do
        Sleep(100)
        $pos = MouseGetPos()
    Until _IsPressed("43"); <--- try this           BitAND(_IsPressed("11"), _IsPressed("43"))
    While 1
        Send("{CTRLDOWN}");<----- here, it wont send the ctrldown for the whole while 1 - ?????
        For $x = 1 To 17
            MsgBox(0,0,_IsPressed("11"))
            MouseClick("right", $pos[0], $pos[1], 1)
            MsgBox(0,0,_IsPressed("11"))
            Sleep(600)
        Next
        MsgBox(0,0,_IsPressed("11"))
        Send('{F1}')
        Sleep(11000)
        Send('{F8}')
        Sleep(100)
        Send('{F1}')
        Sleep(11000)
        Send('{F8}')
        Sleep(100)
        Send("{CTRLUP}"); added
        Sleep(200)
    WEnd
im not sure, but you didnt add anything but the msg boxes did you? This is for my friends game, you need no knowledge of the game tho to help me, but its not holding the ctrldown the entire thing... I took out your msg boxes you put in because i need it to be msgbox free besides at begining so it does its auto-thing my friend wants, but it wont hold down the ctrl the whole time... Any ideas yet?

Share this post


Link to post
Share on other sites

Well the MsgBox was to show that it was the controlclick that destroyed the CTRLDOWN


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

So is there anyway to leave out the msg box and have it still right click while holding down ctrl?

Share this post


Link to post
Share on other sites

This is for my friends game, you need no knowledge of the game tho to help me, but its not holding the ctrldown the entire thing... I took out your msg boxes you put in because i need it to be msgbox free besides at begining so it does its auto-thing my friend wants, but it wont hold down the ctrl the whole time...

Sure ... we do not have to know anything from you to help you ....

Any ideas yet?

:whistle: ... You ?

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

No im saying, its really not a game-based question, the ctrldown with mouseclicks could be from anything... but if everyone else is stumped im sure not smart enough in autoit to figure it out :whistle:

Share this post


Link to post
Share on other sites

No im saying, its really not a game-based question, the ctrldown with mouseclicks could be from anything... but if everyone else is stumped im sure not smart enough in autoit to figure it out :whistle:

Why are you saying there is no link to the fact its a game ? based on what ?

It very likely has something to do with the fact that its a game and not a standard Windows Application with standard behavior ....


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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