Jump to content

Do.... Until Not


Recommended Posts

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

$i = 10; Variable i has been declared to 10
Do
    $i = $i + 1; does Var i + 1 
    Sleep(100)
    PixelSearch(0,0,1023,767, 0x7F7968)
Until Not @error Or $i = 120; till it is 120 then it will click
Sleep(500)
MouseClick("Left", 825, 619,1,100) ; Press Start or Play from the launcher
Sleep(500)
MouseClick("Left", 525, 550,1,1)

 

  • C++/AutoIt/OpenGL Easy Coder
  • I will be Kind to you and try to help you
  • till what you want isn't against the Forum
  • Rules~

 

Link to comment
Share on other sites

You're looking for a pixel to match the color on practically the whole desktop, I'm not surprised it clicks in the wrong place.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Run("AutoIt3Help.exe")
sleep(500)
WinMinimizeAll()
sleep(2000)
WinActivate("AutoIt Help (v3.3.14.0)")
$i = 10
Do
    $i = $i + 1
    Sleep(100)
Until Not @error Or $i = 120
If WinActive("AutoIt Help (v3.3.14.0)") Then
Sleep(500)
MouseClick("Left", 32, 145,1,1) ; Press Start or Play from the launcher
Sleep(2500)
MouseClick("Left", 71, 161,1,1)
TrayTip("AutoIt Help", "Introduction Section opened!",3)
Endif

Without Pixelsearch this is an Example if your Desktop is 1366,768

Edited by RaiNote
  • C++/AutoIt/OpenGL Easy Coder
  • I will be Kind to you and try to help you
  • till what you want isn't against the Forum
  • Rules~

 

Link to comment
Share on other sites

Run("AutoIt3Help.exe")
sleep(500)
WinMinimizeAll()
sleep(2000)
WinActivate("AutoIt Help (v3.3.14.0)")
$i = 10
Do
    $i = $i + 1
    Sleep(100)
Until Not @error Or $i = 120
If WinActive("AutoIt Help (v3.3.14.0)")
Sleep(500)
MouseClick("Left", 32, 145,1,1) ; Press Start or Play from the launcher
Sleep(2500)
MouseClick("Left", 71, 161,1,1)
TrayTip("AutoIt Help", "Introduction Section opened!",3)

Without Pixelsearch this is an Example if your Desktop is 1366,768

OK thanks, but how exaclty the command Winactivate works? I find in the https://www.autoitscript.com/wiki/Function_list , what is it, but i dont undestanding, can u help me ?

Link to comment
Share on other sites

  • Moderators

'-'

Are we supposed to guess at your meaning here? What, precisely, are you not understanding about WinActivate? 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Nothin °-°

It just checks if the Window is opened and then it will click on 830,624

 

  • C++/AutoIt/OpenGL Easy Coder
  • I will be Kind to you and try to help you
  • till what you want isn't against the Forum
  • Rules~

 

Link to comment
Share on other sites

I wanna a simple thing, this:

1º I open the script.

2º The script go open a window.

3º In the window, have a butom, (begin)

4º The mouse automatic go and click on the buttom.

:( But i cant do it, pls help a person in this big world

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...