Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 22:39

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



New scripter

Discussion on New scripter within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2009
Posts: 13
Received Thanks: 0
New scripter

Hey people. Im new to coding and tried makin a bot for a game. I have the bot working but only through following my mouse actions. I just need abit of help getting the script to read the gui input box's, I have read tutorials and youtube vids and got no where. i tried the learning to script with autoit v3 and think it's the 4.3 Assigning variable values. but there is no demo code so im still lost.
Code:
#include <ButtonConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

Global $Paused

$Form1 = GUICreate("AngelBot v0.1", 289, 353, 325, 174)
$Menumain = GUICtrlCreateMenu("General")
$MenuItem6 = GUICtrlCreateMenuItem("Load", $Menumain)
$MenuItem5 = GUICtrlCreateMenuItem("Load Settings", $Menumain)
$MenuItem4 = GUICtrlCreateMenuItem("Save", $Menumain)
$MenuItem3 = GUICtrlCreateMenuItem("Save As", $Menumain)
$exit = GUICtrlCreateMenuItem("Exit", $Menumain)
$menu2 = GUICtrlCreateMenu("About")
$MenuItem7 = GUICtrlCreateMenuItem("Documentation", $menu2)
$MenuItem1 = GUICtrlCreateMenuItem("Version", $menu2)
$MenuItem8 = GUICtrlCreateMenuItem("Help", $menu2)
$MenuItem2 = GUICtrlCreateMenuItem("Website", $menu2)
GUISetBkColor(0x000000)
$startmining = GUICtrlCreateButton("Start Mining", 8, 280, 113, 41)
GUICtrlSetFont(-1, 14, 400, 0, "Papyrus")
GUICtrlSetBkColor(-1, 0xC0C0C0)
$Group1 = GUICtrlCreateGroup("", 8, 96, 113, 169)
$Drones = GUICtrlCreateCheckbox("Drones", 16, 112, 97, 17)
GUICtrlSetFont(-1, 12, 400, 0, "Papyrus")
GUICtrlSetColor(-1, 0x00FF00)
$cargoboxs = GUICtrlCreateCheckbox("CBox", 16, 136, 97, 17)
GUICtrlSetFont(-1, 12, 400, 0, "Papyrus")
GUICtrlSetColor(-1, 0x00FF00)
$Jettison = GUICtrlCreateCheckbox("Jettison", 16, 160, 97, 17)
GUICtrlSetFont(-1, 12, 400, 0, "Papyrus")
GUICtrlSetColor(-1, 0x00FF00)
$lazramm = GUICtrlCreateCombo("1", 16, 184, 33, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "1|2|3")
$lasamm = GUICtrlCreateLabel("Laser", 56, 184, 44, 24)
GUICtrlSetFont(-1, 12, 400, 0, "Papyrus")
GUICtrlSetColor(-1, 0x00FF00)
$Label1 = GUICtrlCreateLabel("Laser*", 57, 208, 50, 24)
GUICtrlSetFont(-1, 12, 400, 0, "Papyrus")
GUICtrlSetColor(-1, 0x00FF00)
$lzramm = GUICtrlCreateInput("180", 16, 208, 33, 21)
$Input4 = GUICtrlCreateInput("Input4", 16, 232, 33, 21)
$Label8 = GUICtrlCreateLabel("Trvltime", 56, 232, 60, 29)
GUICtrlSetFont(-1, 12, 400, 0, "Papyrus")
GUICtrlSetColor(-1, 0x00FF00)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("", 128, 0, 153, 329)
$astlist = GUICtrlCreateCombo("Veldspar", 136, 40, 137, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL))
GUICtrlSetData(-1, "Veldspar|Scordite|Pyroxeres|Plagioclase|Omber|Kernite|Jaspet|Hemorphite|Hedbergite|Gneiss|Dark Ochre|Crokite|Spodumain|Bistot|Arkanor|Mercoxit|Condensed Alloy|Crystal Compound|Precious Alloy|Sheen Compound|Gleaming Alloy|Lucent Compound|Dark Compound|Motley Compound|Lustering Alloy|Glossy Compound|Plush Compound|Opulent Compound")
$Label2 = GUICtrlCreateLabel("Asteroids:", 167, 11, 75, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetColor(-1, 0x00FF00)
$List1 = GUICtrlCreateList("", 136, 72, 137, 71)
GUICtrlSetData(-1, "")
$Label3 = GUICtrlCreateLabel("Emergency", 188, 197, 73, 20)
GUICtrlSetFont(-1, 10, 400, 0, "Papyrus")
GUICtrlSetColor(-1, 0x00FF00)
$Label4 = GUICtrlCreateLabel("Logoff", 203, 213, 41, 20)
GUICtrlSetFont(-1, 10, 400, 0, "Papyrus")
GUICtrlSetColor(-1, 0x00FF00)
$Cargobox = GUICtrlCreateCheckbox("", 144, 208, 17, 17)
$Label6 = GUICtrlCreateLabel("Container", 203, 303, 61, 20)
GUICtrlSetFont(-1, 10, 400, 0, "Papyrus")
GUICtrlSetColor(-1, 0x00FF00)
$Label5 = GUICtrlCreateLabel("Bookmarks", 203, 271, 73, 20)
GUICtrlSetFont(-1, 10, 400, 0, "Papyrus")
GUICtrlSetColor(-1, 0x00FF00)
$Label7 = GUICtrlCreateLabel("Cargo", 203, 239, 61, 20)
GUICtrlSetFont(-1, 10, 400, 0, "Papyrus")
GUICtrlSetColor(-1, 0x00FF00)
$Input1 = GUICtrlCreateInput("10", 136, 264, 33, 21)
$Input3 = GUICtrlCreateInput("Name", 136, 296, 33, 21)
$Input2 = GUICtrlCreateInput("Size", 136, 232, 33, 21)
$Addore = GUICtrlCreateButton("Add", 144, 152, 51, 17)
$Remore = GUICtrlCreateButton("Remove", 208, 152, 51, 17)
$oreup = GUICtrlCreateButton("Up", 144, 176, 51, 17)
$oredown = GUICtrlCreateButton("Down", 208, 176, 51, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Pic1 = GUICtrlCreatePic("C:\Documents and Settings\matt\My Documents\My Pictures\alien head.jpg", 8, 16, 113, 81, BitOR($GUI_SS_DEFAULT_PIC,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW)

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

While 1
    $nMsg = GUIGetMsg()
    If  $nmsg = $startmining Then startmining()
    If  $nmsg = $exit Then Exit
    HotKeySet("{PAUSE}", "TogglePause")
    HotKeySet("{ESC}", "Terminate")
    HotKeySet("+!d", "ShowMessage")
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Func startmining()

    $var = MsgBox(0,"","Please make sure eve is ready check help doc Before starting.")


_WinWaitActivate("EVE","")
    opt("MouseClickDelay", 25000)
MouseClick("left",18,748,1)
    Opt("MouseClickDelay", 5000)
MouseClick("right",111,291,1)
    Opt("MouseClickDelay", 2000)
MouseClick("left",162,301,1,2000)
    Opt("MouseClickDelay", 54000)
MouseClick("right",762,207,1)
    Opt("MouseClickDelay", 1000)
MouseClick("left",790,262,1)
    Opt("MouseClickDelay", 1000)
MouseClick("right",737,222,1)
    Opt("MouseClickDelay", 1000)
MouseClick("left",780,274,1)
    Opt("MouseClickDelay", 1000)
MouseClick("left",620,656,1)
    Opt("MouseClickDelay", 1000)
MouseClick("left",499,63,1)
    Opt("MouseClickDelay", 1000)
MouseClick("left",662,655,1)
    Opt("MouseClickDelay", 180000)
MouseClick("right",724,560,1)
    Opt("MouseClickDelay", 1000)
MouseClick("left",770,584,1)
    Opt("MouseClickDelay", 1000)
MouseClick("right",762,207,1)
    Opt("MouseClickDelay", 2000)
MouseClick("left",790,262,1)
    Opt("MouseClickDelay", 1000)
MouseClick("right",737,222,1)
    Opt("MouseClickDelay", 1000)
MouseClick("right",762,207,1)
    Opt("MouseClickDelay", 1000)
MouseClick("left",790,262,1)
    Opt("MouseClickDelay", 1000)
MouseClick("right",737,222,1)
    Opt("MouseClickDelay", 2000)
MouseClick("left",780,274,1)
    Opt("MouseClickDelay", 1000)
MouseClick("left",620,656,1)
    Opt("MouseClickDelay", 1000)
MouseClick("right",759,579,1)
    Opt("MouseClickDelay", 15000)
MouseClick("left",838,620,1)
    Opt("MouseClickDelay", 2000)
MouseClick("left",499,63,1)
    Opt("MouseClickDelay", 1000)
MouseClick("left",662,655,1)
    Opt("MouseClickDelay", 1000)
MouseClick("right",167,205,1)
    Opt("MouseClickDelay", 1000)
MouseClick("left",217,260,1)
    Opt("MouseClickDelay", 80000)
MouseClick("right",439,103,1)
    Opt("MouseClickDelay", 1000)
MouseClick("left",523,108,1)
    Opt("MouseClickDelay", 1000)
Mouseclickdrag("left",470,216,130,718,3000)

EndFunc

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd


    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(4096,"","This is a message.")
EndFunc



Func _WinWaitActivate($title,$text,$timeout=0)
    WinWait($title,$text,$timeout)
    If Not WinActive($title,$text) Then WinActivate($title,$text)
    WinWaitActive($title,$text,$timeout)
EndFunc

$i = $Label8
Do
   MouseClickDelay $Label8
    $i = $Label8 + 1
Until $i = $label8
as you can see i have tried a Do to read the input box lol xD If somebody could please show me how it would be done id well appreciate it. Aslong as i know hot to read from the input box's im sure the rest is self explanitary with the autoit help and youtube.

for e.g i have
Code:
lzramm = GUICtrlCreateInput("180", 16, 208, 33, 21)
this is the input ammount that tells A mouseklick to wait for ammount of time that was inputted
nwomatt is offline  
Old 12/18/2010, 19:30   #2
 
elite*gold: 0
Join Date: Sep 2009
Posts: 445
Received Thanks: 286
GuiCtrlRead()

Get the syntax from the Scite-Help...
Banana.Crafts is offline  
Thanks
1 User
Old 12/18/2010, 19:35   #3
 
elite*gold: 0
Join Date: Sep 2009
Posts: 13
Received Thanks: 0
Quote:
Originally Posted by Banana.Crafts View Post
GuiCtrlRead()

Get the syntax from the Scite-Help...
thanks mate u a legend
nwomatt is offline  
Old 12/18/2010, 21:22   #4
 
elite*gold: 0
Join Date: Sep 2009
Posts: 13
Received Thanks: 0
so i tried lookin through that doc it doesnt show me how id make it a timer. so if somebody inputs 10000 into the input box it waits for 10 seconds then runs the command. But will be for. just an excample
Code:
 Opt("MouseClickDelay", 1000)
MouseClick("left",620,656,1)
nwomatt is offline  
Old 12/19/2010, 00:04   #5
 
elite*gold: 9
Join Date: Dec 2009
Posts: 1,071
Received Thanks: 819
Are you looking for Sleep() command?
.Infinite is offline  
Old 12/19/2010, 01:17   #6
 
elite*gold: 0
Join Date: Sep 2009
Posts: 13
Received Thanks: 0
Quote:
Originally Posted by .Infinite View Post
Are you looking for Sleep() command?
No but sleep would be better for the longer durations i never thought of that thx. What im tryin 2 do is to make it sleep/mouseclickdelay for the ammount of time i tell it to in the gui. $input1. Im new to scripting. been at it for 2 days .
nwomatt is offline  
Old 12/19/2010, 02:36   #7
 
elite*gold: 0
Join Date: Sep 2009
Posts: 13
Received Thanks: 0
thx all i found this ill take a look at it in the morning
nwomatt is offline  
Old 12/19/2010, 11:47   #8
 
elite*gold: 9
Join Date: Dec 2009
Posts: 1,071
Received Thanks: 819
I still don't understand what youre trying to do.
You could do it like this:

Sleep( GuiCtrlRead($TimeInput) ) It would Sleep for the time (in miliseconds) you declare in the GUI...
.Infinite is offline  
Old 12/19/2010, 15:48   #9
 
elite*gold: 0
Join Date: Sep 2009
Posts: 13
Received Thanks: 0
thx infinite yh thats the 1 just needed to know how to read from gui
Code:
GuiCtrlRead
i did it like
Code:
$lzrsleep1 = GUICtrlRead($lzramm) 
sleep($lzrsleep1)
MouseClick("left",499,63,1)
workes nicely. i will change it in future so the whole script dont freeze. just goin step at a time
nwomatt is offline  
Reply


Similar Threads Similar Threads
HP Scripter
04/09/2010 - Metin2 Private Server - 0 Replies
Hallo. Ich suche einen HomePage Scripter. für meinen server. Es soll nicht so besonders sein. aber etwas anderes wie lucy_girl HP etc. also etwas eigenes. Bei interessen. PN me hier.
Fun-scripter?
03/17/2010 - Metin2 Private Server - 0 Replies
Hallo ich wollte mal fragen ob es die Seite Fun-scripter noch gibt ?^^ mit den Metins hp und so .... MfG
HP Scripter
02/10/2010 - Metin2 Private Server - 3 Replies
Hey Com. Ich stelle mich hier offiziell als HP Scripter für einen Root Server zur Verfügung. Alle Standards werden enthalten sein: - Itemshop - Adminpanel - Registration - Downloadbereich
GM/Scripter
01/29/2010 - Metin2 Private Server - 0 Replies
Hi ich suche ein Server Hamachi oder Root wo aber schon der Grundsatz da ist und man sich auch damit auskennt. Ich würde gerne Helfen ich kann Scripten, DB, Server umbauen, Modden, HTML, Javascript (seh nett^^) und einiges mehr. Bitte nur mellden wenn TS und mic vorhanden ist.
Scripter help
09/22/2009 - Metin2 Private Server - 3 Replies
Hi ich bin einer von den Vielen die eine deutsche Exe brauchen. Hiermit bitte ich einen gekonnten Scripter eine zu scripten bzw eine zu entwickeln^^ Bitte macht des schnell ich denke viele würden sich freuen^^ PS: ja es gibt bereits eine halbe million themen, aber ich bitte hiermit jemanden eine zu scripten pls MfG also ich habe 2007,2008 und 2009er metin vesionen und alle mit der korea patch gepatched und die deutschen exen wollene infach nichts funktionieren. weiß jemand eine...



All times are GMT +1. The time now is 22:41.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.