Jump to content

how can i do this?


Recommended Posts

Easy...

While 1
   If PixelGetColor(600,500) = 0 Then
      MouseClick("Right",400,400)
   EndIf
Wend

I just wrote that right here in the reply so it may have an error.

Edit: Just tested, it works fine :(.

Edited by Burrup

qq

Link to comment
Share on other sites

While 1
   If PixelGetColor(122,744) = 848A84 Then
        Send("{F11}")
    Send("{F3}")
    Sleep("11000")
    Send("{F5}")
    Send("{F11}")
   EndIf
Wend

You were missing quotation marks around 11000, other then that the above should work, unless you have the colour wrong anf it never fins it in the first place.

Edited by Burrup

qq

Link to comment
Share on other sites

this is exactly what i have:

HotKeySet("{PAUSE}", "mExit")

MouseClick("left", 564, 108, 1)

While 1

If PixelGetColor(122,744) = 848A84 Then

Send("{F11}")

Send("{F3}")

Sleep("11000")

Send("{F5}")

Send("{F11}")

EndIf

Wend

Func mExit()

Exit

EndFunc

and thats what happens

Link to comment
Share on other sites

While 1
   If PixelGetColor(122,744) = 848A84 Then
        Send("{F11}")
    Send("{F3}")
    Sleep("11000")
    Send("{F5}")
    Send("{F11}")
   EndIf
Wend

You were missing quotation marks around 11000, other then that the above should work, unless you have the colour wrong anf it never fins it in the first place.

<{POST_SNAPBACK}>

I found it needed quotes too, but around the color value rather than the sleep time...
While 1
    If (PixelGetColor(122, 744) = "848A84") Then
        Send("{F11}")
        Send("{F3}")
        Sleep(11000)
        Send("{F5}")
        Send("{F11}")
    EndIf
WEnd

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

PixelGetColor() returns the decimal value of the colour... either use the decimal value of it or use this...

HotKeySet("{PAUSE}", "mExit")

MouseClick("left", 564, 108, 1)

While 1
   If PixelGetColor(122,744) = Dec("848A84") Then
      Send("{F11}")
      Send("{F3}")
      Sleep(11000)
      Send("{F5}")
      Send("{F11}")
   EndIf
Wend

Func mExit()
   Exit
EndFunc

Edit: Yeah, my bad. When I first read it I got the Sleep() mixed up with a Send() and didn't realise that the colour was Hexadecimal. Use DaleHohm's code above.

Edited by Burrup

qq

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