Jump to content

sending the text inside the guictrlcreateinput


phantom
 Share

Recommended Posts

when i tell it to send what is typed in an input box from a gui its not sending what is typed.

heres my code.. at the moment no matter what i type in the input it sends 7 as $user and 9 as $pass.

any help would be great maybe I'm missing something.

CODE

#include <GuiConstants.au3>

Global $Paused = False

Global $msg = GUIGetMsg()

$x = 0

$dc = 0

HotKeySet ("{F5}", "start")

HotKeySet ("{F6}", "QuickExchange")

HotKeySet ("{F7}", "partymatch")

HotKeySet ("{F8}", "ExchangeBot")

HotKeySet ("{ESC}", "end")

HotKeySet ("{PAUSE}", "pause")

Opt ("GUICloseOnESC")

Opt ("RunErrorsFatal",0)

GUICreate ("SRO-MiniLogin ~BETA~",313,210)

GUISetIcon (@ScriptDir & "\FEAR.ico")

GUICtrlCreateTab (10,10,293,190)

GUICtrlCreateTabItem ("Login")

GuiCtrlcreategroup ("User/Password",20,40,135,110)

GUICtrlCreateLabel ("Username",30,60)

$user = GUICtrlCreateInput ("",30,75,115,20)

GUICtrlCreateLabel ("Password",30,100)

$pass = GUICtrlCreateInput ("",30,115,115,20,$ES_PASSWORD)

GUICtrlCreateGroup ("Character Selection",170,40,110,90)

$char1 = GUICtrlCreateCheckbox ("Character 1",180,60,90,15,$BS_AUTORADIOBUTTON)

$char2 = GUICtrlCreateCheckbox ("Character 2",180,80,90,15,$BS_AUTORADIOBUTTON)

$char3 = GUICtrlCreateCheckbox ("Character 3",180,100,90,15,$BS_AUTORADIOBUTTON)

$button1 = GUICtrlCreateButton ("Start",50,155,60,35,$BS_ICON)

GUICtrlSetImage (-1, "Shell32.dll",137)

$button2 = GUICtrlCreateButton ("Exit",190,155,60,35,$BS_ICON)

GUICtrlSetImage (-1, "Shell32.dll",131)

;---------------------------------------------------------- TAB 2

GUICtrlCreateTabItem ("In Game")

GuiCtrlcreategroup ("Pet Summon",25,40,95,65)

$pet1 = GUICtrlCreateCheckbox ("On",35,60,35,20,$BS_AUTORADIOBUTTON)

$pet2 = GUICtrlCreateCheckbox ("Off",35,80,35,20,$BS_AUTORADIOBUTTON)

$resetpet = GUICtrlCreateButton ("Reset",75,70,35,20)

GUICtrlCreateGroup ("Party Match",130,40,160,65)

$auto1 = GUICtrlCreateCheckbox ("On",140,60,35,20,$BS_AUTORADIOBUTTON)

$auto2 = GUICtrlCreateCheckbox ("Off",140,80,35,20,$BS_AUTORADIOBUTTON)

GUICtrlCreateLabel ("Delay(secs)",180,60)

$automin = GUICtrlCreateInput ("1",240,57,37,20)

GUICtrlCreateUpdown (-1)

GUICtrlSetLimit (-1,100,1)

$Autoreset = GUICtrlCreateButton ("Reset",195,80,35,20)

GUICtrlCreateGroup ("Quick Exchange",25,115,95,65)

$exchange1 = GUICtrlCreateCheckbox ("On",35,135,35,20,$BS_AUTORADIOBUTTON)

$exchange2 = GUICtrlCreateCheckbox ("Off",35,155,35,20,$BS_AUTORADIOBUTTON)

$resetex = GUICtrlCreateButton ("Reset",75,145,35,20)

GuiCtrlcreategroup ("Exchange bot",130,115,160,65)

$botexchange1 = GUICtrlCreateCheckbox ("On",135,135,35,20,$BS_AUTORADIOBUTTON)

$botexchange2 = GUICtrlCreateCheckbox ("Off",135,155,35,20,$BS_AUTORADIOBUTTON)

GUICtrlCreateLabel ("Money:",173,133)

$botexchange3 = GUICtrlCreateInput ("",210,130,70,20)

$botresetex = GUICtrlCreateButton ("Reset",195,155,35,20)

;----------------------------------------------------------- TAB 3

GUICtrlCreateTabItem ("Other Apps")

GUICtrlCreateGroup ("Run App",25,40,90,70)

$softmod = GUICtrlCreateButton ("SoftMod",35,60,70,20)

$srobot = GUICtrlCreateButton ("SRO_bot",35,80,70,20)

;----------------------------------------------------------- TAB 4

GUICtrlCreateTabItem ("HotKeys")

GUICtrlCreateLabel ("Esc will close the GUI window",25,45,200,35,$SS_LEFT)

