Jump to content
Sign in to follow this  
varmil9

Loop problem

Recommended Posts

varmil9

Hi guys! I'm ultra noob in programming, so pls don't judge me, this is the first thing I ever did.

Yet, I have menaged to achieve my goal with a small problem. A set of clicks on the screen, depending on the color of the pixel.

In other words, if the color is red(16711680), restart the script, and if it's not, continue with the script. I don't know how or which command restarts the script.

I couldn't find it in help files and forums for hours now... Thx in advance :)

sleep(5000)

MouseClick("left", 1418, 49, 1)

sleep(15000)

$n = PixelGetColor(963, 411)

Switch $n

Case 16711680

MsgBox(0, "It's RED, restart script!", $n)

>>>>>missing line

Case Else

MsgBox(0, "It's GREEN, continue!", $n)

EndSwitch

MouseClick("left", 862, 415, 1)

sleep(10000)

MouseClick("left", 647, 891, 1)

send ("45")

MouseClick("left", 572, 925, 1)

MouseClick("left", 1058, 493, 1)

Edited by varmil9

Share this post


Link to post
Share on other sites
FireFox

Hi,

Welcome to the autoit forum :)

What do you need this script for?

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
varmil9

I need it for automatisation of buying some kind of points, on "earn on the internet" type of website... I wanted to make, that whenever I get enough credits there, I buy a point...

It's nothing illegal if thats what you ask :)

Share this post


Link to post
Share on other sites
Melba23

varmil9,

I need it for automatisation of buying some kind of points, on "earn on the internet" type of website

Not something we knowingly support here - if you want to earn points, wear out your own fingers. Thread closed. :naughty:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×