Jump to content

Web-based AutoIt! - New with AuCGI!


theguy0000
 Share

Recommended Posts

Try the new AuCGI handler!

(added September 22, 2007)

Now, you can make your own web pages and web applications with AutoIt! And, with AuCGI, easier and better than ever before!

AuCGI allows for exciting new features such as <?au3 ?> tags!

Here's all you have to do to start making your own web pages in AutoIt!

1.) Download AuCGI.exe (click) and put it in C:\ (or wherever you want)

2.) Download Web.au3 (click) and put it in C:\Program Files\AutoIt3\include, or if you are using beta, C:\Program Files\AutoIt3\beta\include

ABYSS WEB SERVER

3.) Download and install Abyss Web Server X1 if you haven't already from http://www.aprelium.com/

4.) go to the Abyss Control panel (usually http://192.168.0.1:9999/ )

5.) Click Configure next to the Default Host (or if you have ...bought... Abyss Web Server X2, next to whatever host you want to configure)

6.) Go to Scripting Parameters

7.) If you have already installed Web-Based AutoIt, click the pencil next to the AutoIt interpreter. If you are new to web-based autoit, click the Add button in the Interpreters table.

8.) Fill in the info with this...info:

Interpreter: C:\AuCGI.exe

(or where ever you put AuCGI.exe in step 1)

Arguments: LEAVE BLANK

Type: Standard

If you are new to web-based autoit (didn't have it installed before), click Add under Extensions, and type auw (or ahp or whatever file extension you want to use for web-based Apps)

9.) click OK

10.) click OK again

11.) Click Restart at the top of the page

12.) you're ready!

APACHE

NOTE: AUCGI WITH APACHE IS UNTESTED AND MAY NOT WORK. IF YOU USE APACHE, PLEASE TEST THIS AND TELL ME HOW IT WORKS OUT.

3.) Add the following text to either your apache config file, or your .htaccess file (or create a .htaccess file and put this in there)

Options +ExecCGI
AddHandler cgi-script .auw

If you want, replace .auw with .ahp or whatever file extension you want to use for web-based Apps.

4.) I think that's it. Now, whenever you want to make a web-based App, put this at the beginning:

#!C:\AuCGI.exe

if you put AuCGI.exe somewhere other than C:\, put the path to there after the #!

This is called a Shebang line.

Yes, this has to go at the VERY beginning of the web-based app. it has to be on the very first line. No blank lines or spaces or tabs or anything before it. Even before the ##WebApp line (which you'll learn about later...)

-------------------------------------------------------------------

To make your first web-based app!

On the first line needs to be this:

##WebApp

This marks your scripts as a web-based app. Without that there, your script will not work.

If you wish, you can add parameters after that. For example:

##WebApp title="My Cool Web Page"

if you specify a title, the starting html tags are there for you. If you want to put other info in the <head> tag or anything, you should set the title manually using the <title> tag, instead of using the ##WebApp line.

As with the Shebang line, this must go at the very top of the script, with no blank lines or spaces before it. However, if you are using Apache, this should go after the Shebang line.

you can also use

##WebApp content-type="xxxx"

to change the content type that is sent to the server. The default is text/html. You could also use text/plain or pretty much any standard format content type.

or you can use both:

##WebApp title="My Title" content-type="blah/blah"

But I don't see why you would do that, seeing as changing the content type will make the title not work anyway...

Note: Don't put double quotes in your title. Double quotes should be used to surround the title, but they should not be inside the title. Also, don't even try using variables. It won't work.

Here is an example of what NOT TO DO:

##WebApp title="My name is " & $name & "! How are you?"

I'm not sure why you would need a title like that anyway, but it won't work. it will just cut off at My name is.

Next, you can use html or text or whatever you want. Or, you can start using AutoIt. everything between <?au3 and ?> is considered AutoIt, and anything outside it is considered html (or plain text or whatever if you changed the content typo)

