Jump to content

Internet navigation WITHOUT IE


Recommended Posts

A friend helped me get the following:

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")

$oUsername = " "
$oPassword = " "

$oHTML = HTTPRequest("POST", "https://login.facebook.com/login.php", "email=" & $oUsername & "&pass=" & $oPassword)
sleep(5000)
ConsoleWrite($oHTML & @CRLF)

;$oHTTP.Open("GET", $address)
;$oHTTP.Send()
;more content goes here


Func HTTPRequest($oMethod, $oURL, $oData = "")
    $oHTTP.Open($oMethod, $oURL, False)
    If $oMethod = "POST" Then $oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
    $oHTTP.Send($oData)
    Return $oHTTP.ResponseText
EndFunc

The problem is facebook uses java javascript cookies (if that makes sense) so this was not logging in correctly. Unfortunately my friend had to leave, so im stranded, and not totally sure what im doing here...

Basically, i want this program to log in facebook, check on my profile page (hence the $oHTTP.Open("GET", $address) bit) and pop up a msgbox if theres any messages in the inbox. I might expand it for other events, and other things, but for now this is what i want.

I could do this with a IE client, but i want to be able to do this without a client, which is why were using the httprequest stuff...

Anyone game for not only helping the script, but assisting me learn what the added parts to the script do? Having the solution is one thing, but having the knowledge how to solve this problem in the future is another...

Help?

Edit

Yes, IE would be a whole lot easier, will take less time, and probabally work better. i dont care. I want to have it work without IE. Thanks for the suggestions about how to do it with IE but they dont really apply because thats not what im doing. So please dont post about IE here. Thanks.

Also fixed javascript cookies, not java. my bad.

Edit

ok according to Azkay (the friend helping me with this) you cant get javascript through httprequest, because javascript runs through the browser, so i would have to figure out how it makes the cookies to get anywhere further with this.

So anyone out there know much about javascript?

Edited by pileot
Link to comment
Share on other sites

  • Moderators

Why not (please explain) just use _IE* functions if you "know" they'll work and hide the IE client? ... No sense in beating yourself up if you can do it a different way with the same look and output.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Why not (please explain) just use _IE* functions if you "know" they'll work and hide the IE client? ... No sense in beating yourself up if you can do it a different way with the same look and output.

i could.... and did....

but the thing is i hate IE.

Wish a passion.

And i quite often have over 20 different apps running, i would rather have my computer resources free for other things instead of having IE suck those resources. (Ie is currently sucking about 100k of my system memory) Also with all my programs running i have a tendancy to close windows that are not being used... i inadvertantly close the IE wondow more often than i remember not to....

yeah i *could* do it the easy way, but if i can get it running this way it would be that much more awesome.

Edited by pileot
Link to comment
Share on other sites

Also with all my programs running i have a tendancy to close windows that are not being used... i inadvertantly close the IE wondow more often than i remember not to....

yeah i *could* do it the easy way, but if i can get it running this way it would be that much more awesome.

Why not (please explain) just use _IE* functions if you "know" they'll work and hide the IE client? ... No sense in beating yourself up if you can do it a different way with the same look and output.

If you can close a hidden IE window inadvertently then you do have a problem!

When you said you made an IE solution, either you must have automated a standard browser seesion or you missed the "visible" parameter in _IECreate()

Like SmOke_N said, check out the _IE* functions in the UDFs.

Link to comment
Share on other sites

To clear things up.

Facebook uses javascript to make the cookie, He does not want to use IE, Because he doesnt want IE running.

Thus, httprequests.

# MY LOVE FOR YOU... IS LIKE A TRUCK- #
Link to comment
Share on other sites

Autoit doesn't support Firefox in the same sence it supports IE. (No way to hook into stuff) Your stuck using IE. I understand you hate it, but it will do what you need it to do.

Sigh.... Im not asking for firefox support...

the httprequest fuctions dont use any browsers... they work a LOT faster than any IE scripts could work (because they dont need to download any images or anything) they use a lot less bandwith, and are overall better, especially if your not interested in watching a script work.

I dont know how else to say it. Im trying to use this script for browserless surfing. No IE, no Firefox....

Edit

Project halted, Apparently httprequests cant deal with javascript as its a browser thing... For this to work we need to know how javascript creates the cookies used for facebook. So untill then, its halted. :/

Edited by pileot
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...