Sign in to follow this  
Followers 0
desaku

SWF Cataloger

1 post in this topic

OK. I have a bunch of SWF files (in the form of web cartoons) on my hard drive so I made this script. I runs in the directory with the SWF files then spits out an HTML file listing all of them in a current directory. I suppose that you could modify it for other things, but I leave that to you.

;; --------------------------------
;; SWF Cataloger
;; --------------------------------
;;
;; Sets things up;;
#Include <File.au3>
#Include <Array.au3>
#include <IE.au3> 
;;
$swf=_FileListToArray(@ScriptDir, "*.swf", 1)
;;
If @Error = 4 Then
    $r_swf = "No SWFs Found."
Else
    $r_swf = ""
EndIf
;;
    FileDelete(@ScriptDir & "\catalog.html")
    FileWrite(@ScriptDir & "\catalog.html", @CRLF & '<body>')
    FileWrite(@ScriptDir & "\catalog.html", @CRLF & '<strong>List of SWF files in ' & @ScriptDir & '</strong>')
    FileWrite(@ScriptDir & "\catalog.html", @CRLF & '<hr>')
    FileWrite(@ScriptDir & "\catalog.html", @CRLF & '<table>')
;;
if $r_swf = "" Then
    For $count = $swf[0] to 1 Step -1 
        FileWrite(@ScriptDir & "\catalog.html", @CRLF  & '<li><i>Compiled Flash File (SWF) - </i> ' & '<a href="' & $swf[$count] & '">' & $swf[$count] & '</a></li>')
    Next
Else
    FileWrite(@ScriptDir & "\catalog.html", @CRLF & '<p>' & $r_swf & '</p>')
EndIf
;; 
FileWrite(@ScriptDir & "\catalog.html", @CRLF & '<hr><br><br><br><br><i>' & 'Genterated by an AutoIt script' & '</i>')
_IECreate(@ScriptDir & "\catalog.html")
;;

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