Jump to content
Sign in to follow this  
molotoweef

Creating a loop around loop / Resume a loop

Recommended Posts

molotoweef

Helas members of that great board,

i am a noob at autoit. Still i kind of managed to make it do what i want. But now a problem appeared for which i can't find a solution by searching.

Do
#Region Einfache Suche1
$SearchFluestern = _imageSearch('Fluestern.bmp', 1, $X, $Y, 50)
if $SearchFluestern = 1 Then
Opt("MouseCoordMode", 2)
MouseMove (40, 140)
Sleep ( 500 )
MouseClick ( "left" )
EndIf
until $SearchFluestern = 1

Sleep ( 400)
Send ( "Gamename" )
Sleep ( 200)
Send ( "{ENTER}" )
Sleep ( 2000 )

Do
#Region Einfache Suche2
$Search101 = _imageSearch('x1.bmp', 1, $X, $Y, 20)
If $Search101 = 1 Then
Sleep ( 200 )
Opt("MouseCoordMode", 2)
MouseMove (500, 390)
Sleep ( 150 )
MouseClick ( "left" )
Sleep ( 10000 )
Send ( "{ENTER}" )
Else
Sleep ( 300 )
#Region Einfache Suche3
$SearchEingeklinkt = _imageSearch('x2.bmp', 1, $Z, $H, 150)
if $SearchEingeklinkt = 1 Then
send ( "text" )
send ( "{ENTER}" )
EndIf
EndIf
Until $Search101 = 1

So this is my prolly eyehurting script.

- First Imagesearch checks if my gamingclient is at the right place. If it is, it goes and hosts a game.

- Seoncd Imagesearch checks if the game is full, if it is, it starts the game (Until then it an included third Imagesearch welcomse ppl who join).

So far so good.

What i can't figure out is how i create a loop in the way, that when the game has finished, the script goes back to start.

The only dirty solution i could think of, is: make this script open a second script, let the second script close, and then open the first script. But i would love to have it all in one. So i am thankfull for every help.

Greetings, Molo.

Share this post


Link to post
Share on other sites
Melba23

molotoweef,

Welcome to the AutoIt forum. :)

A great pity your searching did not find the Forum rules (there is also a link at bottom right of each page) - you would then have seen that we do not support scripts which interact with games. So you will get no help and this thread will now be locked. :naughty:

See you soon with a legitimate question I hope. ;)

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  

×