Jump to content

HELP! -Web Based AutoIT -


 Share

Recommended Posts

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]

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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

Link to comment
Share on other sites

#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
Link to comment
Share on other sites

#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]

Link to comment
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?

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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]

Link to comment
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
    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
Link to comment
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]

Link to comment
Share on other sites

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]

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...