Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 02:15

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

Advertisement



help me please on this program autoit

Discussion on help me please on this program autoit within the AutoIt forum part of the Coders Den category.

Closed Thread
 
Old   #1
 
elite*gold: 0
Join Date: May 2009
Posts: 1
Received Thanks: 0
Post help me please on this program autoit

hello all,, i did program by autoit for game silkroad this for using sbotmod login char auto but i got problem after i finsh and runing scrpit and all things done ...it open sbotmod then sbot then wont write id and pw and pc help me i think it need to update it but idk how ....here my code program :

Opt("WinTitleMatchMode", 1)
#include <GUIConstantsEx.au3>
#Include <GuiListView.au3>

Global $Paused, $Char1[100], $CharSet[100]
HotKeySet("{PAUSE}", "TogglePause")
HotKeySet("{F5}","LoginAll")
HotKeySet("{F1}","help")
HotKeySet("{F2}","SetCoords")
HotKeySet("{F3}","SetItems")
$Try=1
Main()
Func Main()
$Test=IniReadSectionNames ( "Char.ini" )
If @error or $Test[0]=0 Then
ToolTip("No Login-Data availible. Insert Chardata.",0,0,"SBotMod Login",3,4)
AddChar()
EndIf
ToolTip("Scanning for new SBot Window !!! Press F1 for Info",0,0,"SBotMod Login",1,4)
While 1
Login()
ToolTip("Scanning for new SBot Window !!! Press F1 for Info",0,0,"SBotMod Login",1,4)
WEnd
EndFunc


Func Login()
WinWait("SBot v")
Do
$SBot=WinGetTitle ("SBot v")
$hWnd = WinGetHandle($SBot)
sleep(1000)
Until StringInStr ( ControlGetText($hWnd,"","[CLASS:RICHEDIT; INSTANCE:13]"), "Login successfull, have fun " )>0
$Char=ControlGetText ( $SBot, "", "[CLASS:Edit; INSTANCE:4]" )
ToolTip("["&$Char&"] SBot found. Starting Login !!!",0,0,"SBotMod Login",1,4)
$GetData=IniReadSection("Char.ini",$Char)
if @error=1 Then
ToolTip("Can't locate Char Data !!! Closing SBot",0,0,"SBotMod Login",3,4)
Sleep(3000)
Return
EndIf
;~ If ProcessExists("SBotModCL.exe")=0 Then
;~ ToolTip("SBotModCL isn't running!!! SBotModCL.exe will start now.",0,0,"SBotMod Login",3,4)
;~ ShellExecute ( "SBotModCL.exe" , "" ,$GetData[4][1] )
;~ ProcessWait("SBotModCL.exe")
;~ sleep(3000)
;~ ToolTip("Return to Login ["&$Char&"] !!!",0,0,"SBotMod Login",1,4)
;~ EndIf
BlockInput(1)
WinActivate ( $hWnd )
Sleep(500)
ControlSetText("SBotMod","Login Server:","[CLASS:Edit; INSTANCE:1]",_Base64Decode($GetData[1][1]))
ControlSetText("SBotMod","Login Server:","[CLASS:Edit; INSTANCE:2]",_Base64Decode($GetData[2][1]))
ControlSetText("SBotMod","Login Server:","[CLASS:Edit; INSTANCE:3]",_Base64Decode($GetData[3][1]))
ControlCommand("SBotMod","Login Server:","[CLASS:ComboBox; INSTANCE:1]","SelectString", _Base64Decode($GetData[3][1]))
ControlCommand("SBotMod","Start clientless by pressing","[CLASS:Button; INSTANCE:8]","Check")
ControlCommand("SBotMod","Clientless relogin on DC","[CLASS:Button; INSTANCE:13]","Check")
Sleep(500)
ControlClick($SBot, "Start client!", "[CLASS:Button; INSTANCE:3]")
BlockInput(0)
WinSetTitle($hWnd,"","("&$Char&") "&$SBot)
WinSetState($hWnd,"",@SW_MINIMIZE)
Do
sleep(1000)
Until StringInStr ( ControlGetText($hWnd,"","[CLASS:RICHEDIT; INSTANCE:13]"), "Artificially waiting some time before sending login information" )>0
sleep(2000)
EndFunc


