Advertisement
Baoulettes

Simple XML Gen with files get

Sep 5th, 2014
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Script made by Baoulettes 11:02pm 5/09/2014
  2. ;Want to use? feel free just tell me thanks throught my mail : Joffrey.panisset@hotmail.com
  3. ;want to contact me ? feel free to mail me too :)
  4.  
  5. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  6. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  7. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  8. galleryname = Baoullery
  9. galid = 1
  10. id = 1
  11.  
  12.  
  13. FileDelete, %A_ScriptDir%\gallery.xml
  14. FileAppend, <?xml version="1.0" encoding="utf-8"?>`n<albums>`n<gallery id="%galleryname%" name="%galleryname%" path="gallery/%galleryname%/">`n, gallery.xml
  15.  
  16. Loop, %A_WorkingDir%\Baoullery, 1, 0
  17.     {
  18.         Loop, %A_LoopFileName%\*.*, 1, 0
  19.             {
  20.                 FileAppend, <image id=`"%id%`" thumb=`"%A_LoopFileName%`" img=`"%A_LoopFileName%`" title=`""%A_LoopFileName%`"  ><description><![CDATA[]]></description></image>`n, gallery.xml
  21.                 id++
  22.             }
  23.     }
  24. FileAppend, </gallery>`n</albums>, gallery.xml
  25. Exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement