Jump to content

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


Recommended Posts

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.

Link to comment
Share on other sites

  • Moderators

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.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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)

 

Link to comment
Share on other sites

  • Moderators

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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • Moderators

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.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...