Sign in to follow this  
Followers 0
DirtDBaK

HELP! -Web Based AutoIT -

26 posts in this topic

Basiclly What I need to do with web based autoIT is i need a page that has a textarea, that i can type soucre in. The page will read this soucre and write it too a file on my server. After that it will compile what it wrote into an exe that autoIT compiler produces... It will create this exe in a folder i can ascess from the web. Then it will send me too a page that has a link to that file... not sure how to use web based autoIT... I have it set up and ready to go...


[center][/center]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Aha, this is my forte'

I will type up an example for the writing the file. You should be able to get it to compile from there.

I will edit this post

#Include <Web.au3>

$srcfile = @Scriptdir &"\script\tmpfile.au3"

If Not FileExists($srcfile) Then
    FileWrite($srcfile, ";Beginning code"&@CRLF)
EndIf

_StartWebApp()

If _Post("code") Then
    FileWrite($srcfile, _Post("code")
EndIf

echo("<form action="&$_SCRIPT_NAME&"> method=POST")
echo("<textarea name=code width=400 height=400></textarea><br>")
echo("<input type=submit>")

Haven't used autoit in a long time. This isn't tested but should work as long as you aren't using the special one that TheGuy0000 made so it would work with apache.

Edited by Senton-Bomb

Share this post


Link to post
Share on other sites

i can do the automation stuff on the server... but the web based part is where im confused....


[center][/center]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

You'll need a text input and a method of passing, in essence, the very large string of the text-entry area into a file and then executing the autoit compiler, and then copying the resultant .exe into the server folder. Easy enough if you pre-pend a set of defined compiler directives after the saving and before the compiling.

PHP may be what you want, but most likely, Perl (PHP's daddy) will be a better choice.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

TRIED THAT

But this is what i got...

Error 500

Internal Server Error

Powered by Abyss Web Server X1

© Aprelium Technologies - 2001-2007

Cant use PHP on Abyss or PERL.....

Edited by DBak

[center][/center]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

#Include <Web.au3>

$srcfile = @Scriptdir &"\script\tmpfile.au3"

If Not FileExists($srcfile) Then
    FileWrite($srcfile, ";Beginning code"&@CRLF)
EndIf

_StartWebApp("Blah")

If _Post("code") Then
    FileWrite($srcfile, _Post("code"))
EndIf

echo("<form action="&$_SCRIPT_NAME&"> method=POST")
echo("<textarea name=code width=400 height=400></textarea><br>")
echo("<input type=submit>")

OOPS! Big typo screwed it up. Now try

EDIT: Lol, just noticed that link in your sig, DBak. Glad someone put my function to use

Edited by Senton-Bomb

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

#Include <Web.au3>

$srcfile = @Scriptdir &"\script\tmpfile.au3"

If Not FileExists($srcfile) Then
    FileWrite($srcfile, ";Beginning code"&@CRLF)
EndIf

_StartWebApp("Blah")

If _Post("code") Then
    FileWrite($srcfile, _Post("code"))
EndIf

echo("<form action="&$_SCRIPT_NAME&"> method=POST")
echo("<textarea name=code width=400 height=400></textarea><br>")
echo("<input type=submit>")

OOPS! Big typo screwed it up. Now try

EDIT: Lol, just noticed that link in your sig, DBak. Glad someone put my function to use

AuCGI Error

no ##WebApp Defintion

????idk what that means....

btw great function with the gui thats in my sig, nice work....

Edited by DBak

[center][/center]

Share this post


Link to post
Share on other sites

AuCGI Error

no ##WebApp Defintion

????idk what that means....

Ah, i know the problem.

You are using the Au3CGI version of web based autoit.

Instead of choosing that file as your interpreter in the abyss control panel, make abyss handle au3 files with this:

C:\Program Files\Autoit3\Autoit3.exe

You are probably using something like "Au3CGI.exe", right?

Share this post


Link to post
Share on other sites

Regarding web server: Is that your personal web server or one that you're paying for on someone else's hosting space?


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

yea so just change it too the normal autoIT interpreter.... ok let me try that.... btw what is the difference between the two???

Personal Web Server

ok something came up this time only prob is i have textarea and button but i have this text before the txtarea

'method=POST' is it supposed to be that way??

Edited by DBak

[center][/center]

Share this post


Link to post
Share on other sites

AuCGI is made to especially work with servers like Apache or any thing else. The normal au3 interpreter seems to only work with abyss.

And it doesn't support _Post

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

ok it seemed to do something on the page but it didnt save the txt in the txtarea to the box, im assuming if the file and folder werent already created then it wouldnt work correct? So if i make the file myself it should be able to save txt

Ok i made the dir and the tmfile.au3 but it wont save any of the script there and if the script is too long then it says something about reset the connection...

Edited by DBak

[center][/center]

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

If the file doesn't exist then it is automatically made.

#Include <Web.au3>

$srcfile = @Scriptdir &"\script\tmpfile.au3"

If Not FileExists($srcfile) Then
    FileWrite($srcfile, ";Beginning code"&@CRLF)
EndIf

_StartWebApp("Blah")

If _Post("code") Then
    FileWrite($srcfile, _Post("code"))
EndIf

echo("<form action="&$_SCRIPT_NAME&" method=POST>")
echo("<textarea name=code width=400 height=400></textarea><br>")
echo("<input type=submit>"

try that

Edited by Senton-Bomb

Share this post


Link to post
Share on other sites

If the file doesn't exist then it is automatically made.

#Include <Web.au3>

$srcfile = @Scriptdir &"\script\tmpfile.au3"

If Not FileExists($srcfile) Then
    FileWrite($srcfile, ";Beginning code"&@CRLF)
EndIf

_StartWebApp("Blah")

If _Post("code") Then
    ;ADD FILE OPEN HERE????
    FileWrite($srcfile, _Post("code"))
    ;ADD FILE CLOSE HERE???
EndIf

echo("<form action="&$_SCRIPT_NAME&" method=POST>")
echo("<textarea name=code width=400 height=400></textarea><br>")
echo("<input type=submit>"
Wouldnt that require FileOpen( $scrfile, 9 ) ????

[center][/center]

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

No.

FileOpen isn't required.

EDIT: DBak, your from ohio? I'm from michigan <_<

Edited by Senton-Bomb

Share this post


Link to post
Share on other sites

I was going to suggest that you go ahead and install Apache, MySQL and PHP. There's an AIO to do that, if you care to.


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

No.

FileOpen isn't required.

EDIT: DBak, your from ohio? I'm from michigan <_<

i go to michigan a lot up by coldwater.... on fiesta shores!


[center][/center]

Share this post


Link to post
Share on other sites

Damn, buckeyes and wolverines. (From Toledo myself)


Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Share this post


Link to post
Share on other sites

So, did my code work?

Share this post


Link to post
Share on other sites

#20 ·  Posted (edited)

it worked!!! I just had to change the .auw to .au3 in abyss!!!

Awesome

--Buckeyes Rule--

Any way .... what are some of the other important functions besides post, is there a list of them or a helpfile, or is this all the same as standard autoit just with the exception its for server interpretations.... only things i know are post and echo...

whatever happend to the AutoIT based forum software that one of the forum members made a few months back??

Edited by DBak

[center][/center]

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