Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2007
    Posts
    452

    Grin is it posible to count of xml pages in a folder and random view them ?

    is it posible to count of xml pages in a folder and random view them ?

    i have a folder and there r a few xml files in it... i want to get count of them and load them to project randomly...

  2. #2
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    Try:

    Code:
    --Getting all the XML Files and put them in a table. You could put this on preload.
    tblXmlFiles = File.Find("C:\\test\\", "*.xml", true, false, nil, nil);
    
    
    
    --put this on a button or something else
    if(tblXmlFiles)then
    	local num=Math.Random(1, Table.Count(tblXmlFiles));
    	if(File.DoesExist(tblXmlFiles[num]))then
    		XML.Load(tblXmlFiles[num]);
    		--Further actions for processing the XML File here.
    	end
    end
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  3. #3
    Join Date
    Mar 2007
    Posts
    452
    thanks alot m8 it works perfect... but if my xml files r online then it doesnt work... what should i do for it ???

    example : "http://www.google.com/xml/" lets say all my xml files r in that folder... how can i make it with that ???

Similar Threads

  1. Reading random text files from folder
    By Jonas DK in forum AutoPlay Media Studio 6.0
    Replies: 6
    Last Post: 06-05-2007, 02:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts