Jump to content

Recommended Posts

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."

Link to post
Share on other sites
  • Developers
30 minutes ago, obeattzy said:

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

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.
  :)

Link to post
Share on other sites
1 hour ago, Jos said:

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

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
 

Link to post
Share on other sites
1 hour ago, 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:

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

Link to post
Share on other sites
1 hour ago, obeattzy said:

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

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."

Link to post
Share on other sites
1 hour ago, 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 .

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.

Link to post
Share on other sites
  • Moderators

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:

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

 

Link to post
Share on other sites
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...