Jump to content
Sign in to follow this  
scriptnub

Simple script

Recommended Posts

scriptnub

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.

Share this post


Link to post
Share on other sites
jfcby

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

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.