Sign in to follow this  
Followers 0
fielmann

Example: How Autoit works with Webserver!

4 posts in this topic

#1 ·  Posted (edited)

hi folks,

Example: How Autoit works with Webserver! :o

1) Install Webserver: http://www.aprelium.com/abyssws/

2) Configure Abyss: Scripting-Parameters = AU3 = C:\Programme\AutoIt3\AutoIt3.exe

3) Create + save file "C:\Programme\Abyss Web Server\htdocs\webbasics.au3"

content of webbasics.au3:

$sContent_type="text/html"
ConsoleWrite("Content-Type: "&$sContent_type & Chr(13) & Chr(10) & Chr(13) & Chr(10))
$sTitle = "my 1st website with autoit!"
ConsoleWrite("<html>" & @CRLF)
ConsoleWrite("<head>" & @CRLF)
ConsoleWrite("<title>" & $sTitle & "</title>" & @CRLF)
ConsoleWrite("</head>" & @CRLF)
ConsoleWrite("<body>" & @CRLF)
ConsoleWrite("hello world" & @CRLF)
ConsoleWrite("</body>" & @CRLF)

4) Open your Internet Explorer http://localhost/webbasics.au3

Internet Explorer will now show you your 1st "hello world" created with autoit :)

Edited by fielmann

Share this post


Link to post
Share on other sites



Hes also gone and just taken the whole thing from the Web.au3 include anyway;

Original:

Func _StartWebApp ($sTitle="", $sCookie = "", $sContent_type="text/html")
    Local $error = 0
    if $sCookie <> "" then
        ConsoleWrite("Content-Type: "&$sContent_type & Chr(13) & Chr(10) & "Set-Cookie: " & $sCookie & Chr(13) & Chr(10) & Chr(13) & Chr(10))
        If @error then $error = 1
    else
        ConsoleWrite("Content-Type: "&$sContent_type & Chr(13) & Chr(10) & Chr(13) & Chr(10))
        If @error then $error = 1
    endif
    If $sTitle <> "" Then ConsoleWrite("<html><head><title>"&$sTitle&"</title></head><body bgcolor=#FAFAFA>")
    If @error then $error = 1
    SetError ($error)
    Return 0
EndFunc

So he also knew he was abit late.


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

who said that I re-invent the wheel new? :D

yes of course is the example based on the code of theguy0000 ! :o

my example code is more basic and should only show beginners how to start.... :)

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