AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Post Data?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Lixx9000
Guest





PostPosted: Mon Sep 22, 2008 7:50 am    Post subject: Post Data? Reply with quote

Can AHK be made to mimic post data, say..via a browser hook of some sort? I would use curl, but I'd like to wrap everything up into one .exe so I have less things to keep track of.
Back to top
Serenity



Joined: 07 Nov 2004
Posts: 1276

PostPosted: Mon Sep 22, 2008 8:08 am    Post subject: Reply with quote

http://www.autohotkey.com/forum/viewtopic.php?t=33506
_________________
"Anything worth doing is worth doing slowly." - Mae West
Back to top
View user's profile Send private message Visit poster's website
Titan



Joined: 11 Aug 2004
Posts: 5390
Location: /b/

PostPosted: Mon Sep 22, 2008 9:18 am    Post subject: Reply with quote

curl is a superior and more reliable option IMO. You can use FileInstall to combine it with your script.
_________________

Back to top
View user's profile Send private message Visit poster's website
tank



Joined: 21 Dec 2007
Posts: 1033

PostPosted: Mon Sep 22, 2008 11:07 am    Post subject: Reply with quote

curl while possibly easier to use is not more reliable than using wininet.dll
@titan do you even know what they both do?
I am not trying to start something but seriously .....
in addition to to derRaphaels superior way of sending post data
http://www.autohotkey.com/forum/viewtopic.php?p=217333#217333
my post is more tutorial and explaination than anything but without making assumptions of your understanding of the subject this could help
_________________
Read this
Com
Automate IE7 with Tabs
Back to top
View user's profile Send private message
Titan



Joined: 11 Aug 2004
Posts: 5390
Location: /b/

PostPosted: Mon Sep 22, 2008 12:48 pm    Post subject: Reply with quote

tank wrote:
@titan do you even know what they both do?
Yes I have used curl, libcurl, wget, System.Net and wininet from C extensively (have you?). I haven't tested derraphaels code so I do not know how well he wrote the wrappers - converting C++ code to AHK isn't always straightforward so he would be forgiven for making a mistake or two.

Also curl is very easy, just Run, curl -d user=test&pass=xyz http://example.com or if you prefer use either one of the libcurl wrappers - libcurl Wrapper (WIP) or libcurl example. k3ph from IRC said they were excellent.
_________________

Back to top
View user's profile Send private message Visit poster's website
IsNull



Joined: 10 May 2007
Posts: 112
Location: .switzerland

PostPosted: Tue Sep 23, 2008 9:38 am    Post subject: Reply with quote

Titan, why do you use external Programs?

Code:

buffer := ""
POST_DATA := "user=test&pass=xyz"
size := httpquery(buffer,"http://example.com",POST_DATA)
varsetcapacy(buffer,-1)
msgbox % "downloadet '"  . size . "' bytes: `n" . buffer
 
This works for NON Binary files like html source. for binary files, consider dR's Tutorial in the httpquery(...) Function Post.

greetings
IsNull
_________________
http://securityvision.ch
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group