Jump to content

Recommended Posts

Posted

what code do i go with that will loop at a press of a button 

 

i been trying func but only runs when i click then stops after 1 run

any help please will be amazing 

Posted

I read your text, but frankly, I don't understand hardly a word of it. Please show a little more effort in formulating your question, and furthermore post the code you have already created.

If you have problems with the English language, use a translator e.g https://www.deepl.com/translate

Apparently you want to click a button from a GUI that calls a function in which a loop is processed, right ? :think:

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

  • Developers
Posted
  On 8/4/2022 at 6:14 AM, obeattzy said:

i been trying func but only runs when i click then stops after 1 run

Expand  

post your script and we might understand and be able to help! :)

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

Posted
  On 8/4/2022 at 6:44 AM, Jos said:

post your script and we might understand and be able to help! :)

Expand  

WinActivate("BlueStacks App Player")


HotKeySet("{ESC}", "myExit")


#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\obeattzy\Desktop\New folder\Form1.kxf
$Form1 = GUICreate("Celtic heroes gaming hub bot", 445, 131, -1, -1)
$Button1 = GUICtrlCreateButton("Start", 56, 24, 105, 65)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("ESC", 248, 24, 113, 65)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Pic1 = GUICtrlCreatePic("", 0, 0, 465, 145)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE


        Case $Button1
            Farming()

        Case $Button2
            myExit()

        Exit

    EndSwitch
WEnd


Func Farming()

    ;find wheat
    $cords = PixelSearch(541, 547, 1543, 624, 0x846B3F, 1)

    If Not (@error) Then
        MouseClick("left", $cords[0], $cords[1], 3, 1)
        Sleep(3000)

        ;turn 50%
        MouseMove(1316, 67)
        MouseDown("left")
        MouseMove(943, 68)
        MouseUp("left")
EndIf
EndFunc   ;==>Farming


Func myExit()
    MsgBox(0, "Stopped", "Thank's for using hubs bot")
    Exit
EndFunc   ;==>myExit
 

Posted
  On 8/4/2022 at 6:41 AM, Musashi said:

I read your text, but frankly, I don't understand hardly a word of it. Please show a little more effort in formulating your question, and furthermore post the code you have already created.

If you have problems with the English language, use a translator e.g https://www.deepl.com/translate

Apparently you want to click a button from a GUI that calls a function in which a loop is processed, right ? :think:

Expand  

sorry but you dont understand "what code do i go with that will loop at a press of a button" thats simple text mate, if you cant understand try read better or Try the  english dictionary... please re read what i said... little eashy lol

Posted
  On 8/4/2022 at 7:57 AM, obeattzy said:

... if you cant understand try read better or Try the  english dictionary...

Expand  

At least my limited intellect now recognizes words like "Farming" and "hubs bot". One could therefore assume, that it is about some form of game automation. In this case, I recommend a look at the forum rules .

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Posted
  On 8/4/2022 at 9:22 AM, Musashi said:

At least my limited intellect now recognizes words like "Farming" and "hubs bot". One could therefore assume, that it is about some form of game automation. In this case, I recommend a look at the forum rules .

Expand  

nope thats just a code i grabbed of my other bot and replace the words with that dont need to bot games already have too many of them just like the coc and CR creating an gui for a game is pointless when all it needs is pixelsearch mouseclick drag 1 to 500, i aready run that crap on my other PC's, but yes already have 20 bots for games that are just better without gui.

  • Moderators
Posted

Welcome to the AutoIt forum.

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

See you soon with a legitimate question I hope.

The Moderation team

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:

  Reveal hidden contents

 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

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