Sign in to follow this  
Followers 0
pileot

Internet navigation WITHOUT IE

11 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



I'm pretty new to the whole AutoIt scene, but let me know if you make any progress.

I'd very much like to see the end result.

Keep me posted.

Share this post


Link to post
Share on other sites

another feature i would like to eventually add is checking the page that says which friends are active, and if a specific friend goes active it pops another message...

Share this post


Link to post
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.


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.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

Apply the KISS Rule then advance,

Otherwise your gonna have a lot of idle time on your hands.

Uh, I was working on something like this a while ago. I know a bit of the ie.au3 functions so ask if you need help!

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

lol

thanks for the response...

yes i know its easier to use IE, KISS, etc.

But i was hoping to find a way to do it this way...

Anyone have suggestions how to do it without IE?

Share this post


Link to post
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- #

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

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

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  
Followers 0