Jump to content

Recommended Posts

  • Moderators
Posted

could someone please update it?

:) A rather lazy request :whistle:

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.

Posted

:) A rather lazy request :whistle:

Not everyone is as smart as you SmOke_N...

Ok, let me rephrase my request so that SmOke_N don't have bust my knees:

All that i could see is that the timer function has been changed since last version, other than that i have no idea why it won't work. Could anyone be as kind as to help me/jazo10 to figure out why this script don't work with the new version.

Posted (edited)

I hate bumping threads, but i'm really in need of this script and have been trying to get it to work with the new version of AU3 for 2 days now... the problem lies in the read function, something is wrong besides the updated timer function name and i can't figure out what it is.

Could someone good with AU3 just look it over quickly and give me a hint as to what could be wrong, pretty please :whistle:

Edited by faldo
Posted

I hate bumping threads, but i'm really in need of this script and have been trying to get it to work with the new version of AU3 for 2 days now... the problem lies in the read function, something is wrong besides the updated timer function name and i can't figure out what it is.

Could someone good with AU3 just look it over quickly and give me a hint as to what could be wrong, pretty please :whistle:

StringRegExp() has changed!

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

  • 3 weeks later...
Posted

Suggestion, Without timerstart please, cuz its bugged

C:\Documents and Settings\jaenster\Desktop\HTTP_UDF_0.5\HTTP.au3 (219) : ==> Unknown function name.: 
Dim $timer = TimerStart() 
Dim $timer = ^ ERROR

And user-agent changes :whistle:

Nice script by the way

-jaenster

Posted

Suggestion, Without timerstart please, cuz its bugged

C:\Documents and Settings\jaenster\Desktop\HTTP_UDF_0.5\HTTP.au3 (219) : ==> Unknown function name.: 
Dim $timer = TimerStart() 
Dim $timer = ^ ERROR

And user-agent changes :whistle:

Nice script by the way

Should be using TimerInit(). TimerStart() is no more.
  • 1 month later...
Posted

This is very useful UDF. :D

But it doesn't have HTTPHead function available which is important for me :)

[u]My Projects[/u]:General:WinShell (Version 1.6)YouTube Video Downloader Core (Version 2.0)Periodic Table Of Chemical Elements (Version 1.0)Web-Based:Directory Listing Script Written In AutoIt3 (Version 1.9 RC1)UDFs:UnicodeURL UDFHTML Entity UDF[u]My Website:[/u]http://dhilip89.hopto.org/[u]Closed Sources:[/u]YouTube Video Downloader (Version 1.3)[quote]If 1 + 1 = 10, then 1 + 1 ≠ 2[/quote]

  • 3 months later...
Posted

Whene i added the udf into the include and tried the exaplescript this shows up

C:\Programfiler\AutoIt3\Include\HTTP.au3(219,26) : ERROR: TimerStart(): undefined function.
    Dim $timer = TimerStart()
Posted

Whene i added the udf into the include and tried the exaplescript this shows up

C:\Programfiler\AutoIt3\Include\HTTP.au3(219,26) : ERROR: TimerStart(): undefined function.
    Dim $timer = TimerStart()
Posted

Whene i added the udf into the include and tried the exaplescript this shows up

C:\Programfiler\AutoIt3\Include\HTTP.au3(219,26) : ERROR: TimerStart(): undefined function.
    Dim $timer = TimerStart()
"ERROR: TimerStart(): undefined function."

Hey, that was important information.

A reply, in this thread, from MHz time ago:

Should be using TimerInit(). TimerStart() is no more.

  • 3 weeks later...
Posted

These are indeed great UDFs.

It would be really nice to see someone with enough skill and knowledge to take this to the next level, based on user's comments and suggestions.

  • 8 months later...
Posted

This topic seems a little... Dead? I don't know how much help I could receive... but if anyone still happens to read this then I am square.

I made my switch over from MySQL to HTTP, but now I can't seem to get this to work. I'll post what I have and see if it's any help. I'm trying to make a GUI with a User and Password with a login button. Open the GUI , fill out the user and password and click login. After clicking login, I want it to take the text from the user box and stick it in the proper part of the string and same with the password and then send it to the server and login. here's what I have so far...

#include <GUIConstants.au3>
#include <String.au3>
#include <GuiListView.au3>
#include <HTTP.au3>

