Jump to content

Simple script


Recommended Posts

Well in my attempt to make a new script out of a previous one i already had i failed horribly

#include <IE.au3>

#include <String.au3>

If WinExists("TORN CITY") Then

$oIE = _IEAttach("TORN CITY")

Else

$oIE = _IECreate("http://www.torn.com")

EndIf

MsgBox("", "", "Press for start.")

While 1

$oSubmit = _IEGetObjByName($oIE, "City")

_IEAction($oSubmit, "click")

_IELoadWait($oIE)

$String = _StringBetween(_IEBodyReadHTML($oIE), '<CENTER><A href="', '">Cyber Force</A></CENTER>')

If @error Then

ClipPut(_IEDocReadHTML($oIE))

MsgBox("", "", "Error")

Exit

EndIf

_IENavigate($oIE, "http://Torn.com/" & $String[0])

WEnd

All i want this script to do is click 2 buttons continuously, the first button is "City" the second is "Cyber Force"

please let me know how to fix this script.

Link to comment
Share on other sites

This script will take you directly to the Cyber Force webpage after login.

#include <IE.au3>
#include <String.au3>
If WinExists("TORN CITY") Then
    $oIE = _IEAttach("TORN CITY")
Else
    $oIE = _IECreate("http://www.torn.com")
EndIf
MsgBox("", "", "Press for start.")
While 1 
    $String = "http://www.torn.com/shops.php?step=cyberforce"   
    If @error Then
        ClipPut(_IEDocReadHTML($oIE))
        MsgBox("", "", "Error")
        Exit
    EndIf
    _IENavigate($oIE, $String)
    Exit
WEnd

jfcby

Edited by jfcby

Determined -- Devoted -- Delivered Make your mind up -- to seriously apply yourself -- accomplishing the desired results. **** A soft answer turneth away wrath: but grievous words stir up anger. Proverbs 15:1 KJB ****

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...