Func LoginAll()
ToolTip("Auto Login Startet !!!",0,0,"SBot Auto Login",1,4)
$Anzahl=IniReadSectionNames("Char.ini")
GUICreate("SBotMod Auto Login",200,($Anzahl[0]*20)+50)
for $i=1 to $Anzahl[0]
GUISetFont (9 ,400,"","Times New Roman" )
$Char1[$i]=GUICtrlCreateCheckbox($Anzahl[$i],10,(20*($i-1))+10)
GUICtrlSetState ( -1, $GUI_CHECKED )
Next
$Start = GUICtrlCreateButton("Start Login", 10, ($Anzahl[0]*20)+20, 180, 25)
Guisetstate()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
GUIDelete()
ToolTip("Scanning for new SBot Window !!! Press F1 for Info",0,0,"SBotMod Login",1,4)
Return
Case $Start
for $i=1 to $Anzahl[0]
$Char1[$i]=GUICtrlRead($Char1[$i],0)
Next
GUIDelete()
for $i=1 to $Anzahl[0]
If $Char1[$i]=1 and WinExists("["&$Anzahl[$i]&"] SBot v")=0 Then
if WinExists("SBotMod v", "Options")=1 Then
WinClose("SBotMod v", "Options")
EndIf
$Charsection=IniReadSection("Char.ini",$Anzahl[$i])
ShellExecute("SBotMod.exe","",$Charsection[4][1])
WinWait("SBotMod v","Options")
ControlListView ( "SBotMod v", "Options", "[CLASS:SysListView32; INSTANCE:1]", "SelectClear" )
ControlCommand ( "SBotMod v", "Options","[CLASS:Button; INSTANCE:4]", "UnCheck")
ControlListView ( "SBotMod v", "Options", "[CLASS:SysListView32; INSTANCE:1]", "Select", ControlListView ( "SBotMod v", "Options", "[CLASS:SysListView32; INSTANCE:1]", "FindItem", $Anzahl[$i],1 ))
Sleep(500)
ControlClick("SBotMod v","Start Selected","[CLASS:Button; INSTANCE:1]")
ToolTip("Start login "&$Anzahl[$i]&" !!!",0,0,"SBot Auto Login",1,4)
Login()
sleep(2000)
EndIf
Next
ToolTip("Auto Login is ended!!! Scanning for new SBot Window !!! Press F1 for Info",0,0,"SBotMod Login",1,4)
Return
EndSwitch
WEnd
EndFunc


Func help()
GUICreate("SBotMod Login - Help",200,150)
GUICtrlCreateLabel(" Key - Function", 10, 10)
GUICtrlCreateLabel(" F1 - Help", 10, 30)
GUICtrlCreateLabel(" F2 - Add new Coordinates", 10, 50)
GUICtrlCreateLabel(" F3 - Rewrite Itemlist", 10, 70)
GUICtrlCreateLabel(" F5 - SBot Auto Login", 10, 90)
$continue=GUICtrlCreateButton("Continue",100, 120, 80)
$new=GUICtrlCreateButton("add Char", 10, 120, 80)
Guisetstate()
While 1
$msg = GUIGetMsg()
if $msg=$continue or $msg=$GUI_EVENT_CLOSE Then
GUIDelete()
Return
ElseIf $msg=$new Then
GUIDelete()
AddChar()
Return
EndIf
WEnd
EndFunc


Func AddChar()
While 1
GUICreate("SBotMod Login - Add Char",200,250)
GUISetFont (9 ,400,"","Times New Roman" )
$Charname=GUICtrlCreateInput ( "Charname", 10, 10, 180 )
$ID=GUICtrlCreateInput ( "Char-ID", 10, 40, 180)
$PW=GUICtrlCreateInput ( "Char-Password", 10, 70, 180 )
$PC=GUICtrlCreateInput ( "Char-Passcode", 10, 100, 180 )
$Server=GUICtrlCreateInput ( "Server", 10, 130, 180 )
$hPath = GUICtrlCreateInput("Path to SBotMod.exe", 10, 160, 140, 20)
$hSearch = GUICtrlCreateButton("Open", 150, 160, 40, 20)
$add = GUICtrlCreateButton("Add", 10, 210, 180, 25)
Guisetstate()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
GUIDelete()
Return
Case $hSearch
$sPath = FileSelectFolder ( "Select the Path to the SBodMod folder", "" ,4 )
If Not @error Then GUICtrlSetData($hPath, $sPath)
Case $add
IniWrite ( "Char.ini", GUICtrlRead($Charname), "ID", _Base64Encode(GUICtrlRead($ID)) )
IniWrite ( "Char.ini", GUICtrlRead($Charname), "PW", _Base64Encode(GUICtrlRead($PW)) )
IniWrite ( "Char.ini", GUICtrlRead($Charname), "PC", _Base64Encode(GUICtrlRead($PC)) )
IniWrite ( "Char.ini", GUICtrlRead($Charname), "Server", _Base64Encode(GUICtrlRead($Server)) )
IniWrite ( "Char.ini", GUICtrlRead($Charname), "Path", GUICtrlRead($hPath) )
GUIDelete()
ExitLoop
EndSwitch
WEnd
WEnd
EndFunc


