Regency Posted November 21, 2007 Posted November 21, 2007 (edited) So for the last few weeks i have been trying to get this to work. its not working... Anyone have any idea why it isnt? ~~~~~~~~ part is where code begins that i need help with expandcollapse popup#include <GUIConstants.au3> #include <Constants.au3> #include <IE.au3> ;Opt("MustDeclareVars", 1); having this option set will help find mistakes before you run it. Such as using a variable before setting its value or misspelling a variable Global $Paused Global $begin = 0 Global $begin2 = 0 Global $nMsg = 0 Global $age1 = '' Global $name1 = '' Global $pass1 = '' Global $url1 = '' Global $Cr1 = '' Global $G1 = '' Global $J1 = '' Global $Quick = GUICreate("Auto Scripter - By - ScorpiA" , 290, 350, 320, 300) ;Global $Quick = GUICreate("Auto Scripter - By - ScorpiA" , 290, 350, 320, 300) Global $agegroup = GUICtrlCreateGroup("Would You Like to Script Jail?:", 8, 8, 265, 49) Global $Selectone = GUICtrlCreateCombo("Select one", 16, 24, 145, 25) GUICtrlSetData(-1, "----------------------|Yes|No|") Global $Saveage = GUICtrlCreateButton("Save", 168, 24, 75, 25, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) Global $Desired = GUICtrlCreateGroup("TMN Login Name", 8, 56, 265, 49) Global $username = GUICtrlCreateInput("", 16, 72, 145, 21) Global $savename = GUICtrlCreateButton("Save", 168, 72, 75, 25, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) Global $DesiredP = GUICtrlCreateGroup("Password", 8, 104, 265, 49) Global $password = GUICtrlCreateInput("", 16, 120, 145, 21) Global $savepassword = GUICtrlCreateButton("Save", 168, 120, 75, 25, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) Global $StartUrl = GUICtrlCreateGroup("Address to log into TMN with", 8, 152, 256, 49) Global $address = GUICtrlCreateInput("", 16, 168, 145, 21) Global $saveurl = Guictrlcreatebutton("Save", 168, 168 ,75, 25, 0) GuictrlCreategroup("",-99, -99, 1, 1) Global $Age = GUICtrlCreateLabel("", 8, 208, 250, 17) Global $User = GUICtrlCreateLabel("", 8, 224, 250, 17) Global $Pass = GUICtrlCreateLabel("", 8, 240, 250, 17) Global $Url = GUICtrlCreatelabel("",8, 256, 250, 17) Global $Crime = GUICtrlCreatelabel("", 8, 272, 250, 17) Global $Jail = GUICtrlCreatelabel("", 8, 288, 250, 17) Global $Gta = GUICtrlCreatelabel("", 8, 304, 250, 17) Global $Make = GUICtrlCreateButton("Start Auto Scripter By ScorpiA", 8, 320, 267, 25, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Saveage If GUICtrlRead($Selectone) = "Select one" Or GUICtrlRead($Selectone) = "----------------------" Then Sleep(1000) Else $age1 = GUICtrlRead($Selectone) GUICtrlSetData($Age, $age1) EndIf Case $savename $name1 = GUICtrlRead($username) GUICtrlSetData($User, $name1) Case $savepassword $pass1 = GUICtrlRead($password) GUICtrlSetData($Pass, $pass1) Case $saveurl $url1 = GUICtrlRead($address) & "/userlogin.aspx?" Guictrlsetdata($Url, $url1) Case $Crime $Cr1 = GUICtrlRead($address) & "/crimes.aspx?" guictrlsetdata($Crime, $Cr1) Case $Gta $G1 = Guictrlread($address) & "/gta.aspx?" GUICtrlSetData($Gta, $G1) Case $Jail $J1 = GuiCtrlRead($address) & "/jail.aspx?" GUICtrlSetData($Jail,$J1) Case $Make myRun() EndSwitch WEnd Func myRun() HotKeySet("{Home}", "TogglePause") HotKeySet("{ESC}", "Terminate") Local $dif = '' Local $AgeValue = '' Local $oIE = 0 Local $oUser = 0 Local $oPass = 0 Local $oLogIn = 0 Local $bLoop = 1 $AgeValue = GUICtrlRead($Age) $oIE = _IECreate($Url1) _IELoadWait($oIE) WinSetState("TheMafiaNetwork - Internet Explorer", "", @SW_MAXIMIZE) $oUser = _IEGetObjByName($oIE, "txtuid") _IEFormElementSetValue($oUser, $name1) $oPass = _IEGetObjByName($oIE, "txtpwd") _IEFormElementSetValue($oPass, $pass1) $oLogIn = _IEGetObjByName($oIE, "Button1") _IEAction($oLogIn, "click") _IELoadWait($oIE) If $AgeValue = "No" Then $begin = "" $begin2 = "" MyFunction() $begin = TimerInit() $begin2 = TimerInit() While 2 Sleep(100) $dif = Int(TimerDiff($begin) / 1000) If $dif >= (2 * 60) Then MyFunction() $begin = TimerInit() EndIf WEnd ElseIf $AgeValue = "Yes" Then _IELoadWait($oIE) $begin = "" $begin2 = "" MyFunction2() $begin = TimerInit() $begin2 = TimerInit() $oIE = _IECreate($J1) ;~ "TheMafiaNetwork - Nationl Jail - Internet Explorer" _IELoadWait($oIE) WinSetState("TheMafiaNetwork - National Jail - Microsoft Internet Explorer", "", @SW_MAXIMIZE) WinSetState("TheMafiaNetwork - National Jail - Microsoft Internet Explorer", "", @SW_MINIMIZE) $bLoop = 1 While $bLoop = 1 For $var = 0 To 100 Step 1 _IELoadWait($oIE) _IELinkClickByText($oIE, "Break") _IELoadWait($oIE) _IENavigate($oIE, $J1) Next WinSetState("TheMafiaNetwork - National Jail - Microsoft Internet Explorer", "", @SW_MAXIMIZE) If IsArray(PixelSearch(603,200,655,215,9175040,"",2)) = 1 Then $bLoop = 0 MsgBox(0,"Verification Box Present","Please Enter Verification Code For Script To Resume") sleep(20000) $bLoop = 1 Else If IsArray(PixelSearch(603,200,655,215,9175040,"",2)) = 0 Then WinSetState("TheMafiaNetwork - National Jail - Microsoft Internet Explorer", "", @SW_MINIMIZE) Else $bLoop = 1 EndIf EndIf WEnd EndIf While 2 Sleep(10) $dif = Int(TimerDiff($begin) / 1000) If $dif >= (2 * 60) Then MyFunction() $begin = TimerInit() EndIf WEnd EndFunc;==>myRun Func MyFunction() Local $oIE = 0 Local $dif2 = '' Local $oSubmit = 0 $oIE = _IECreate($Cr1) $oSubmit = _IEGetObjByName ($oIE, "btncrime1") _IEAction ($oSubmit, "click") _IELoadWait ($oIE) _IEQuit($oIE) $dif2 = Int(TimerDiff($begin2) / 1000) If $dif2 >= (4 * 60) Then ~~~~~~~~~~~~~~~~~~~~~~~~~~;And Below: $oIE = _IECreate($G1) ;~ "TheMafianetwork - Grand Theft Auto - Internet Explorer" _IELoadWait($oIE) $begin2 = TimerInit() $oForm = _IEGetObjByName ($oIE, "Form1") _IEFormElementRadioSelect($oForm, 51, "carslist") _IEAction ($oForm, "click") $oSubmit = _IEGetObjByName ($oIE, "Submit1") _IEAction ($oSubmit, "click") _IELoadWait ($oIE) _IEQuit($oIE) EndIf ~~~~~~~~~~~~~~~~~~~~~~~~~~End problem till its called again... EndFunc;==>MyFunction Func MyFunction2() Local $oIE = 0 Local $dif2 = '' Local $oSubmit = 0 $oIE = _IECreate($Cr1) ;~ "TheMafianetwork - Crimes - Internet Explorer" $oSubmit = _IEGetObjByName ($oIE, "btncrime1") _IEAction ($oSubmit, "click") _IELoadWait ($oIE) _IEQuit($oIE) $dif2 = Int(TimerDiff($begin2) / 1000) If $dif2 >= (4 * 60) Then ~~~~~~~~~~~~~~~~~~~~~~~~~ $oIE = _IECreate($G1) ("form1") ;~ "TheMafianetwork - Grand Theft Auto - Internet Explorer" _IELoadWait($oIE) $begin2 = TimerInit() $oSubmit = _IEGetObjByName ($oIE, "") _IEAction ($oSubmit, "click") _IEQuit($oIE) EndIf ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~This one is mutilated because i was trying to fix it and got so pissed off i saved and walked the fuck away. but now i need this freaking script t work or i am gunna feel stupid. Someone help me. The Radio id and value shit at bottom. EndFunc;==>MyFunction2 While 3 Sleep(100) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc Func Terminate() Exit EndFunc And here is the HTML of the page i was looking off of. <td><input id="carslist_0" type="radio" name="carslist" value="50" /><label for="carslist_0">Steal car from a public parking lot (50% Chance)</label></td> </tr><tr> <td><input id="carslist_1" type="radio" name="carslist" value="57" /><label for="carslist_1">Steal car from a building parking lot (57% Chance)</label></td> </tr><tr> <td><input id="carslist_2" type="radio" name="carslist" value="62" /><label for="carslist_2">Steal car from a residential place (62% Chance)</label></td> </tr><tr> <td><input id="carslist_3" type="radio" name="carslist" value="55" /><label for="carslist_3">Pick Pocket Keys (55% Chance)</label></td> </tr><tr> <td><input id="carslist_4" type="radio" name="carslist" value="63" /><label for="carslist_4">Car jack from street (63% Chance)</label></td> </tr><tr> <td><input id="carslist_5" type="radio" name="carslist" value="65" /><label for="carslist_5">Steal car from network: (65% Chance)</label></td> </tr> Anyone know how to fix this? Tips hints? help? I am trying to make it click the radio box for Carlist_2. Any help? Edited November 21, 2007 by Regency
Nahuel Posted November 21, 2007 Posted November 21, 2007 I think this would be a good way... But you need to know the name of the form. $oForm=_IEGetObjByName($oIE,"name of form") _IEFormElementRadioSelect($oForm, "62","carslist") Here's how I did it with the code you provided, works fine I suppose. $oRadio=_IEGetObjById($oIE,"carslist_2") _IEAction($oRadio,"click")
Regency Posted November 21, 2007 Author Posted November 21, 2007 I think this would be a good way... But you need to know the name of the form. $oForm=_IEGetObjByName($oIE,"name of form") _IEFormElementRadioSelect($oForm, "62","carslist") Here's how I did it with the code you provided, works fine I suppose. $oRadio=_IEGetObjById($oIE,"carslist_2") _IEAction($oRadio,"click")Jeasus jahovas witness.. I have been trying to make this work for weeks.. Your amazing.. from now on.. if i have a question i am gunna msg you then if u cant figure it out.. i will post in a topic.. ugh you always help me! your the man!!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now