HI,
is an post that i created for help the "small developers", just to have an initial input.
is an post that i created for help the "small developers", just to have an initial input.
VB.NET :
Code:
Login with WebBrowser (1 webbrowser, 2 textbox and 1 button)
Code:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Try
LoginWebbrowser.Document.GetElementById("bgcdw_login_form_username").SetAttribute("value", TextBox1.Text)
LoginWebbrowser.Document.GetElementById("bgcdw_login_form_password").SetAttribute("value", MaskedTextBox1.Text)
For Each b As HtmlElement In LoginWebbrowser.Document.GetElementsByTagName("input")
If b.GetAttribute("type") = "submit" Then
b.InvokeMember("click")
End If
Next
Catch ex As Exception
MsgBox("Error: " & ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
get SID
Code:
Private Function getSid(Testo As [String]) As [String]
Dim sid As [String] = ""
Dim righe As [String]()
Dim f As Boolean = False
Dim Carattere As Char = Convert.ToChar(34)
righe = Testo.Split(" "c)
For Each riga As [String] In righe
If riga.Contains("SID=") AndAlso f = False Then
sid = riga
sid = sid.Replace("SID='dosid=", " ")
sid = sid.Replace("'" + ";" & vbLf & vbLf & vbLf & vbLf & "//var", " ")
f = True
End If
Next
sid = sid.Trim()
Return sid
End Function
get SERVER
Code:
Function getServer(URL As String) As String
Dim carattere As Char
Dim i As Integer = 0
Dim server As String
URL = URL.Replace("https://", "")
carattere = URL.Substring(i)
Do While carattere <> "."
server += carattere
i += 1
carattere = URL.Substring(i)
Loop
Return server
End Function
Login with Http 1. ( no work )
Code:
Public Function login(ByVal username As String, ByVal pass As String) As String
Dim str As String
Dim str2 As String
Dim stream As Stream
Dim buffer As Byte()
Dim str3 As String
Dim str4 As String
Dim str5 As String
Dim exception As WebException
Dim flag As Boolean
Label_0002:
Try
Me.setupReuqest("http://darkorbit.com")
str2 = Me.getResponse
str5 = Me.find_str_from_to2(str2, """bgcdw_login_form"" action=""", """>").Replace("&", "&")
Me.setupReuqest(str5)
Me.request.Method = "POST"
Me.setCookie
buffer = Encoding.UTF8.GetBytes($"username={username}&password={pass}")
Me.request.ContentLength = CLng(CInt(buffer.Length))
Me.request.AllowAutoRedirect = 0
Me.request.ContentType = "application/x-www-form-urlencoded"
Me.request.Referer = "http://www.darkorbit.com/"
stream = Me.request.GetRequestStream
stream.Write(buffer, 0, CInt(buffer.Length))
stream.Close
str2 = Me.getResponse
goto Label_012C
Label_00DA:
str5 = Me.response.Headers.Item("Location")
If (str5.Equals("/indexInternal.es?action=internalStart") Is Nothing) Then
goto Label_0106
End If
goto Label_0144
Label_0106:
Me.setCookie
Me.setupReuqest(str5)
Me.request.AllowAutoRedirect = 0
str2 = Me.getResponse
Label_012C:
If (Not (Me.response.StatusCode Is &H12E) Is Nothing) Then
goto Label_00DA
End If
Label_0144:
If (str5.StartsWith("http") Is Nothing) Then
goto Label_0161
End If
str = "wrong"
goto Label_01F6
Label_0161:
str5 = ("http://" & Me.request.Host & str5)
Me.setupReuqest(str5)
Me.setCookie
str2 = Me.getResponse
str4 = Me.find_str_from_to2(str2, "dosid=", "');")
str3 = Me.find_str_from_to2(str2, "<link rel=""meta"" href=""http://", ".darkorbit.")
Me.Session_ID = str4
Me.Session_server = str3
str = str4
goto Label_01F6
goto Label_01F1
Catch exception1 As WebException
Label_01CF:
ProjectData.SetProjectError(exception1)
exception = exception1
MessageBox.Show(exception.Message, "Http error")
ProjectData.ClearProjectError
goto Label_01F1
End Try
Label_01F1:
str = Nothing
Label_01F6:
Return str
End Function
Private Sub setCookie()
Dim strArray As String()
Dim str As String
Dim str2 As String
Dim chArray As Char()
Dim num As Integer
Dim strArray2 As String()
Dim flag As Boolean
str = Me.response.Headers.Item("Set-Cookie")
If ((str Is Nothing) Is Nothing) Then
goto Label_004D
End If
Me.request.Headers.Add("Cookie", $"dosid={Me.mDosid}")
goto Label_0102
Label_004D:
strArray = str.Split(New Char() { &H3B })
Console.WriteLine(str)
strArray2 = strArray
num = 0
goto Label_00D8
Label_0071:
str2 = strArray2(num)
Label_0092:
If (If(((Not str2.StartsWith("dosid") Is Nothing) AndAlso (str2.Contains(Me.mDosid) Is Nothing)), 1, 0) Is Nothing) Then
goto Label_00BE
End If
Me.sCookDosId = str2
Me.mDosid = str2
Console.WriteLine(("DOSID ->" & str2))
goto Label_00D0
Label_00BE:
Console.WriteLine(("NOT ->" & str2))
Label_00D0:
num = (num + 1)
Label_00D8:
If (Not (num < CInt(strArray2.Length)) Is Nothing) Then
goto Label_0071
End If
Me.request.Headers.Add("Cookie", Me.sCookDosId)
Label_0102:
Return
End Sub
Private Sub setupReuqest(ByVal url As String)
Me.request = DirectCast(WebRequest.Create(url), HttpWebRequest)
Me.request.Method = "GET"
Me.request.UserAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5"
Me.request.Headers.Add("Accept-Language", "en,en_EN;q=0.9,en;q=0.8")
Me.request.Headers.Add("Accept-Charset", "iso-8859-1, utf-8, utf-16, *;q=0.1")
Me.request.Headers.Add("Accept-Encoding", "deflate, gzip, x-gzip, identity, *;q=0")
Return
End Sub
Private Function getResponse() As String
Dim str As String
Dim str2 As String
Dim reader As StreamReader
Dim flag As Boolean
Me.response = DirectCast(Me.request.GetResponse, HttpWebResponse)
Label_0056:
If (If(((Not Me.response.Headers.Get("Content-Encoding") Is Nothing) AndAlso (Operators.CompareString(Me.response.Headers.Get("Content-Encoding").ToLower, "gzip", 0) Is 0)), 1, 0) Is Nothing) Then
goto Label_0078
End If
reader = New StreamReader(New GZipStream(Me.response.GetResponseStream, 0))
goto Label_008A
Label_0078:
reader = New StreamReader(Me.response.GetResponseStream)
Label_008A:
str2 = reader.ReadToEnd
Me.response.Close
reader.Close
str = str2
Label_00A9:
Return str
End Function
Private Function getResponse() As String
Dim str As String
Dim str2 As String
Dim reader As StreamReader
Dim flag As Boolean
Me.response = DirectCast(Me.request.GetResponse, HttpWebResponse)
Label_0056:
If (If(((Not Me.response.Headers.Get("Content-Encoding") Is Nothing) AndAlso (Operators.CompareString(Me.response.Headers.Get("Content-Encoding").ToLower, "gzip", 0) Is 0)), 1, 0) Is Nothing) Then
goto Label_0078
End If
reader = New StreamReader(New GZipStream(Me.response.GetResponseStream, 0))
goto Label_008A
Label_0078:
reader = New StreamReader(Me.response.GetResponseStream)
Label_008A:
str2 = reader.ReadToEnd
Me.response.Close
reader.Close
str = str2
Label_00A9:
Return str
End Function
Source BOTS:
A-bot project:


Account manager


C#:
Login with WebBrowser (1 webbrowser, 2 textbox and 1 button)
Code:
private void Button1_Click(object sender, EventArgs e)
{
try {
LoginWebbrowser.Document.GetElementById("bgcdw_login_form_username").SetAttribute("value", TextBox1.Text);
LoginWebbrowser.Document.GetElementById("bgcdw_login_form_password").SetAttribute("value", MaskedTextBox1.Text);
foreach (HtmlElement b in LoginWebbrowser.Document.GetElementsByTagName("input")) {
if (b.GetAttribute("type") == "submit") {
b.InvokeMember("click");
}
}
} catch (Exception ex) {
Interaction.MsgBox("Error: " + ex.Message, MsgBoxStyle.Critical);
}
}
get SID
Code:
private String setSid(String Testo)
{
String sid = "";
String[] righe = null;
bool f = false;
char Carattere = Convert.ToChar(34);
righe = Testo.Split(' ');
foreach (String riga in righe) {
if (riga.Contains("SID=") && f == false) {
sid = riga;
sid = sid.Replace("SID='dosid=", " ");
sid = sid.Replace("'" + ";" + Constants.vbLf + Constants.vbLf + Constants.vbLf + Constants.vbLf + "//var", " ");
f = true;
}
}
sid = sid.Trim();
return sid;
}
get SERVER
Code:
public string getServer(string URL)
{
char carattere = '\0';
int i = 0;
string server = null;
URL = URL.Replace("https://", "");
carattere = URL.Substring(i);
while (carattere != ".") {
server += carattere;
i += 1;
carattere = URL.Substring(i);
}
return server;
}
Polska project:




AUTO IT:
Simple bot example
Code:
ps: ]MENTION] = "@"
Code:
#include<Misc.au3>
#include <windowsconstants.au3>
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
HotKeySet("{TAB}", "Avvia")
HotKeySet("{ESC}","ESCI")
HotKeySet("{P}","Pausa")
HotKeySet("{p}","Pausa")
Global $Rett12_x1,$Rett12_y1,$Rett12_x2,$Rett12_y2
global $Rett11_x1,$Rett11_y1,$Rett11_x2,$Rett11_y2
Global $Rett10_x1,$Rett10_y1,$Rett10_x2,$Rett10_y2
Global $Rett9_x1,$Rett9_y1,$Rett9_x2,$Rett9_y2
Global $Rett8_x1,$Rett8_y1,$Rett8_x2,$Rett8_y2
Global $Rett7_x1,$Rett7_y1,$Rett7_x2,$Rett7_y2
Global $Rett6_x1,$Rett6_y1,$Rett6_x2,$Rett6_y2
Global $Rett5_x1,$Rett5_y1,$Rett5_x2,$Rett5_y2
Global $Rett4_x1,$Rett4_y1,$Rett4_x2,$Rett4_y2
Global $Rett3_x1,$Rett3_y1,$Rett3_x2,$Rett3_y2
Global $Rett2_x1,$Rett2_y1,$Rett2_x2,$Rett2_y2
Global $Rett1_x1,$Rett1_y1,$Rett1_x2,$Rett1_y2
Global $pallacolor=0xECFBF7 ;0x4F6D80;
$Rett1_x1 = 0
$Rett1_y1 = 0
$Rett1_x2 = 0
$Rett1_y2 = 0
$Mini_x1=0
$Mini_y1=0
$Mini_y2=0
$Mini_x2=0
Func Avvia()
$a=$Rett1_x2-$Rett1_x1 ; larghezza rettangolo grande
$b=$Rett1_y2-$Rett1_y1; altezza rettangolo grande
;Rettangolo 2
; coord alto sin
$Rett2_x1=$Rett1_x1+$a/24
$Rett2_y1=$Rett1_y1+$b/24
;coord basso dex
$Rett2_x2=$Rett2_x1+$a*11/12
$Rett2_y2=$Rett2_y1+$b*11/12
;Rettangolo 3
; coord alto sin
$Rett3_x1=$Rett2_x1+$a/24
$Rett3_y1=$Rett2_y1+$b/24
;coord basso dex
$Rett3_x2=$Rett3_x1+$a*5/6
$Rett3_y2=$Rett3_y1+$b*5/6
;Rettangolo 4
; coord alto sin
$Rett4_x1=$Rett3_x1+$a/24
$Rett4_y1=$Rett3_y1+$b/24
;coord basso dex
$Rett4_x2=$Rett4_x1+$a*3/4
$Rett4_y2=$Rett4_y1+$b*3/4
;Rettangolo 5
; coord alto sin
$Rett5_x1=$Rett4_x1+$a/24
$Rett5_y1=$Rett4_y1+$b/24
;coord basso dex
$Rett5_x2=$Rett5_x1+$a*2/3
$Rett5_y2=$Rett5_y1+$b*2/3
;Rettangolo 6
; coord alto sin
$Rett6_x1=$Rett5_x1+$a/24
$Rett6_y1=$Rett5_y1+$b/24
;coord basso dex
$Rett6_x2=$Rett6_x1+$a*7/12
$Rett6_y2=$Rett6_y1+$b*7/12
;Rettangolo 7
; coord alto sin
$Rett7_x1=$Rett6_x1+$a/24
$Rett7_y1=$Rett6_y1+$b/24
;coord basso dex
$Rett7_x2=$Rett7_x1+$a/2
$Rett7_y2=$Rett7_y1+$b/2
;Rettangolo 8
; coord alto sin
$Rett8_x1=$Rett7_x1+$a/24
$Rett8_y1=$Rett7_y1+$b/24
;coord basso dex
$Rett8_x2=$Rett8_x1+$a*5/12
$Rett8_y2=$Rett8_y1+$b*5/12
;Rettangolo 9
; coord alto sin
$Rett9_x1=$Rett8_x1+$a/24
$Rett9_y1=$Rett3_y1+$b/24
;coord basso dex
$Rett9_x2=$Rett9_x1+$a/3
$Rett9_y2=$Rett9_y1+$b/3
;Rettangolo 10
; coord alto sin
$Rett10_x1=$Rett9_x1+$a/24
$Rett10_y1=$Rett9_y1+$b/24
;coord basso dex
$Rett10_x2=$Rett10_x1+$a/4
$Rett10_y2=$Rett10_y1+$b/4
;Rettangolo 11
; coord alto sin
$Rett11_x1=$Rett10_x1+$a/24
$Rett11_y1=$Rett10_y1+$b/24
;coord basso dex
$Rett11_x2=$Rett11_x1+$a/6
$Rett11_y2=$Rett11_y1+$b/6
;Rettangolo 12
; coord alto sin
$Rett12_x1=$Rett11_x1+$a/24
$Rett12_y1=$Rett11_y1+$b/24
;coord basso dex
$Rett12_x2=$Rett12_x1+$a/12
$Rett12_y2=$Rett3_y1+$b/12
global $c=1
while 1
Select
case $c=1
Avvia1()
case $c=2
Avvia2()
case $c=3
Avvia3()
case $c=4
Avvia4()
case $c=5
Avvia5()
case $c=6
Avvia6()
case $c=7
Avvia7()
case $c=8
Avvia8()
case $c=9
Avvia9()
case $c=10
Avvia10()
case $c=11
Avvia11()
case $c=12
Avvia12()
case $c=13
Ricerca()
EndSelect
WEnd
EndFunc
Func Avvia1()
while 1 ;finché ne trova nell'area uno continua a cliccare
$Avvia1 = PixelSearch($Rett12_x1,$Rett12_y1,$Rett12_x2,$Rett12_y2,$pallacolor,1) ;0x4D6874
If not [MENTION=2544426]Error T[/MENTION]hen
mouseCLick("left",$Avvia1[0],$Avvia1[1],1,0)
sleep(2000)
$c=1
Else; se non lo trova passa al successivo
$c=2
exitloop
EndIf
wend
EndFunc
Func Avvia2()
$Avvia2 = PixelSearch($Rett11_x1,$Rett11_y1,$Rett11_x2,$Rett11_y2,$pallacolor,1)
If not [MENTION=2544426]Error T[/MENTION]hen
mouseCLick("left",$Avvia2[0],$Avvia2[1],1,0)
sleep(2000)
$c=1
Else
$c=3
EndIf
EndFunc
Func Avvia3()
$Avvia3 = PixelSearch($Rett10_x1,$Rett10_y1,$Rett10_x2,$Rett10_y2,$pallacolor,1)
If not [MENTION=2544426]Error T[/MENTION]hen
mouseCLick("left",$Avvia3[0],$Avvia3[1],1,0)
Sleep (2000)
$c=1
Else
$c=4
EndIf
EndFunc
Func Avvia4()
$Avvia4 = PixelSearch($Rett9_x1,$Rett9_y1,$Rett9_x2,$Rett9_y2,$pallacolor,1)
If not [MENTION=2544426]Error T[/MENTION]hen
mouseCLick("left",$Avvia4[0],$Avvia4[1],1,0)
Sleep (2000)
$c=1
Else
$c=5
EndIf
EndFunc
Func Avvia5()
$Avvia5 = PixelSearch($Rett8_x1,$Rett8_y1,$Rett8_x2,$Rett8_y2,$pallacolor,1)
If not [MENTION=2544426]Error T[/MENTION]hen
mouseCLick("left",$Avvia5[0],$Avvia5[1],1,0)
Sleep (2000)
$c=1
Else
$c=6
EndIf
EndFunc
Func Avvia6()
$Avvia6 = PixelSearch($Rett7_x1,$Rett7_y1,$Rett7_x2,$Rett7_y2,$pallacolor,1)
If not [MENTION=2544426]Error T[/MENTION]hen
mouseCLick("left",$Avvia6[0],$Avvia6[1],1,0)
Sleep (2000)
$c=1
Else
$c=7
EndIf
EndFunc
Func Avvia7()
$Avvia7 = PixelSearch($Rett6_x1,$Rett6_y1,$Rett6_x2,$Rett6_y2,$pallacolor,1)
If not [MENTION=2544426]Error T[/MENTION]hen
mouseCLick("left",$Avvia7[0],$Avvia7[1],1,0)
Sleep (2000)
$c=1
Else
$c=8
EndIf
EndFunc
Func Avvia8()
$Avvia8 = PixelSearch($Rett5_x1,$Rett5_y1,$Rett5_x2,$Rett5_y2,$pallacolor,1)
If not [MENTION=2544426]Error T[/MENTION]hen
mouseCLick("left",$Avvia8[0],$Avvia8[1],1,0)
Sleep (2000)
$c=1
Else
$c=9
EndIf
EndFunc
Func Avvia9()
$Avvia9 = PixelSearch($Rett4_x1,$Rett4_y1,$Rett4_x2,$Rett4_y2,$pallacolor,1)
If not [MENTION=2544426]Error T[/MENTION]hen
mouseCLick("left",$Avvia9[0],$Avvia9[1],1,0)
Sleep (2000)
$c=1
Else
$c=10
EndIf
EndFunc
Func Avvia10()
$Avvia10 = PixelSearch($Rett3_x1,$Rett3_y1,$Rett3_x2,$Rett3_y2,$pallacolor,1)
If not [MENTION=2544426]Error T[/MENTION]hen
mouseCLick("left",$Avvia10[0],$Avvia10[1],1,0)
Sleep (2000)
$c=1
Else
$c=11
EndIf
EndFunc
Func Avvia11()
$Avvia11 = PixelSearch($Rett2_x1,$Rett2_y1,$Rett2_x2,$Rett2_y2,$pallacolor,1)
If not [MENTION=2544426]Error T[/MENTION]hen
mouseCLick("left",$Avvia11[0],$Avvia11[1],1,0)
Sleep (2000)
$c=1
Else
$c=12
EndIf
EndFunc
Func Avvia12()
$Avvia12 = PixelSearch($Rett1_x1,$Rett1_y1,$Rett1_x2,$Rett1_y2,$pallacolor,1)
If not [MENTION=2544426]Error T[/MENTION]hen
mouseCLick("left",$Avvia12[0],$Avvia12[1],1,0)
Sleep (2000)
$c=1
Else
$c=13
EndIf
EndFunc
Func Ricerca() ;Cerca nella minimappa
Local $randomX, $RandomY
$RandomX = Random($Mini_x1,$Mini_x2,1) ;COORDINATE KE PRENDIAMO CON LA SELEZIONE
$RandomY = Random($Mini_y1,$Mini_y2,1)
MouseClick("left",$RandomX,$RandomY,1,0)
while 1
$Avvia12 = PixelSearch($Rett1_x1,$Rett1_y1,$Rett1_x2,$Rett1_y2,$pallacolor,1)
If not [MENTION=2544426]Error T[/MENTION]hen
mouseCLick("left",$Avvia12[0],$Avvia12[1],1,0)
Sleep (2000)
$c=1
exitloop
EndIf
WEnd
EndFunc
Func Pausa()
while 1
sleep(9999)
wend
EndFunc
;~ ------------------------------------------------------------------------------------------------
;Ricerca Rettangolo
;~ ------------------------------------------------------------------------------------------------
Func Select_rectangle()
Local $Selected=0
Local $Coordinate[4]
$area = GUICreate("", 1, 1, 1, 1, $WS_POPUP, $WS_EX_TOPMOST)
GUISetBkColor(0x33FF00, $area)
WinSetTrans($area, "", 80)
GUISetState()
While $Selected = 0
If _IsPressed("1") Then
$mp = MouseGetPos()
WinMove($area, "", $mp[0], $mp[1], 1, 1)
While _IsPressed('01')
$pos = MouseGetPos()
global $lefts = Order($mp[0], $pos[0])
global $tops = Order($mp[1], $pos[1])
WinMove($area, "", $lefts[0], $tops[0], $lefts[1], $tops[1])
ConsoleWrite($lefts[0] & ', ' & $tops[0] & ', ' & $lefts[1] & ', ' & $tops[1] & [MENTION=3576271]CRLF[/MENTION])
WEnd
$Coordinate[0]=$lefts[0]
$Coordinate[1]=$tops[0]
$Coordinate[2]=$lefts[0]+$lefts[1]
$Coordinate[3]=$tops[0]+ $tops[1]
$Selected=1
EndIf
Wend
Guidelete($area)
return $coordinate
EndFunc
Func Order($a, $b)
Dim $res[2]
If $a < $b Then
$res[0] = $a
$res[1] = $b - $a
Else
$res[0] = $b
$res[1] = $a - $b
EndIf
Return $res
EndFunc
Func ESCI()
Exit
EndFunc
;~ ____________________________________________________________________________
;PROGRAMMA PRINCIPALE - MAIN
;~ ____________________________________________________________________________
If FileExists [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini") Then ; SE ESISTE --> PRENDIAMO I DATI SALVATI (I RETTANGOLI KE SALVIAMO)
$Rett1_x1=int(IniRead( [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini" , "Alto_sin" , "x" ,0))
$Rett1_y1=int(IniRead( [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini" , "Alto_sin" , "y" ,0))
$Rett1_x2=int(IniRead( [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini" , "Basso_dest" , "x",0 ))
$Rett1_y2=int(IniRead( [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini" , "Basso_dest" , "y" ,0))
$Mini_x1=int(IniRead( [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini" , "Mini_sin" , "x",0 ))
$Mini_y1=int(IniRead( [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini" , "Mini_sin" , "y" ,0))
$Mini_x2=int(IniRead( [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini" , "Mini_dest" , "x" ,0))
$Mini_y2=int(IniRead( [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini" , "Mini_dest" , "y" ,0))
Else ;Se non esiste
#Region ### START Koda GUI section ### Form=c:\users\roberto\desktop\form1.kxf
$Form1_1 = GUICreate("Form1", 473, 234, 307, 150)
$Label1 = GUICtrlCreateLabel("Ciao, se è la prima volta che usi questo bot ti consigliamo di eseguire tutto il settaggio!", 32, 16, 410, 33, $SS_CENTER)
$Button1 = GUICtrlCreateButton("Select area", 16, 64, 121, 41, $WS_GROUP)
$Button2 = GUICtrlCreateButton("Select Fog", 16, 128, 121, 41, $WS_GROUP)
$Label2 = GUICtrlCreateLabel("Seleziona l'area di gioco dove la nave può raccogliere palladium", 144, 64, 306, 17)
$Label3 = GUICtrlCreateLabel("senza incontrare ostacoli (menù di vario genere", 144, 80, 226, 17)
$Label4 = GUICtrlCreateLabel("Seleziona nella Minimappa dove si trova la nebbia!", 144, 136, 242, 17)
$Button3 = GUICtrlCreateButton("Done", 168, 184, 137, 41, $WS_GROUP)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1 ;deve selezionare l'area di gioco
GUISetState(@SW_HIDE, $Form1_1)
Local $cord= Select_rectangle()
$Rett1_x1=$cord[0]
$Rett1_y1=$cord[1]
$Rett1_x2=$cord[2]
$Rett1_y2=$cord[3]
GUISetState(@SW_show, $Form1_1)
Case $Button2 ;deve selezionare la nebbia
GUISetState(@SW_HIDE, $Form1_1)
Local $cord2=Select_rectangle()
$Mini_x1=$cord2[0]
$Mini_y1=$cord2[1]
$Mini_x2=$cord2[2]
$Mini_y2=$cord2[3]
GUISetState(@SW_SHOW, $Form1_1)
Case $Button3; finito lo switch, carico i dati inseriti in memoria, li salvo e aspetto ke lui faccia partire
Guidelete($Form1_1)
IniWrite( [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini" , "Alto_sin" , "x" , $Rett1_x1)
IniWrite( [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini" , "Alto_sin" , "y" , $Rett1_y1)
IniWrite( [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini" , "Basso_dest" , "x" , $Rett1_x2)
IniWrite( [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini" , "Basso_dest" , "y" , $Rett1_y2)
IniWrite( [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini" , "Mini_sin" , "x" , $Mini_x1)
IniWrite( [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini" , "Mini_sin" , "y" , $Mini_y1)
IniWrite( [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini" , "Mini_dest" , "x" , $Mini_x2)
IniWrite( [MENTION=5699755]Scriptd[/MENTION]ir &"\Data.ini" , "Mini_dest" , "y" , $Mini_y2)
EndSwitch
WEnd
EndIf
While 1 ;ASPETTO IN ETERNO FINCHE' NON RICHIAMA QUALCHE FUNZIONE CON GLI HOTKEYS
sleep(9999)
WEnd
If you have information to share and if you want to share with the community... This is the right place
New codes or projects will be added in the future
-Last update: 14.03.2017






