Jump to content

Help: NonRelated instances of IE. ?


Recommended Posts

I have a script that I've written for a game I play.

The script logs in, buys something, switches to a specific character then buys, etc... until all characters on that account have bought the item. (same item.)

The goal of this is.. Every time the item is bought is gains a slight value, (and when it is sold it loses a small value.)

I can run my script as it stands, buy(1) buy(2) buy(3) -- sell(1) sell(2) sell(3).. each pass the first character gains while the third one loses. This is what I want. However...

What I am trying to do now.. is to apply this across multiple accounts. (I have 14 accounts with 1-4 characters per account totaling 54 characters. I presently have all the login data account/pass + characters stored in an excel document.)

Finally, the question.. IS there a way to be logged into two or MORE instances of IE(that do not share resources, i.e., the fact that one instance is logged into one account, allowing another instance to have a separate account.) -- Much like Opening Firefox does not interfere with IE. (presently the only way to do what I'm trying to do is by hand.. and while I could macro it.. It would be annoying, and only on two accounts, needing to be rewritten for Every different account etc..)

I'll include my simple not perfect code below for the single browser/account/3 character instance.

#include <IE.au3>
    $oIE = _IEcreate("http://INeedHelp.com/login.php",0,1,0,1)
    _IEloadwait($oIE)
    WinSetState("game", "", @SW_MAXIMIZE)
    $oForm = _IEFormGetObjByname($oIE,0)
    $username = _IEFormElementGetObjByname($oForm,"email")
    _IEFormElementSetValue($username,"a@b.com")
    $password = _IEFormElementGetObjByname($oForm,"password")
    _IEFormElementSetValue($password,"abc123")
    $oButton = _IEFormElementGetObjByName($oForm, "submit")
    $oButton.click()

while 1
bleed()
WEnd



Func bleed()
    $oForm1 = _IEFormGetObjByName($oIE,0,1)
    $oSelect = _IEFormElementGetObjByName ($oForm1, "id")
    For $i = 1 To 1
    _IEFormElementOptionselect ($oSelect, "0000000329", 1, "byValue")
    Next
    $obutton1 = _IEFormElementGetObjByName($oForm1, "submit")
    $obutton1.click()
    _IELoadWait($oIE)
    _IENavigate($oIE,"www.ineedhelp.net/a.php?id=1616")
    _IELoadWait($oIE)
    $oForm = _IEFormGetObjByname($oIE,"transact")
    $obutton = _IEFormElementGetObjByName($oForm, "submit")
    $obutton.click()
    _IELoadWait($oIE)
    _IENavigate($oIE,"www.ineedhelp.net/a.php?id=1616")
    _IELoadWait($oIE)
    $oForm2 = _IEFormGetObjByName($oIE,0,1)
    $oSelect = _IEFormElementGetObjByName ($oForm2, "id")
    For $i = 1 To 1
    _IEFormElementOptionselect ($oSelect, "0000001277", 1, "byValue")
    Next
    $obutton1 = _IEFormElementGetObjByName($oForm2, "submit")
    $obutton1.click()
    _IELoadWait($oIE)
    $oForm3 = _IEFormGetObjByname($oIE,"transact")
    $obutton2 = _IEFormElementGetObjByName($oForm3, "submit")
    $obutton2.click()
    _IELoadWait($oIE)
    _IENavigate($oIE,"www.ineedhelp.net/a.php?id=1616")
    _IELoadWait($oIE)
    $oForm4 = _IEFormGetObjByName($oIE,0,1)
    $oSelect = _IEFormElementGetObjByName ($oForm4, "id")
    For $i = 1 To 1
    _IEFormElementOptionselect ($oSelect, "0000001252", 1, "byValue")
    Next
    $obutton3 = _IEFormElementGetObjByName($oForm4, "submit")
    $obutton3.click()
    _IELoadWait($oIE)
    $oForm5 = _IEFormGetObjByname($oIE,"transact")
    $obutton4 = _IEFormElementGetObjByName($oForm5, "submit")
    $obutton4.click()
    _IELoadWait($oIE)
    _IENavigate($oIE,"www.ineedhelp.net/a.php?id=1616")
    _IELoadWait($oIE)
EndFunc

I can stack this same script replacing the item, in this case "1616," I believe up to four times. (And then using virtual desktops an additional four per.) I have had this running up to 12 scripts on the account.

Yes, however, my problem is going cross accounts. Any and all help in improving this code(I am aware that it is mighty slack and could be implemented 2947 different more effective ways.), OR(please) in helping me accomplish my next goal would be VERY much appreciated. Thank you in advance for your assistance.

Jacob

Link to comment
Share on other sites

Using vb.net 2005 I created just a VERY basic form with a webbrowser control, this is the Au3Info:

>>>> Window <<<<

Title: Test

Class: WindowsForms10.window.8.app.0.b7ab7b

Position: 521, 322

Size: 970, 304

Style: 0x16CF0000

ExStyle: 0x00050100

>>>> Control <<<<

Class: Internet Explorer_Server

Instance: 1

ID:

Text:

Position: 537, 361

Size: 940, 250

ControlClick Coords: 76, 100

Style: 0x56000000

ExStyle: 0x00000000

Could I attach to this?

I've tried ...

#include <IE.au3>

$oIE = _IEAttach("test", "windowtitle")

MsgBox(0, "The URL", _IEPropertyGet ($oIE, "locationurl"))

$sText = _IEBodyReadText ($oIE)

MsgBox(0, "Body Text", $sText)

and other simple variants to no avail.

Link to comment
Share on other sites

Read through the full discussion here: http://www.autoitscript.com/forum/index.ph...ookie&st=15

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Read through the full discussion here: http://www.autoitscript.com/forum/index.ph...ookie&st=15

Dale

I did see that before I decided to post. I'll just stick within my skill limits(very low. :)) and have 12 applications running on a virtual desktop and various scripts running using those applications. Thanks for your assistance Dale, You're always willing to lend a push in the right direction and I for one that you for it.

Link to comment
Share on other sites

I've reread everything and set my IE so that cookies are only per session, and Manually I can open two ie windows and they will work.. However when I open more than one via autoit, they link..

I've even tried calling them in different ways. :)

$s_url = "www.xxxxxxxx.net/login.php"
    $oIE = _IECreate ("about:blank")
    _IENavigate ($oIE, $s_url)
    WinSetState("xxxxxxx.net", "", @SW_MAXIMIZE)

;....

$oIE_Bill = _IEcreate("http://www.xxxxxxx.net/login.php",0,1,0,1)
    _IEloadwait($oIE_Bill)
    WinSetState("xxxxxxx.net", "", @SW_MAXIMIZE)

Any push in a correct direction?

Jacob

Link to comment
Share on other sites

So here's one way to start a new IE instance and attach to it:

#include <IE.au3>

ShellExecute(@ProgramFilesDir & "\Internet Explorer\iexplore.exe", "about:blank")

While 1
    $oIE = _IEAttach("about:blank", "url")
    If Not @error then ExitLoop
    Sleep(1000)
WEnd

MsgBox(0, "", "Success")

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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