DirtDBaK Posted October 22, 2007 Share Posted October 22, 2007 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 More sharing options...
NELyon Posted October 22, 2007 Share Posted October 22, 2007 (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 October 22, 2007 by Senton-Bomb Link to comment Share on other sites More sharing options...
DirtDBaK Posted October 22, 2007 Author Share Posted October 22, 2007 i can do the automation stuff on the server... but the web based part is where im confused.... [center][/center] Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 22, 2007 Share Posted October 22, 2007 (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 October 22, 2007 by Blue_Drache Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
DirtDBaK Posted October 22, 2007 Author Share Posted October 22, 2007 (edited) TRIED THATBut this is what i got...Error 500Internal Server ErrorPowered by Abyss Web Server X1© Aprelium Technologies - 2001-2007Cant use PHP on Abyss or PERL..... Edited October 22, 2007 by DBak [center][/center] Link to comment Share on other sites More sharing options...
NELyon Posted October 22, 2007 Share Posted October 22, 2007 (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 October 22, 2007 by Senton-Bomb Link to comment Share on other sites More sharing options...
DirtDBaK Posted October 22, 2007 Author Share Posted October 22, 2007 (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 October 22, 2007 by DBak [center][/center] Link to comment Share on other sites More sharing options...
NELyon Posted October 22, 2007 Share Posted October 22, 2007 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.exeYou are probably using something like "Au3CGI.exe", right? Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 22, 2007 Share Posted October 22, 2007 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 Link to comment Share on other sites More sharing options...
DirtDBaK Posted October 22, 2007 Author Share Posted October 22, 2007 (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 October 22, 2007 by DBak [center][/center] Link to comment Share on other sites More sharing options...
NELyon Posted October 22, 2007 Share Posted October 22, 2007 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 Link to comment Share on other sites More sharing options...
DirtDBaK Posted October 22, 2007 Author Share Posted October 22, 2007 (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 October 22, 2007 by DBak [center][/center] Link to comment Share on other sites More sharing options...
NELyon Posted October 22, 2007 Share Posted October 22, 2007 (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 October 22, 2007 by Senton-Bomb Link to comment Share on other sites More sharing options...
DirtDBaK Posted October 22, 2007 Author Share Posted October 22, 2007 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 More sharing options...
NELyon Posted October 22, 2007 Share Posted October 22, 2007 (edited) No. FileOpen isn't required. EDIT: DBak, your from ohio? I'm from michigan Edited October 22, 2007 by Senton-Bomb Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 22, 2007 Share Posted October 22, 2007 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 Link to comment Share on other sites More sharing options...
DirtDBaK Posted October 22, 2007 Author Share Posted October 22, 2007 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] Link to comment Share on other sites More sharing options...
Blue_Drache Posted October 22, 2007 Share Posted October 22, 2007 Damn, buckeyes and wolverines. (From Toledo myself) Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
NELyon Posted October 22, 2007 Share Posted October 22, 2007 So, did my code work? Link to comment Share on other sites More sharing options...
DirtDBaK Posted October 22, 2007 Author Share Posted October 22, 2007 (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 October 22, 2007 by DBak [center][/center] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now