Jump to content
Sign in to follow this  
MirnesC2

IE forms

Recommended Posts

MirnesC2

#include <IE.au3>
$oIE = _IECreate ("http://www.gmail.com")
$oForm = _IEFormGetObjByName ($oIE, "gaia_loginform")
$oQuery = _IEFormElementGetObjByName ($oForm, "Email")
_IEFormElementSetValue ($oQuery, "Username")
_IEFormSubmit ($oForm)

I wanted to a add a log in screen to my program so only registered users at our forum can use the program. You know how it either redirects you to log in page or the index when wrong/correct ID/PASS is entered? I was going to check the URL for that to determine if it was a successes or not. But that's not the problem, I don't like the idea of the actual internet explorer popping up, I want it to be all stealthy like or in the actual autoit GUI program.

Going to try to explain better... The above script opens an IE window and logs you into g-mail. Was wondering if any of these options are possible

• Create autoit GUI with 2 input boxes for ID/PASS and have it send the form invisibly in the background. I need to also check if what the redirected url is, but I think I can figure that part out myself.

• Open the webpage in an auto it gui and have them use their log in from there.

Edited by MirnesC2

Share this post


Link to post
Share on other sites
MirnesC2

Guess it's impossible then >.>

Edited by MirnesC2

Share this post


Link to post
Share on other sites
Melba23

MirnesC2,

Please wait at least 24 hrs before bumping your own post. :)

You must remember this is not a 24/7 support forum - those who answer are only here because they like helping others and have some time to spare. You just have to wait until someone who knows something about your particular problem, and is willing to help, comes online. Be patient and someone will answer eventually. Or if not - tough! ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Juvigy

You can use the $f_visible parameter in IEcreate to hide the window open by it. Later you can show it.

What you are asking is all possible with Autoit.

Check out the Inputbox or GUI controls and the IE.udf functions

Share this post


Link to post
Share on other sites
MirnesC2

#include <IE.au3>
$oIE = _IECreate ("http://www.snoxd.net")
$oForm = _IEFormGetObjByName ($oIE, "IDK WHERE IT IS??")
$oQuery1 = _IEFormElementGetObjByName ($oForm, "UserName")
_IEFormElementSetValue ($oQuery1, "PabloLol123")
$oQuery2 = _IEFormElementGetObjByName ($oForm, "PassWord")
_IEFormElementSetValue ($oQuery2, "mypass88")
_IEFormSubmit ($oForm)

I have this as actual form on the forum.

<div class="formsubtitle">Login</div>
<form action="http://chat.snoxd.net/index.php?act=Login&amp;CODE=01&amp;CookieDate=1" method="post" class="button"><b style="padding-bottom: 3px;"><div style="float: right; font-weight:normal;"><a href="http://chat.snoxd.net/index.php?act=Reg&amp;CODE=00">Register</a></div>Log In:</b>
    <input type="text" size="16" name="UserName" onfocus="focus_username(this)" value="" /><br />
    <input type="password" size="16" name="PassWord" onfocus="focus_password(this)" value="" /><br />
    <input style="background: transparent; border: 0; margin: 0;" type="image" src="style_images/graphite/login-button.gif" />
</form>

And I know I am suppose to fill this

$oForm = _IEFormGetObjByName ($oIE, "gaia_loginform")
with the name of the form, but this form doesn't have a name or id? what do I put? Edited by MirnesC2

Share this post


Link to post
Share on other sites
DaleHohm

Please see the helpfile and read the remarks for _IEFormGetObjByName

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

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.