Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137

    HTTP.Download function - Updated...

    I think this was removed (post) before because I was trying to help by linking to a executable (.exe) on my Website. I understand, that bot thing again I recon.

    Here is the updated function with a dummied URL in the function call.

    Code:
    --[[
    Here is a function that gets and returns (in a Dialog.Message()) the file size.
    Make sure you use double quotes ("") when typing in the strFile argument!
    ]]
    function fnGetFileSize(strFile)
    	nFileSize = HTTP.GetFileSize(strFile, MODE_BINARY, 5, 80, nil, nil, nil)
    		err = Application.GetLastError()
    			if err ~= 0 then
    				Dialog.Message("Error during download!", _tblErrorMessages[err])
    					Application.ExitScript()
    			else
    				nFileSize = String.GetFormattedSize(nFileSize, FMTSIZE_AUTOMATIC, true)
    					Dialog.Message("The file's size is...", nFileSize)
    			end
    end
    
    -- Then call (use) the function, like this example. (change the argument to the file path needed! - the argument is what's between the parenthesis '()')
    fnGetFileSize("http://www.yourwebsitehere.com/afile")
    Intrigued

  2. #2
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    Hi. Your post wasn't removed, it was just moved to the AMS examples forum...

  3. #3
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Oh! Can you remove this one then Corey, I must have missed that, sorry!

    Intrigued

Similar Threads

  1. Function: IsRunningOnTabletPC
    By Ted Sullivan in forum Setup Factory 8.0 Examples
    Replies: 4
    Last Post: 06-24-2006, 09:46 PM
  2. Example: HTTP.Download function
    By Intrigued in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 06-04-2005, 12:34 PM
  3. Function: String.RandomFromPattern
    By Brett in forum Setup Factory 8.0 Examples
    Replies: 0
    Last Post: 10-28-2004, 08:09 AM
  4. Bizarre Callback Function Behaviour - Can anyone help?
    By SRJ in forum AutoPlay Media Studio 5.0
    Replies: 3
    Last Post: 06-30-2004, 09:16 PM
  5. Function: Resize & Center an Image
    By kpsmith in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 05-17-2004, 01:36 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