; GUI
GuiCreate("Pdub - Login", 260, 130)

; Creates the username box
$InputUser = GuiCtrlCreateInput('',80,30,150,20, 0)

; Creates the password box with blured input
$InputPass = GuiCtrlCreateInput('',80,55,150,20, 0x20)

; BUTTON
$Login = GuiCtrlCreateButton("Login", 100, 85, 100, 30)

$host = "www.shizzkabiz.com"
$page = "/login.php"
$vars = "username=" & $InputUser & "&userpass=" & $InputPass & "&form_id=myform&userlogin"

$url = $page&"?"&_HTTPEncodeString($vars)

$socket = _HTTPConnect($host)
$get = _HTTPGet($host,$url,$socket)
$recv = _HTTPRead($socket,1)
ConsoleWrite("Data received:"&@CRLF&$recv&@CRLF)

GUISetState ()

While 1
    $msg = GUIGetMsg()
    If $msg = $Login Then _HTTPPost($host, $page, $socket, $vars)
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
Posted

This topic seems a little... Dead? I don't know how much help I could receive... but if anyone still happens to read this then I am square.

I made my switch over from MySQL to HTTP, but now I can't seem to get this to work. I'll post what I have and see if it's any help. I'm trying to make a GUI with a User and Password with a login button. Open the GUI , fill out the user and password and click login. After clicking login, I want it to take the text from the user box and stick it in the proper part of the string and same with the password and then send it to the server and login. here's what I have so far...

#include <GUIConstants.au3>
#include <String.au3>
#include <GuiListView.au3>
#include <HTTP.au3>

; GUI
GuiCreate("Pdub - Login", 260, 130)

; Creates the username box
$InputUser = GuiCtrlCreateInput('',80,30,150,20, 0)

; Creates the password box with blured input
$InputPass = GuiCtrlCreateInput('',80,55,150,20, 0x20)

; BUTTON
$Login = GuiCtrlCreateButton("Login", 100, 85, 100, 30)

$host = "www.shizzkabiz.com"
$page = "/login.php"
$vars = "username=" & $InputUser & "&userpass=" & $InputPass & "&form_id=myform&userlogin"

$url = $page&"?"&_HTTPEncodeString($vars)

$socket = _HTTPConnect($host)
$get = _HTTPGet($host,$url,$socket)
$recv = _HTTPRead($socket,1)
ConsoleWrite("Data received:"&@CRLF&$recv&@CRLF)

GUISetState ()

While 1
    $msg = GUIGetMsg()
    If $msg = $Login Then _HTTPPost($host, $page, $socket, $vars)
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd

You'll have to read the values from your input fields. You cannot just use

$vars = "username=" & $InputUser & "&userpass=" & $InputPass & "&form_id=myform&userlogin"

...since $InputUser is just the handle to the Gui Input Control.

So you need to do something like:

$InputUserValue = GuiCtrlRead($InputUser)

and another one for the password.

Then you have the inputs and can do with it what ever you need.

Instead of this line:

If $msg = $Login Then _HTTPPost($host, $page, $socket, $vars)

I would rather call a new function where you get the values, format the string and then call the _HTTPPost function. So, something like that...

If $msg = $Login Then _Process()

Func _Process()

GuiCtrlRead(...)

etc etc

_HTTPPost($host, $page, $socket, $vars) ; <- of course with the right values in

EndFunc

I hope this will get you a bit further. Otherwise just ask again :)

cheers

You can fool some of the people all of the time, and all of the people some of the time, but you can not fool all of the people all of the time. Abraham Lincoln - http://www.ae911truth.org/ - http://www.freedocumentaries.org/
  • 1 month later...
  • 1 month later...
Posted

Should now work under AutoIt v3.2.2, but I make no garantees. ;)

Cubehead

I may have found/fixed a bug.

Trying to run against an app running on localhost on port 3000 (Rails!).

changed _HTTPConnect to the following:

Func _HTTPConnect($host, $port = 80)

Dim $ip = TCPNameToIP ( $host )

Dim $socket = TCPConnect ( $ip, $port ) ; *** used to be Dim $socket = TCPConnect ( $ip, 80 ) ***

If ($socket == -1) Then

SetError(1, @error)

Return -1

EndIf

$_HTTPLastSocket = $socket

SetError(0)

Return $socket

EndFunc

YMMV. Worked for me.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...