GUICtrlCreateLabel ("F5 starts login (does this automaticly though)",25,65,230,35,$SS_LEFT)

GUICtrlCreateLabel ("F6 will Exchange quickly",25,85,200,35,$SS_LEFT)

GUICtrlCreateLabel ("F7 starts Partymatch",25,105,200,35,$SS_LEFT)

GUICtrlCreateLabel ("F8 starts Exchange bot",25,125,200,35,$SS_LEFT)

GUICtrlCreateLabel ("Pause to pause script",25,145,200,35,$SS_LEFT)

GUICtrlCreateLabel ("Currently Script only works in 1024x768",25,165,200,35,$SS_LEFT)

GUISetState()

While 1

$msg = GUIGetMsg()

Select

Case $msg = $GUI_EVENT_CLOSE

ExitLoop

Case $msg = $button1

If $paused = False Then

start()

EndIf

Case $msg = $button2

Exit

EndSelect

If $msg = $pet2 Then

GUICtrlSetState ($pet1, $GUI_DISABLE)

GUICtrlSetState ($pet2, $GUI_DISABLE)

EndIf

If $msg = $resetpet Then

GUICtrlSetState ($pet1, $GUI_ENABLE)

GUICtrlSetState ($pet2, $GUI_ENABLE)

GUICtrlSetState ($pet2, $GUI_UNCHECKED)

EndIf

If $msg = $auto2 Then

GUICtrlSetState ($auto1, $GUI_DISABLE)

GUICtrlSetState ($auto2, $GUI_DISABLE)

GUICtrlSetState ($automin, $GUI_DISABLE)

EndIf

If $msg = $Autoreset Then

GUICtrlSetState ($auto1, $GUI_ENABLE)

GUICtrlSetState ($auto2, $GUI_ENABLE)

GUICtrlSetState ($automin, $GUI_ENABLE)

GUICtrlSetData ($automin, 1)

GUICtrlSetState ($auto2, $GUI_UNCHECKED)

EndIf

If $msg = $exchange2 Then

GUICtrlSetState ($exchange2, $GUI_DISABLE)

GUICtrlSetState ($exchange1, $GUI_DISABLE)

EndIf

If $msg = $resetex Then

GUICtrlSetState ($exchange2, $GUI_ENABLE)

GUICtrlSetState ($exchange1, $GUI_ENABLE)

GUICtrlSetState ($exchange2, $GUI_UNCHECKED)

EndIf

If $msg = $botexchange2 Then

GUICtrlSetState ($botexchange1, $GUI_DISABLE)

GUICtrlSetState ($botexchange2, $GUI_DISABLE)

GUICtrlSetState ($botexchange3, $GUI_DISABLE)

EndIf

If $msg = $botresetex Then

GUICtrlSetState ($botexchange1, $GUI_ENABLE)

GUICtrlSetState ($botexchange2, $GUI_ENABLE)

GUICtrlSetState ($botexchange3, $GUI_ENABLE)

GUICtrlSetData ($botexchange3, "")

GUICtrlSetState ($botexchange2, $GUI_UNCHECKED)

EndIf

If $msg = $softmod And $x = 0 Then

Run (@ScriptDir & "\SoftMod.exe")

If @error = 1 Then

MsgBox (0,"EXE Not found","Could not find the Softmod.exe")

$softmod = FileOpenDialog ("Open:",@WorkingDir,"Softmod.exe (*.exe)")

If @error Then

MsgBox(4096,"","No File(s) chosen")

$x = 0

EndIf

Run ($softmod)

$x = $x + 1

EndIf

EndIf

If $msg = $srobot And $x = 0 Then

Run (@ScriptDir & "\srobot.exe")

If @error = 1 Then

MsgBox (0,"EXE Not found","Could not find the srobot.exe")

$srobot = FileOpenDialog ("Open:",@WorkingDir,"srobot.exe (*.exe)")

If @error Then

MsgBox(4096,"","No File(s) chosen")

$x = 0

EndIf

Run ($srobot)

$x = $x + 1

EndIf

EndIf

WEnd

While WinExists ("SRO_Client")

action ("Sro Active")

partymatch()

Sleep (100)

dccheck()

Sleep (100)

partyrequest()

WEnd

start()

Func start()

Run ("notepad.exe")

Sleep (1000)

Send ($user)

Send ("{ENTER}")

Send ($pass)

Sleep (10000)

If @DesktopHeight > 768 Then

MsgBox (1,"Resolution", "Your Screen Resolution is not set at 1024x768")

pause()

EndIf

action("Sro not active" & @CRLF & "Activating SRO" & @CRLF &"- - - - - - - - - -" & @CRLF & "D/C count:" & $dc & "")

Run (@ScriptDir & "\Silkroad.exe")

If @error = 1 Then

MsgBox (0,"EXE Not found","Could not find the Silkroad.exe")

