AutoItKing Posted March 16, 2007 Share Posted March 16, 2007 (edited) I am just teeming with web based ideas this week!! Here's another:HTML to AU3This will take your HTML pages and convert them into AutoIt web pages. It puts echo (' ') around each line and also adds the necessary include and _StartWebApp().The output file requires Web Based AutoIt from theguy0000.Enjoy!html_to_au3.au3If you want to use Javascript just use this: (PHP, ASP, etc. will not work with this)#Include <web.au3> _StartWebApp () echo (FileRead("file.html",FileGetSize("file.html"))) Edited April 16, 2007 by AutoItKing http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
WeMartiansAreFriendly Posted March 17, 2007 Share Posted March 17, 2007 Anyone? Anyone at all?nice job.. Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet() Link to comment Share on other sites More sharing options...
AutoItKing Posted March 17, 2007 Author Share Posted March 17, 2007 nice job..There's one brave enough to set foot upon forbidden territory. Anyone else? http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
theguy0000 Posted March 17, 2007 Share Posted March 17, 2007 (edited) I see that you _StartWebApp('Title Goes Here') but if the html page is already made, wouldnt it be safe to assume that the html page already has those beginning html tags? then if they do, you will end it with something like<html> <head> <title>Title goes here</title> </head> <body> <html> <head> <title>the title of the page that was already there</title> </head> <body> etc.....Oh, and you Do...until loop doesn't allow for blank lines in the html...try For $i=1 To _FileCountLines(blah) or somethingother than that, pretty cool script Edited March 17, 2007 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 More sharing options...
AutoItKing Posted March 17, 2007 Author Share Posted March 17, 2007 Yes, I forgot to take that out. http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
AutoItKing Posted March 17, 2007 Author Share Posted March 17, 2007 All fixed up. In first post now. http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
McGod Posted March 17, 2007 Share Posted March 17, 2007 Seems like overdoing it by adding the echo's. Just read the .html into a buffer then spew it out using echo. [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
AutoItKing Posted March 17, 2007 Author Share Posted March 17, 2007 Good idea! But then you'd need the HTML file there too. And not only the Au3 http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
GEOSoft Posted March 17, 2007 Share Posted March 17, 2007 Good work @AutoItKing I made a couple of minor changes to your script Run to ShellExecute and removed the Restart function #include <file.au3> $file = FileOpenDialog("Choose File...","","HTML Pages (*.html;*.htm)") $fileopen = FileOpen($file,0) $saveto = FileSaveDialog("Save as...","","AutoIt Scripts (*.au3)") If FileExists($saveto) Then $answer = MsgBox(301,"OverWrite?","That file already exists!!" & @CRLF & @CRLF & "Would you like to over write it?") If $answer = 6 Then FileDelete($saveto) FileOpen($saveto,2) FileWriteLine($saveto,"#Include<web.au3>") FileWriteLine($saveto,"_StartWebApp()") For $i=1 To _FileCountLines($file) $line = FileReadLine($fileopen) $line2 = StringReplace($line,"'",'"') FileWriteLine($saveto,"echo ('" & $line2 & "')") Next ElseIf $answer = 7 Then If @Compiled Then ShellExecute(@ScriptFullPath) Else ShellExecute(@AutoItExe) & " " & FileGetShortName(@ScriptFullPath)) EndIf Exit @exitCode ElseIf $answer = 2 Then Exit @exitCode EndIf George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
AutoItKing Posted March 17, 2007 Author Share Posted March 17, 2007 (edited) But I liked the restart function... :whimpers: lol And you got the old one. Edited March 17, 2007 by AutoItKing http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
gseller Posted March 18, 2007 Share Posted March 18, 2007 Very nice concept. I am missing something tho. Once I have converted my HTML to au3, I should be able to run the file and it function like the HTML file right? My HTML file includes javascript does this work with javascript? the erro I get is #Include <web.au3> Error reading the file. Any advice? Thank You Jim Link to comment Share on other sites More sharing options...
AutoItKing Posted March 18, 2007 Author Share Posted March 18, 2007 You need web based autoit. And I think javascript might work since it is run on the client computer. http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
GEOSoft Posted March 18, 2007 Share Posted March 18, 2007 But I liked the restart function... :whimpers: lolAnd you got the old one.I have the new one now and made the same changes but you can keep the function if you like . Personally I prefer to shorten the code. I'm going to play with the javascript question when I have time but right now that looks like sometime around the the next February 31st.I'd also like to play with using the dll version with this. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
AutoItKing Posted March 18, 2007 Author Share Posted March 18, 2007 Javascript does NOT work. http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
AutoItKing Posted March 18, 2007 Author Share Posted March 18, 2007 If you want to use Javascript just use this: #Include <web.au3> _StartWebApp () echo (FileRead("file.html",FileGetSize("file.html"))) http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] 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