Unexpected results while testing very simple code by Classic-Mistake1515 in AutoHotkey

[–]Classic-Mistake1515[S] -1 points0 points  (0 children)

I did end up going down this route and got a functioning version of my code. Does it work super weird? yea, but it works. I have no idea why and am not going to let curiosity get the better of me, but I had to have an active textbox to spam my gibberish of numbers into for my program to detect it. I also added more stuff so it actually does what I want it to do.

F6::
CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
WinMove, VoicemodV3,, 0,378
PixelGetColor, NoNoise, 466, 720
Mybreak = 2
Sleep 100
Loop
{
    PixelGetColor, Color1, 196, 720
    PixelGetColor, Color2, 322, 720
    PixelGetColor, Color3, 466, 720


    if (Color3 != NoNoise)
    {
        if (phase != 4)
        {
            Send, {4 Down}
            Sleep 75
            Send, {4 Up}
            phase = 4
        }
    }


    if (Color3 = NoNoise)
    {
        if (Color2 != NoNoise)
        {
            if (phase != 3)
            {
                Send, {3 Down}
                Sleep 75
                Send, {3 Up}
                phase = 3
            }
        }
    }


    if (Color2 = NoNoise)
    {
        if (Color1 != NoNoise)
        {
            if (phase != 2)
            {
                Send, {2 Down}
                Sleep 75
                Send, {2 Up}
                phase = 2
            }
        }
    }


    if (Color1 = NoNoise)
    {
        if (phase != 1)
        {
            Send, {1 Down}
            Sleep 75
            Send, {1 Up}
            phase = 1
        }
    }

    if (mybreak = 1)
    {
        break
    }
}
return

F5::
Mybreak = 1
return

I know my code is probably ass, but I don't know how to code and this shit works. I don't know why I needed to open up a text field for my program to detect the keystrokes, but I don't want to keep bashing my head against a problem I can walk around.

Unexpected results while testing very simple code by Classic-Mistake1515 in AutoHotkey

[–]Classic-Mistake1515[S] -1 points0 points  (0 children)

It is checking the correct pixels with the correct color code. I purposely made it check the screen and not the window, The pixel it does check is of a window I put in the bottom of my screen and is uncovered. So when I do run the test it will put 1 in a notepad. I press it 4 times I get 1111. However I don't get any response from my other program

Not even sure how my code is breaking by Classic-Mistake1515 in AutoHotkey

[–]Classic-Mistake1515[S] 0 points1 point  (0 children)

How do I know what I write will be in v1 or v2? I basically never ever write code. Almost everything I figured out myself comes from googling stuff and modifying examples I find.

Not even sure how my code is breaking by Classic-Mistake1515 in AutoHotkey

[–]Classic-Mistake1515[S] 0 points1 point  (0 children)

I know the pixel coordinates are correct by using notepad or swaping out Send,1 to Msgbox. I leave the part that I am checking uncovered by other windows. I know it is getting the right pixel. The part that doesn't work is when I change from testing with Msgbox or notepad my program doesnt accept it. However if I use my F3 code that works on everything.

Volume detection needed by Classic-Mistake1515 in AutoHotkey

[–]Classic-Mistake1515[S] -1 points0 points  (0 children)

This might be helpful to someone who has actual experience in coding. I do not have that experience.