$srofile = FileOpenDialog ("Open:",@WorkingDir,"Silkroad.exe (*.exe)")

If @error Then

MsgBox(4096,"","No File(s) chosen")

EndIf

Run ($srofile)

EndIf

While (PixelGetColor(807,518) <> 10127450) and (WinExists("Error") <> 1) and (WinExists("NetError","") <> 1)

Sleep (500)

WEnd

If Not @error Then

MouseClick ('left', 771, 516)

EndIf

Sleep (3000)

action ("")

While (PixelGetColor(521,384) <> 0)

Sleep (500)

WEnd

If Not @error Then

MouseClick ("left",534,428)

Sleep (800)

EndIf

Send ($user)

Sleep (1000)

ControlSend("SRO_Client", "", "", "{TAB}")

Sleep (1000)

Send ($pass)

$disconnect = (PixelGetColor(511,429) = 7564106)

Do

ControlSend("SRO_Client", "", "", "{Enter}")

Sleep (2400)

Until $disconnect

If $disconnect Then

ControlSend("SRO_Client", "", "", "{Enter}")

Sleep (2000)

Send ("{F5}")

EndIf

If $msg = $char1 Then

Sleep (2000)

MouseClick("left",388,503,2,0)

MouseClick("left",388,503,2,0)

EndIf

If $msg = $char2 Then

Sleep (2000)

MouseClick("left",652,480,2,0)

MouseClick("left",652,480,2,0)

EndIf

If $msg = $char3 Then

Sleep (2000)

MouseClick("left",903,517,2,0)

MouseClick("left",903,517,2,0)

EndIf

Sleep (2500)

MouseClick("left",990,938,2,0)

If $msg = $pet1 Then

Sleep (10000)

ControlSend("SRO_Client", "", "", "{PgUp}")

EndIf

If $msg = $pet2 Then

Sleep (10000)

ControlSend("SRO_Client", "", "", "{PgDn}")

EndIf

Sleep (14000)

ControlSend("SRO_Client", "", "", "{INSERT}")

partymatch()

EndFunc

Func partymatch()

If $msg = $auto2 Then

Sleep (1000)

EndIf

If $msg = $auto1 Then

$pixel = (PixelGetColor (122,311) = 3948092)

If (PixelGetColor (61,23) = 16202041) And Not $pixel Then

Sleep (1000)

Send ("e")

Sleep (3000)

MouseClick ("left",615,591,1,25)

Sleep (500)

MouseClick ("left",464,525,1,5)

Send ("e")

EndIf

if (PixelGetColor(12,244) <> 0) and (PixelGetColor(10,300) <> 0) then

while $pixel

sleep(10000)

wend

if Not $pixel then

Sleep (3000)

Send ("e")

SoundPlay("data\click.wav")

Sleep (3000)

MouseClick ("left",391,588,1,25)

sleep(500)

SoundPlay("data\click.wav")

MouseClick ("left",392,473,1,5)

MouseClick ("left",464,525,1,5)

Endif

send("e")

Endif

EndIf

EndFunc

Func QuickExchange()

If $msg = $exchange2 Then

Sleep (1000)

EndIf

If $msg = $exchange1 Then

MouseClick ("left",474,544)

$buttoncol2 = PixelGetColor (474,544)

If $buttoncol2 = 8088394 Then

MouseClick ("left",474,544)

EndIf

EndIf

partymatch()

EndFunc

Func ExchangeBot()

If $msg = $botexchange2 Then

Sleep (1000)

EndIf

If $msg = $botexchange1 Then

MouseClick ("left",433,506)

Send ($botexchange3)

Send ("{ENTER}")

MouseClick ("left",474,544)

$buttoncol2 = PixelGetColor (474,544)

If $buttoncol2 = 8088394 Then

MouseClick ("left",474,544)

EndIf

EndIf

partymatch()

EndFunc

Func Pause()

$Paused = NOT $Paused

If $Paused = True Then

action("Script Paused")

GUICtrlSetData($button1,"PAUSED")

Sleep (500)

Else

If $paused = False Then

sleep(1000)

action("Script Resumed")

partymatch()

GUICtrlSetData($button1,"START")

Else

$Paused = Not $Paused

EndIf

EndIf

EndFunc

Func dccheck()

If (PixelGetColor(508,392) = 2696225) then

MouseClick("left",512,421,1)

sleep(4000)

$dc = $dc + 1

start()

EndIf

EndFunc

Func partyrequest()

If (PixelGetColor (61,23) = 16202041) Then

If (PixelGetColor (506,235) <> 526344) Then

Sleep (500)

MouseClick ("left",471,503)

Sleep (1000)

EndIf

EndIf

EndFunc

Func end()

Exit

EndFunc

Func action($tip)

ToolTip ($tip,0,50,"Action",1)

Sleep (2000)

ToolTip ("")

EndFunc

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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