Func SetCoords()
Opt("WinTitleMatchMode", 2)
$winlist=WinList( "] SBot v" , "" )
GUICreate("SBotMod Login - SetCoords",200,(20*$winlist[0][0])+100)
GUISetFont (9 ,400,"","Times New Roman" )
$Charname=GUICtrlCreateCombo ( "Get Coords from", 10, 10, 180 )
for $i=1 to $winlist[0][0]
GUICtrlSetData(-1, ControlGetText ( $winlist[$i][0],"","[CLASS:Edit; INSTANCE:4]" ),$winlist[$i][0])
Next
$Trainplace=GUICtrlCreateCombo ( "Trainplace 1", 10, 40, 180 )
GUICtrlSetData(-1, "Trainplace 2|Trainplace 3")
for $i=1 to $winlist[0][0]
GUISetFont (9 ,400,"","Times New Roman" )
$CharSet[$i]=GUICtrlCreateCheckbox(ControlGetText ( $winlist[$i][0],"","[CLASS:Edit; INSTANCE:4]" ),10,(20*($i-1))+65)
GUICtrlSetState ( -1, $GUI_CHECKED )
Next
$Start = GUICtrlCreateButton("Start", 10, 20*$winlist[0][0]+70, 180, 25)
Guisetstate()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Opt("WinTitleMatchMode", 1)
GUIDelete()
Return
Case $Start
for $i=1 to $winlist[0][0]
$CharSet[$i]=GUICtrlRead($CharSet[$i],0)
Next
$SBot="["&GUICtrlRead($Charname)&"] SBot v"
$Trainplace=GUICtrlRead($Trainplace)
GUIDelete()
Switch $Trainplace
Case "Trainplace 1"
$X=ControlGetText ( $SBot,"","[CLASS:Edit; INSTANCE:43]" )
$Y=ControlGetText ( $SBot,"","[CLASS:Edit; INSTANCE:44]" )
$Z=ControlGetText ( $SBot,"","[CLASS:Edit; INSTANCE:45]" )
Case "Trainplace 2"
$X=ControlGetText ( $SBot,"","[CLASS:Edit; INSTANCE:49]" )
$Y=ControlGetText ( $SBot,"","[CLASS:Edit; INSTANCE:50]" )
$Z=ControlGetText ( $SBot,"","[CLASS:Edit; INSTANCE:51]" )
Case "Trainplace 3"
$X=ControlGetText ( $SBot,"","[CLASS:Edit; INSTANCE:55]" )
$Y=ControlGetText ( $SBot,"","[CLASS:Edit; INSTANCE:56]" )
$Z=ControlGetText ( $SBot,"","[CLASS:Edit; INSTANCE:57]" )
EndSwitch
for $i=1 to $winlist[0][0]
if $CharSet[$i]=1 Then
Switch $Trainplace
Case "Trainplace 1"
ControlCommand ( $winlist[$i][0], "Autowalk","[CLASS:Button; INSTANCE:189]", "Check")
ControlCommand ( $winlist[$i][0], "Active","[CLASS:Button; INSTANCE:186]", "Check")
ControlSetText ( $winlist[$i][0],"","[CLASS:Edit; INSTANCE:43]" ,$X)
ControlSetText ( $winlist[$i][0],"","[CLASS:Edit; INSTANCE:44]" ,$Y)
ControlSetText ( $winlist[$i][0],"","[CLASS:Edit; INSTANCE:45]" ,$Z)
Case "Trainplace 2"
ControlCommand ( $winlist[$i][0], "Autowalk","[CLASS:Button; INSTANCE:196]", "Check")
ControlCommand ( $winlist[$i][0], "Active","[CLASS:Button; INSTANCE:193]", "Check")
ControlSetText ( $winlist[$i][0],"","[CLASS:Edit; INSTANCE:49]" ,$X)
ControlSetText ( $winlist[$i][0],"","[CLASS:Edit; INSTANCE:50]" ,$Y)
ControlSetText ( $winlist[$i][0],"","[CLASS:Edit; INSTANCE:51]" ,$Z)
Case "Trainplace 3"
ControlCommand ( $winlist[$i][0], "Autowalk","[CLASS:Button; INSTANCE:203]", "Check")
ControlCommand ( $winlist[$i][0], "Active","[CLASS:Button; INSTANCE:200]", "Check")
ControlSetText ( $winlist[$i][0],"","[CLASS:Edit; INSTANCE:55]" ,$X)
ControlSetText ( $winlist[$i][0],"","[CLASS:Edit; INSTANCE:56]" ,$Y)
ControlSetText ( $winlist[$i][0],"","[CLASS:Edit; INSTANCE:57]" ,$Z)
EndSwitch
ControlClick( $winlist[$i][0],"Stop training","[CLASS:Button; INSTANCE:332]")
sleep(50)
ControlClick( $winlist[$i][0],"Save settings","[CLASS:Button; INSTANCE:329]")
Sleep(50)
ControlClick( $winlist[$i][0],"Start training","[CLASS:Button; INSTANCE:331]")
EndIf
Next
Opt("WinTitleMatchMode", 1)
ExitLoop
EndSwitch
WEnd
EndFunc


