Jump to content
iamtech

Unable to control IE created by Run as a different user.

Recommended Posts

iamtech

i have opened two ie windows, with same website, 1st one was opened as admin account (Current logged in account), it was controled with autoit, but second ie windows created by different user via run as, both ie windows have same website, but second ie window was not controlled with autoit,

i am tried with this code : 

$ie = _IEAttach("mysite", "embedded")

but it was not do anything,

sorry for my bad english.

Share this post


Link to post
Share on other sites
JLogan3o13

Are you running the whole script under the RunAs user credentials? It sounds like multiple scripts? Help us help you by posting the whole code, or a reproducer that shows the problem. You aren't going to get much assistance from one line of code.


√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
iamtech
include <IE.au3>

Opt("TrayAutoPause",0)
HotKeySet("{ESC}", "Quit")

Func Quit()
    Exit
 EndFunc
$sData = ClipGet()
$oIE = _IEAttach ("mysite", "embedded")
_IELoadWait($oIE)
$body = _IEBodyReadHTML($oIE)
Local $oTds = _IETagNameGetCollection($oIE, "td")
For $oTd In $oTds
If $oTd.InnerText = "0.000" Then
_IENavigate($oIE, "url1")
 Exit
EndIf
Next
 $btnext = _IEGetObjById($oIE,"btnext")
_IEAction($btnext,"click")

_IELoadWait($oIE)
$pay = _IEGetObjById($oIE,"pay")
_IEAction($pay,"click")

_IELoadWait($oIE)
$verify = _IEGetObjById($oIE,"verify")
_IEAction($verify,"click")

_IELoadWait($oIE)

 

Share this post


Link to post
Share on other sites
JLogan3o13

So am I correct you are attempting to log into the same website with different credentials and take the same actions (buying, selling, etc.)?


√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
iamtech
40 minutes ago, JLogan3o13 said:

So am I correct you are attempting to log into the same website with different credentials and take the same actions (buying, selling, etc.)?

@JLogan3o13Yes, you are correct but i am not selling and buying anything, my action is not inllegel.

Share this post


Link to post
Share on other sites
seandisanti

have you tried logging in with two different accounts manually and seeing if that works? I suspect you're going to have trouble with that even if you're not doing it programatically.

Share this post


Link to post
Share on other sites
iamtech
4 minutes ago, seandisanti said:

have you tried logging in with two different accounts manually and seeing if that works? I suspect you're going to have trouble with that even if you're not doing it programatically.

@seandisanti Yes, it was working manually, but only on different ie windows.

Share this post


Link to post
Share on other sites
seandisanti

Ok, if that's the case then you should be able to work with different instances, though you may not want to use Attach to get your handle. I would say to create each of your instances with _IECreate(), so you have separate handles right from the get go.

Share this post


Link to post
Share on other sites
iamtech
4 minutes ago, seandisanti said:

Ok, if that's the case then you should be able to work with different instances, though you may not want to use Attach to get your handle. I would say to create each of your instances with _IECreate(), so you have separate handles right from the get go.

i can't create new windows because i want run my script every 6 miniutes on opened ie windows.

Share this post


Link to post
Share on other sites
JLogan3o13

Ok, let's pause for a minute. You're sounding more and more like you are spamming a site. So I am going to reinstate my previous questions: What site, and what exactly are you trying to do? We are not going to assist in something that breaks the TOS or rules of a site.

  • Like 1

√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
iamtech

@JLogan3o13 i am not spamming a site, and i can't give my site because it was not access without my username and password.

Share this post


Link to post
Share on other sites
JLogan3o13
Posted (edited)

No one is asking for your username and password. But the forum rules state that we will not assist with:

Quote
  • Malware of any form - trojan, virus, keylogger, spam tool, "joke/spoof" script, etc.
  • Automation of software/sites contrary to their EULA (see Reporting bullet below).

And wanting to perform actions on a site, under multiple user accounts, every 6 minutes, certainly sounds like it falls into that category. If you would like to provide a better explanation (via PM if you do not wish to put it in the forum) as to what you are attempting to accomplish, I'm all ears.

Edit: Locking the thread to avoid comments from the peanut gallery. If you would like to explain yourself via PM, I am more than open to reopening it.

Edited by JLogan3o13

√-1 2^3 ∑ π, and it was delicious!

How to get your question answered on this forum!

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×