Jump to content

script help


Recommended Posts

I didnt creat this script so bare with me

#include <IE.au3>

#include <String.au3>

$oIE = _IEAttach("http://www.immoral-attack.com")

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

While 1

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

_IEAction($oSubmit, "click")

_IELoadWait($oIE)

$String = _StringBetween(_IEBodyReadHTML($oIE), '<CENTER><A href="', '">Continue Slaying Monsters</A></CENTER>')

If @error Then

ClipPut(_IEDocReadHTML($oIE))

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

Exit

EndIf

_IENavigate($oIE, "http://www.immoral-attack.com/" & $String[0])

WEnd

im wanting to change it so that everytime i want to use the script it doesnt pop up a new IE window... but rather use the one im currently on

the game is small and shows when people login... and if im logging in multiple times a day it will look suspicious

Edited by scriptnub
Link to comment
Share on other sites

At the top of your script, use _IEAttach("The TITLE") instead of _IECreate().

Edit: If you use the help, you can get more detailed info with examples.

Regards,

RK

Edited by rbhkamal

"When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix

Link to comment
Share on other sites

ok i changed that and when i clicked the "Start" button the error button came up right after it

edited the first post to show what i have

Look at _IEAttach() in the help file (a habit you had better get into).

The default string type matched is TITLE. Is the IE window's title really what you have there? I'll bet not.

Use the optional "URL" match type: $oIE = _IEAttach("http://www.google.com", "URL")

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

$oIE = _IEAttach("http://www.google.com", "www.immoral-attack.com")

are you saying do it like this?... thats not working either

and i have looked in the help file... i just dont understand half of it :D

im wanting to change it so that when i get the "Error" pop-up (which will come from a security check) i dont want to have to login again each time... because thats quite noticable

Link to comment
Share on other sites

$oIE = _IEAttach("http://www.google.com", "www.immoral-attack.com")

are you saying do it like this?... thats not working either

and i have looked in the help file... i just dont understand half of it :D

im wanting to change it so that when i get the "Error" pop-up (which will come from a security check) i dont want to have to login again each time... because thats quite noticable

No. Look in the helpfile. The paramaters are:

_IEAttach ($s_string [, $s_mode = "Title"] )

$s_string (required) = String to search for (for "embedded" or "dialogbox", use Title sub-string or HWND of window)

$s_mode (optional) = Specifies search mode

What you can use is:

Title = (Default) sub-string of main document title

WindowTitle = sub-string of full window title (instead of document title)

URL = sub-string or url of the current page

Text = sub-string in text from the body of the current page

HTML = sub-string in html from the body of the current page

HWND = hwnd of the browser window

Embedded = title sub-string or hwnd of of the window embedding the control

DialogBox = title sub-string or hwnd of modal/modeless dialogbox

Link to comment
Share on other sites

  • Developers

still needing help with this...any suggestions?

help with what exactly ?

You are not being very clear here and don't responds to any of the suggestions posted.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

thats because this is a foreign language to me :D... i still need advice on what to do with the top post

this script was created as a _IECreate file... i changed the create to attach so that a new window doest pop up every time i turn it on... now when i start it i get an automatic error.... im wanting this to be resolved

P.S. i did read the help file... as i said... doesnt make sense

Edited by scriptnub
Link to comment
Share on other sites

Did you read the FULL page...for _IEAttach?

It Explains...you dont really need to understand it...you just need to put the variables in the right spots....to open your window.

Im not very good with autoit...ask anyone...but i learned to read the helpfile...(i never did at first :D)

but the helpfile should explain it...look:

Function Reference
_IEAttach 
--------------------------------------------------------------------------------

Attach to the first existing instance of Internet Explorer where the search string sub-string matches based on the selected mode.


#include <IE.au3> 
_IEAttach ( $s_string [, $s_mode = "Title"] )


 

Parameters

$s_string String to search for (for "embedded" or "dialogbox", use Title sub-string or HWND of window) 
$s_mode Optional: specifies search mode
Title = (Default) sub-string of main document title
WindowTitle = sub-string of full window title (instead of document title)
URL = sub-string or url of the current page
Text = sub-string in text from the body of the current page
HTML = sub-string in html from the body of the current page
HWND = hwnd of the browser window
Embedded = title sub-string or hwnd of of the window embedding the control
DialogBox = title sub-string or hwnd of modal/modeless dialogbox

Remarks

_IEAttach provides the "DialogBox" parameter to attach to modal and modeless dialogs created by the browser. It is important to note that not all dialogs created through browser interaction can be attached to and controlled in this way. Many of these dialogs are actually standard windows and can be controlled through the traditional AutoIt window functions. A reliable way to tell the difference between these types of windows is to use the "AutoIt Window Info" tool to examine it -- if the window contains a control called "Internet Explorer_Server1" then you can attach to it with this function, if it does not it is a standard window and traditional AutoIt windows functions must be used to control it.

The "embedded" option must be used to attach to HyperTextApplication (.hta) windows.

and a Sample:

#include <IE.au3>
$oIE = _IEAttach ("The quick brown fox", "text")

Does This Explain Anything?

Link to comment
Share on other sites

@BERT

:D

I was being quite serious. Not funny. If he fails to say, I tried your example, but it still doesn't work, and we show him the exact pages from the helpfile, and when it still doesn't sink in, the what do you think we should do? Keep wasting our time helping someone who won't understand what we have said countless times? As is encouraged by many users, post in your native tounge, with 30000+ members, at least 1 must speak his native language. Also, you can get a copy of the translated helpfile if there is one availible in your native tounge.
Link to comment
Share on other sites

@BERT

:D

Berts right in the basic point. Help requires cooperation from the OP.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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