Func SetItems()
Opt("WinTitleMatchMode", 2)
$winlist=WinList( "] SBot v" , "" )
GUICreate("SBotMod Login - SetItems",200,(20*$winlist[0][0])+100)
GUISetFont (9 ,400,"","Times New Roman" )
$Charname=GUICtrlCreateCombo ( "Get Items from", 10, 10, 180 )
for $i=1 to $winlist[0][0]
GUICtrlSetData(-1, ControlGetText ( $winlist[$i][0],"","[CLASS:Edit; INSTANCE:4]" ),$winlist[$i][0])
Next
for $i=1 to $winlist[0][0]
GUISetFont (9 ,400,"","Times New Roman" )
$CharSet[$i]=GUICtrlCreateCheckbox(ControlGetText ( $winlist[$i][0],"","[CLASS:Edit; INSTANCE:4]" ),10,(20*($i-1))+65)
GUICtrlSetState ( -1, $GUI_CHECKED )
Next
$Start = GUICtrlCreateButton("Start", 10, 20*$winlist[0][0]+70, 180, 25)
Guisetstate()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Opt("WinTitleMatchMode", 1)
GUIDelete()
Return
Case $Start
ToolTip("Scanning "&GUICtrlRead($Charname)&"'s Itemlist !!! This will need some minutes.",0,0,"SBotMod Login",1,4)
for $i=1 to $winlist[0][0]
$CharSet[$i]=GUICtrlRead($CharSet[$i],0)
Next
$SBot="["&GUICtrlRead($Charname)&"] SBot v"
GUIDelete()
$x=ControlGetHandle($SBot, "", "[CLASS:SysListView32; INSTANCE:2]")
$y=_GUICtrlListView_GetItemCount($x)
Global $item[$y+1][4]
for $j=0 to $y
$item[$j][0]=_GUICtrlListView_GetItemText($x, $j, 3)
$item[$j][1]=_GUICtrlListView_GetItemText($x, $j, 4)
$item[$j][2]=_GUICtrlListView_GetItemText($x, $j, 5)
$item[$j][3]=_GUICtrlListView_GetItemText($x, $j, 6)
Next
for $i=1 to $winlist[0][0]
If $CharSet[$i]=1 Then
$name=ControlGetText ( $winlist[$i][0],"","[CLASS:Edit; INSTANCE:4]" )
$z=ControlGetHandle($winlist[$i][0], "", "[CLASS:SysListView32; INSTANCE:2]")
for $j=0 to $y
ToolTip("Rewriting "&$name&"'s Itemlist !!! "&$j&"/"&$y,0,0,"SBotMod Login",1,4)
_GUICtrlListView_SetItem($z, $item[$j][0] ,$j, 3)
_GUICtrlListView_SetItem($z, $item[$j][1] ,$j, 4)
_GUICtrlListView_SetItem($z, $item[$j][2] ,$j, 5)
_GUICtrlListView_SetItem($z, $item[$j][3] ,$j, 6)
Next
ControlClick( $winlist[$i][0],"Save settings","[CLASS:Button; INSTANCE:329]")
EndIf
Next
ToolTip("Scanning for new SBot Window !!! Press F1 for Info",0,0,"SBotMod Login",1,4)
Opt("WinTitleMatchMode", 1)
ExitLoop
EndSwitch
WEnd
EndFunc

Func TogglePause()
$Paused = NOT $Paused
While $Paused
sleep(100)
ToolTip("PAUSED !!!",0,0,"SBotMod Login",1,4)
WEnd
ToolTip("Scanning for new SBot Window !!!",0,0,"SBotMod Login",1,4)
EndFunc

