Jump to content
Anomouz

Call Function until

Recommended Posts

Hi i'm very new to autoit and have been having a blast, I am stuck and was hoping to maybe get a little nudge in the right direction here.

I am trying to write script that will basically Execute predefined mouse functions and then run butterflies() until the While loop returns -1 at which point it will return to something much like _rCG1(). Could someone please help me a litle with the highlighted lines, any help much appreciated. Thanks!

While 1
Sleep(1000)
WEnd

Func _rCG1()

    MouseClick($MOUSE_CLICK_LEFT,1580,146,1,10)
    Sleep (2000)
    MouseClick($MOUSE_CLICK_LEFT,1580,146,1,10)
    Sleep (1500)
    MouseClick($MOUSE_CLICK_LEFT,1580,146,1,10)
EndFunc

Call()? until butterflies() = -1 Then
?Call Func _rCG2()?

#Region ;; butterflies()
Func butterflies()

While 1

...........

..........

 Else
   If $e[0] = -1 And $e[1] = -1 Then
       Return -1
    EndIf
 EndIf
WEnd
EndFunc

.........

Edited by Anomouz

Share this post


Link to post
Share on other sites

Anomouz,

Welcome to the AutoIt forum.

Func kill()

With a function name like that in your script, please read the Forum rules - particularly the bit about not discussing game automation - before you post again.

M23

 


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

@Inuno Thank you worked perfectly

@ M23 Yes sir, post edited to remove all doubts of my pure intentions (:

 

Edited by Anomouz

Share this post


Link to post
Share on other sites

@ M23 Yes sir, post edited to remove all doubts of my pure intentions (:

Don't try to be a smart ass. 

*click*


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


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

×
×
  • Create New...