Jump to content

Hello need help creating an very simple GUI.


Soto
 Share

Recommended Posts

Ok well I am currently making an bot for collecting/gathering materials but I need help getting this working;

Working Unit's Collected (Simple +1 per loop)

Working Units Per Hour (Already Have an idea so you DO NOT need to do) XD

So my code is sort of like this

$UnitsGotten = 0

*Insert For and If statements here but at very end all of this*

$UnitsGotten = $UnitsGotten +1 (Fixed this error)

then the GUI looks like this

#include <GUIConstantsEx.au3>

#include <StaticConstants.au3>

#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=C:\Users\salter\Desktop\Auto It\Gui Designer\Forms\MacroBeta.kxf

$Form1 = GUICreate("Wurm Macro Beta", 801, 601, 192, 124)

$Label1 = GUICtrlCreateLabel(" Wurm Macro Beta ", 632, 48, 147, 17)

GUICtrlSetColor(-1, 0xFFFFE1)

GUICtrlSetBkColor(-1, 0xA6CAF0)

$Label2 = GUICtrlCreateLabel("Designed and made by Soto.", 632, 80, 149, 17)

GUICtrlSetColor(-1, 0xFF0000)

GUICtrlSetBkColor(-1, 0x008000)

$Label3 = GUICtrlCreateLabel(" Mining Bot V0.1 ", 632, 96, 148, 17)

GUICtrlSetBkColor(-1, 0xFFFF00)

$Label5 = GUICtrlCreateLabel(" ", 632, 32, 148, 49)

GUICtrlSetBkColor(-1, 0xA6CAF0)

$Label4 = GUICtrlCreateLabel(" Status ", 632, 112, 148, 17)

GUICtrlSetBkColor(-1, 0x00FF00)

$Label6 = GUICtrlCreateLabel(" ", 632, 128, 148, 97)

GUICtrlSetBkColor(-1, 0x00FF00)

$Label7 = GUICtrlCreateLabel("Mined; ", 632, 128, 39, 17)

GUICtrlSetBkColor(-1, 0x00FF00)

$Label8 = GUICtrlCreateLabel("------------------------------------------------", 632, 144, 148, 17)

GUICtrlSetBkColor(-1, 0x00FF00)

$Label9 = GUICtrlCreateLabel("Units Per Hour;", 632, 160, 76, 17)

GUICtrlSetBkColor(-1, 0x00FF00)

$Label10 = GUICtrlCreateLabel("Not Yet!", 712, 160, 43, 17)

GUICtrlSetBkColor(-1, 0x00FF00)

$Label11 = GUICtrlCreateLabel(UnitsGotten, 680, 128, 54, 17)

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

EndSwitch

WEnd

The highlighted part is where I want it to post the Units it has so far gotten, please help. =]

I know this is most likely very easy but I don't know what to exactly search for. XD

Edit2; Forgot to say that highlighted part doesn't work as it gives errors when starting.

Edit3; Some reason GUI won't pop up time to see why.

Edit4; lol I thought it was an in-game menu, ho well it shouldn't matter I will edit the size of it later but is it still possible to get the units to appear and update?

Edited by Soto
Link to comment
Share on other sites

Please review our basic reading and comprehension skills test.

http://www.autoitscript.com/forum/forum-10/announcement-13-forum-rules/

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Please review our basic reading and comprehension skills test.

http://www.autoitscript.com/forum/forum-10/announcement-13-forum-rules/

Do not discuss any of the following:

Automating games or game servers. See below for more details.

Breaking CAPTCHA's, by-passing anti-bot measures or other methods for by-passing software activation.

SPAM tools including instant messenger or forum auto-posters.

Keyloggers and other forms of malware.

AutoIt decompilers, post links to decompilers or post decompiled code. For more information see the Decompiling FAQ on the wiki.

Hmm... =/

Thought it would be allowed due to the fact its not really autoing games due to the fact they allow keyboard to mouse clicks just fine =/

So is this allowed or not due the fact I am still trying to fix the +1 every time the script finishes and publishes to the GUI.

Edit; Just to let you know they can't fully bot it due the fact I won't upgrade it to deal with anything that will break it within 10-30mins. (That forces the user to view the game every minute or so)

Edit2; Found the bug but strangely enough I can't find the command to refresh the GUI or Clear the screen. =/

Anyone know the command to view updates on gui?

Edited by Soto
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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