; #FUNCTION# ;================================================= ==============================
;
; Name...........: _Base64Encode
; Description ...: Returns the given strinng encoded as a Base64 string.
; Syntax.........: _Base64Encode($sData)
; Parameters ....: $sData
; Return values .: Success - Base64 encoded string.
; Failure - Returns 0 and Sets @Error:
; |0 - No error.
; |1 - Could not create DOMDocument
; |2 - Could not create Element
; |3 - No string to return
; Author ........: turbov21
; Modified.......:
; Remarks .......:
; Related .......: _Base64Decode
; Link ..........;
; Example .......; Yes
;
; ;================================================= =========================================
Func _Base64Encode($sData)
Local $oXml = ObjCreate("Msxml2.DOMDocument")
If Not IsObj($oXml) Then
SetError(1, 1, 0)
EndIf

Local $oElement = $oXml.createElement("b64")
If Not IsObj($oElement) Then
SetError(2, 2, 0)
EndIf

$oElement.dataType = "bin.base64"
$oElement.nodeTypedValue = Binary($sData)
Local $sReturn = $oElement.Text

If StringLen($sReturn) = 0 Then
SetError(3, 3, 0)
EndIf

Return $sReturn
EndFunc

; #FUNCTION# ;================================================= ==============================
;
; Name...........: _Base64Decode
; Description ...: Returns the strinng decoded from the provided Base64 string.
; Syntax.........: _Base64Decode($sData)
; Parameters ....: $sData
; Return values .: Success - String decoded from Base64.
; Failure - Returns 0 and Sets @Error:
; |0 - No error.
; |1 - Could not create DOMDocument
; |2 - Could not create Element
; |3 - No string to return
; Author ........: turbov21
; Modified.......:
; Remarks .......:
; Related .......: _Base64Encode
; Link ..........;
; Example .......; Yes
;
; ;================================================= =========================================
Func _Base64Decode($sData)
Local $oXml = ObjCreate("Msxml2.DOMDocument")
If Not IsObj($oXml) Then
SetError(1, 1, 0)
EndIf

Local $oElement = $oXml.createElement("b64")
If Not IsObj($oElement) Then
SetError(2, 2, 0)
EndIf

$oElement.dataType = "bin.base64"
$oElement.Text = $sData
Local $sReturn = BinaryToString($oElement.nodeTypedValue, 4)

If StringLen($sReturn) = 0 Then
SetError(3, 3, 0)
EndIf

Return $sReturn
EndFunc
nocantthat is offline  
Old 09/17/2013, 12:39   #2
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
The next time you post your script that long please put it in the CODE-Tags and between Spoilers.

Did you try to scan the Edits' Instances more than once? It can happen that some Edits are created earlier than others that would maybe cause an error.

Else try it by tapping {TAB} sometimes to reach the field you want to insert the data, this way is awful but it does its job.

// Also don't forget to select a good thread name. This ****** "help me please on this program autoit" doesn't tell anything to any user. Better select something like "ControlSendText - SBot - doesn't write values"
alpines is offline  
Old 09/18/2013, 16:10   #3


 
Lawliet's Avatar
 
elite*gold: 2
Join Date: Jul 2009
Posts: 14,456
Received Thanks: 4,685
Quote:
Meaningful titles for threads: When you start a new thread, you have to provide a meaningful thread title or it will be closed!

Thread with titels like: "Help!!", "Problem", "Question?!", "Autoit Question" are forbidden.
and please take a look at [code] and [spoiler] tags
Lawliet is offline  
Closed Thread


Similar Threads Similar Threads
[RELEASE]Undecompileable Autoit program
04/28/2011 - AutoIt - 19 Replies
Removed
Does this AutoIt program contain Trojan?
01/26/2010 - General Coding - 2 Replies
I got this bot and would like to see if it is malware/virus/trojan. The bot maker told me some sensitive anti virus program would see it as back door software. I have tried to upload it into total virus website for a scan. 80% of the scanners pass the file while the remaining said it is trojan. Need help from expert coder to take a look at this for me. Thank you very much.
A quick autoit program
03/04/2007 - CO2 Guides & Templates - 5 Replies
ok i posted this once already and for some reason it was deleted i think the mods thought i was posting an actually cracked sv -_- maybe they should read a bit more into it... basically put this inside ur folder for agentking.exe along with ur trainer must be named SVCracked.exe and ur hotkey must be ctrl + alt +F11 basically wat this does is do launch and hotkey for u cause that gets annoying atleast it does for me... anyway here u go



All times are GMT +1. The time now is 02:16.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.