You can use whatever autoit you want inside the <?au3 ?> tags, and whatever html you want outside them. Note that I will eventually release a version of AuCGI that lets you block certain commands.

Note: For people who have used Web-based AutoIt before, you no longer need to use _StartWebApp. That is done for you automatically when you use the #WebApp line.

Note: You do not need to include Web.au3. this is done for you AUTOMATICALLY. You can use any functions in Web.au3, but you do not need to include it. I guess you can if you really want, but it won't make any difference...

That's about it. If you have not used web-based autoit before, sorry, I don't have the instructions on how to use all the functions. I will type up a formal help file soon.

If you have used web-based autoit before, it's exactly the same functions as before. Just use autoit inside <?au3 ?> tags and html outside. HOWEVER, _Post doesn't work. I don't think. So, don't even try. Or you can try and see if you can get it to work, but I couldn't.

If you want it, here is the source to AuCGI.exe (click).

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

the function __StringFindOccurances() returns wrong values. Test with: "TestTestTest" and "Test". Besides that it's unnecessary complex and slow.

Use this:

Func __StringFindOccurances($sStr1, $sStr2); 
    local $dummy = StringReplace($sStr1,$sStr2,$sStr2,0,1)
    Return @extended
EndFunc

Cheers

Kurt

__________________________________________________________(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 *

Link to comment
Share on other sites

54 views and nobody's even commented?

Am I nobody?? :whistle:

Cheers

Kurt

__________________________________________________________(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 *

Link to comment
Share on other sites

Am I nobody?? :whistle:

Cheers

Kurt

you helped but didnt comment. you didnt say you tested it or "I love this" or "awsome" or "this stinks" or anything, just told me how to fix a function that was wrong. Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

you helped but didnt comment. you didnt say you tested it or "I love this" or "awsome" or "this stinks" or anything, just told me how to fix a function that was wrong.

well, there was no need for me to comment. Based on you code I saw it will work, except the erroneous funtion.

Cheers

Kurt

__________________________________________________________(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 *

Link to comment
Share on other sites

you helped but didnt comment. you didnt say you tested it or "I love this" or "awsome" or "this stinks" or anything, just told me how to fix a function that was wrong.

O.K. here is my comment. Build an apache module based on your idea, so we can use AutoIT as scripting language (similar to mod_perl) :whistle:

Cheers

Kurt

__________________________________________________________(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 *

Link to comment
Share on other sites

O.K. here is my comment. Build an apache module based on your idea, so we can use AutoIT as scripting language (similar to mod_perl) :whistle:

Cheers

Kurt

not sure how. I'll look into it :)

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

you helped but didnt comment. you didnt say you tested it or "I love this" or "awsome" or "this stinks" or anything, just told me how to fix a function that was wrong.

It is cool. Is this comment OK?

i542

I can do signature me.

Link to comment
Share on other sites

give a http://...... adress with autoit so we test it.

sure!

http://71.196.128.251:4150/test.au3

heres the source:

_StartWebApp ("title")

echo ("Hi! I was made in AutoIt!<br />")
echo ("I can get information from the server's computer, and interact with the server's computer. The server is running "&@OSVersion&"!<br />")
echo ("GET variable say is equal to: "&_Get("say")&"<br />")
echo ("Your IP Address is: "&_GetClientIP()&"<br />")
_WebCounter ( )

that's hosted on my pc.

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

Were wil the script execute on my computer or the computer which is on the website ?

on the server computer. if it could run on other people's computers that would be dangerous :whistle:

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Link to comment
Share on other sites

sure!

http://71.196.128.251:4150/test.au3

heres the source:

_StartWebApp ("title")

echo ("Hi! I was made in AutoIt!<br />")
echo ("I can get information from the server's computer, and interact with the server's computer. The server is running "&@OSVersion&"!<br />")
echo ("GET variable say is equal to: "&_Get("say"))

that's hosted on my pc.

Display my current IP adress on your webpage with auto :whistle:

Awesome that this is working !!!

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