Download from internet with lingo

Can I write lingo that will allow a Director movie to download a file from the internet and put it, say, onto the desktop of the user's computer?  I don't mean in a "stealth" fashion.  I mean a Director movie that the person chooses to run because they want to download that file.
I tried downloadNetThing, but from the example in the manual, I can't seem to get the syntax sorted out properly, or there is some other problem.  Here's the code I'm currently trying:
on exitFrame me
  downloadTheNetThing("http://www.mydomain.com\images\myinstaller.exe",c:\Documents and Settings\owner\desktop&"myinstaller")
end
Ideas?
Thanks.
Dewey

The first problem is that I said to not use "exitFrame". Perhaps I should have used stronger language.
I modified a script from my library to do file downloading and I wrote a behavior to demo how to use it.  Try them out and read the code carefully.
Paste the following code into a Parent script named "FileDownLoader".
-- FileDownLoader Parent Script
property  pActiveNetOperations  --  Data on current network operations in progress.
-- private static property
property  this  -- reference to this object. DO NOT access directly.
-- PUBLIC METHODS
on getInstance me  -- Use this to get an object instance
  return me.new()
end getInstance
-- NOTE:  if you make changes to this script you MUST call this handler before running your program again,
--              otherwise your changes will not exist.  ie. in the message window:  script("FileDownLoader").clearStatics()
on clearStatics me
  me.script.this = void
end clearStatics
-- Method to call to download a file to your computer
-- Makes callback which returns: Error:Boolean, ErrorMessage:String
on downLoadFile me, URL, FilePath, CallingOb, CallbackHandler
  -- store info about this operation for monitoring and callbacks.
  NetOpData = [#id:0, #CallbackOb:CallingOb, #CallBackHandler:CallbackHandler]
  NetOpData.id = downloadNetThing(URL, FilePath)
  -- if there is a callback object and a handler then add this data to pActiveNetOperations. Otherwise we are done.
  if NetOpData.CallBackOb.ObjectP AND NetOpData.CallBackHandler.SymbolP then
    pActiveNetOperations.add(NetOpData)   -- store callback info
    -- setup timeout object to monitor net operation completion
    if pActiveNetOperations.count = 1 then
      timeout().new("NetMonitor", 250, #monitorNetOps  , me)  -- check network operations four times a second.
    end if
  end if
end downLoadFile
-- PRIVATE METHODS
on new me
  if me.script.this.objectP then return me.script.this  -- enforce Singleton pattern
  me.script.this = me
  pActiveNetOperations = []
  return me.script.this
end new
-- Polls the current network operations to see if they are done or errored out.
-- returns Error:Boolean, ErrorMessage:String
on monitorNetOps me, timeOb
  -- tag net operations that need to be deleted from the queue.
  ToDelete = []
  -- Create list of callbacks to be made.
  CallBacks = [] 
  -- check each net operation for completion.
  repeat with Index = 1 to pActiveNetOperations.count
    NetOpData = pActiveNetOperations[index]
    --    *** Debug Code.  Uncomment if need more details about the stream status.  ***
    --    StreamStatus = getStreamStatus(NetOpData.id)
    --    put StreamStatus
    --    case StreamStatus.state of
    --      "Connecting":
    --        put "Connecting to the server..."
    --      "Started":
    --        put  "Download started..."
    --      "InProgress":
    --        tempPercent = integer ( 100 * (Float(StreamStatus.bytesSoFar) / StreamStatus.bytesTotal) )         
    --        put  string (tempPercent) & "% downloaded..."
    --      "Complete":
    --        put  "Download completed."        
    --    end case
    -- check if net operation is done
    if netDone(NetOpData.id) then
      ToDelete.add(index)
      if netError(NetOpData.id) <> "OK" then  -- there was an error
        ErrorMessage = me.getErrorMessage(netError(NetOpData.id))
        TempList = [NetOpData.CallBackHandler, NetOpData.CallBackOb, 1, ErrorMessage]  -- handler,object,error, errorMsg
      else  -- no error. return data passed back
        ReturnText = netTextResult(NetOpData.id)
        TempList = [NetOpData.CallBackHandler, NetOpData.CallBackOb, 0, ""]  -- handler,object,error, errorMsg
      end if
      CallBacks.add(TempList)  --  store callback info for each net operation that is completed.
    end if
  end repeat
  -- delete completed network operations
  if ToDelete.count then
    repeat with Pos = ToDelete.count down to 1
      pActiveNetOperations.deleteAt(ToDelete[Pos])
    end repeat
  end if
  -- if no network operations are a happening, then stop monitoring
  if pActiveNetOperations.count = 0 then
    timeOb.forget()
  end if
  -- Send data back to calling objects.
  repeat with CallBack in CallBacks
    Call(CallBack[1],CallBack[2], CallBack[3], CallBack[4])  -- handler,object,error, errorMsg
  end repeat
end monitorNetOps
-- Returns error message
on getErrorMessage me, ErrorNum
  case ErrorNum of
    0: return("Everything is okay.")
    4: return("Bad MOA class. The required network or nonnetwork Xtra extensions are improperly installed or not installed at all.")
    5: return("Bad MOA Interface. See 4.") 
    6: return("Bad URL or Bad MOA class. The required network or nonnetwork Xtra extensions are improperly installed or not installed at all.")
    20: return("Internal error. Returned by netError() in the Netscape browser if the browser detected a network or internal error.")
    4146: return("Connection could not be established with the remote host.")
    4149: return("Data supplied by the server was in an unexpected format.")
    4150: return("Unexpected early closing of connection.")
    4154: return("Operation could not be completed due to timeout.")
    4155: return("Not enough memory available to complete the transaction.") 
    4156: return("Protocol reply to request indicates an error in the reply.")
    4157: return("Transaction failed to be authenticated.")
    4159: return("Invalid URL.")
    4164: return("Could not create a socket.")
    4165: return("Requested object could not be found (URL may be incorrect).")
    4166: return("Generic proxy failure.")
    4167: return("Transfer was intentionally interrupted by client.")
    4242: return("Download stopped by netAbort(url).")
    4836: return("Download stopped for an unknown reason, possibly a network error, or the download was abandoned.")
    otherwise: return("Unknown network error.")
  end case
end getErrorMessage
------------------------------------------------------------------------------------------ --------------------  end of script
This next script is a Behavior that you attach to a Text member sprite. The default values are set to the ones you posted, but you will get an error because there is something wrong with your URL.  Using a text member sprite provides a way to display a success status or an error message. It also provides a sprite to Click. Note that the call to download a file is initiated on mousedown.
--  File download Test behavior
-- Drop on a TEXT MEMBER
property  pMe  -- this sprite
property  pURL  -- url to retrieve file from
property  pFilepath  -- full path to store file on local hard drive
On GetBehaviorDescription me
  return "File download Test behavior."
end GetBehaviorDescription
On GetPropertyDescriptionList me
  Props = [:]
--  Props[#pURL] = [#default:"http://chart.apis.google.com/chart?cht=p3&chd=t%3a90,10&chs=250x100&chl=Pacman", #format:#string, #comment:"URL"]   -- sample
    Props[#pURL] = [#default:"http://www.mecssoftware.com/images/carol&dewey.jpg", #format:#string, #comment:"URL"]
  Props[#pFilepath] = [#default:"C:\Documents and Settings\All Users\Desktop\test1.png", #format:#string, #comment:"Full path to store file."]
  return Props
end GetPropertyDescriptionList
on beginSprite me
  pMe = sprite(me.spriteNum)
  pMe.member.text = empty  -- clear text member
end beginSprite
on mouseDown me
  -- make call to download a file
  script("FileDownLoader").getInstance().downLoadFile(pURL, pFilepath, me, #displayStatus)   -- url, full file path, this object, handler to call
end mouseDown
on displayStatus me, error, errorMsg  -- callback from the "FileDownLoader" object.
  if error then
    pMe.member.text = "There was an error downloading your file." & Return & errorMsg
  else
    pMe.member.text = "File Downloaded Succesfully."
  end if
end displayStatus
------------------------------------------------------------------------------------------ --   end of script

Similar Messages

  • Pdf files unable to be downloaded from internet explorer

    I have just purchased my first ipod nano, 4th generation. Since I have downloaded itunes to my computer I cannot view pdf files from internet explorer. I then removed itunes from the computer and pdf files could be downloaded from internet explorer. I then downloaded and installed itunes again and had the same problem all aver again. Could someone please tell me why this is happening.

    Hi there mba,
    Check out this thread, here a post from dansmith details the following steps:
    "The issue is caused when Windows creates the printer profile in the control panel that it doesn't correctly create it with the drivers.
    We're not going to completely uninstall all the HP software, instead we're going to remove the corrupt Windows printer profile and reinstall it.  Total time for this on an average computer is about 5-10 minutes to completely repair (including reboot).
    1) Navigate to Start Menu > Devices and Printers or Start Menu > Control Panel > Printers
    2) Select each printer profile for the printer with an issue, then select remove device/printer.
    3) Reboot
    4) Navigate to Start Menu > All Programs > HP > insert model # here > Add Printer (or Setup Wizard)
    5) Follow the setup prompts to reinstall the printer profile and it recreates the Windows printer.
    6) Run the HP Update Tool from Start Menu > All Programs > HP if your printer installs it, rebooting afterwards if necessary.
    7) Test by printing google.com (uses very little ink when the test page comes out)."
    Try his steps out and let us know if it helps. '
    Best of Luck!
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • Download from internet to my mac an then to USB, but from UBC in can't download to PC! Why?

    Download from internet to my mac an then to USB, but from UBC in can't download to PC! Why?

    Appologize for wrong typing (UBC instead of USB!)   I would to know why when I download music to my mac laptop (that goes to itunes), and download to USB, why tthrough that USB the music can't be transfered to a PC type computer or or cell phone (not iphone) through that USB?
    Is it itues that doen't work for PC, or it's the same USB that can't work with both mac and PC?

  • Program downloaded from internet are you sure you want to open

    Hi Guys
    I've got an issue i cant solve.
    basically when opening programs i've downloaded from internet i.e .dmg files, and there installed in my applications, im getting the prompt that
    " this program was downloaded from the internet, are you sure you want to open it? "
    i can open and close the application and will still get the prompt, after reboots.
    any suggestions
    i've tried running cleanups with programs such as onyx as well but doesnt help
    Cheers

    If it keeps coming back after the first time for that app, then try repairing permissions using Disk Utlity.
    It will report a lot of stuff that you can safely ignore.  I'm not sure if it will fix the problem, but it might.
    The Quarantine attribute is supposed to be stripped off when you OK it, but it appears it is not. It could be a problem with permissions that is preventing the attribute from being removed.

  • Unable to download candy crush on iPad, all restrictions are off but blank page appears when directed to download from internet

    Have updated software to latest version, ensured all restrictions are off, can only find guides and cheats in App Store but not the actual game. Have tried to download from internet but get redirected back to App Store where blank page appears and nothing comes up....

    I also encountered this problem. I'm afraid I didn't meticulously document my work, but here are the step I took that might be relevant. I downgraded to IE9 and then down to IE8. I tried the
    BypassSSLNoCacheCheck and BypassHTTPNoCacheCheck settings in the registry, which didn't work for me. I tried moving the location of the temporary internet files folder by modifying it directly in the registry:
    HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ User Shell Folders
    HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Shell
    This didn't work either. While I could see that I had the invisible content.ie5 folder in there, plus the randomly named folders, there was nothing cached in those folders. Cacls.exe showed
    that the user had full control, and I could past files into those folders. This seemed to rule out a problem with permissions on the temp ie files folder. 
    The big clue for me was this thread when someone said that it worked for the administrator account, but not others. While logged in as the affected user, I tried deleting:
    HKCU\Software\Microsoft\Internet Explorer (the entire folder, with all its subkeys)
    and also: HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings (again, the entire folder, along with all its subkeys).
    I tried running IE again, and downloads work again! In the internet control panel, I now see a path listed for the temporary files folder (the path I specified), and the cache is set to 50MB
    now instead of being stuck at 0. I haven't tried updating back to IE9 yet.
    I suspect that changing the location of the temporary IE files folder was unessecary, and that all that I really needed to do was delete the two regkey folders. IE10 may be adding some setting
    there that gets left after uninstalling it that causes IE9 and IE8 to choke. Hopefully this will save someone the trouble of rebuilding profiles.

  • How can I save the .mp4 files downloaded from internet to ipad memory so that I don't have to download everytime to view them again

    How can I save the .mp4 files downloaded from internet to ipad memory so that I don't have to download everytime to view them again. Also they might remove them from internet so I can't rely on the bookmark to them.

    I'm trying to send home movies to my 10 year old nephew who lives across the country. He doesn't have a computer. He has an iPod touch. His parents have computers. But I don't want everything I ever try to have him do result in "you need your parent's computer for this." It's getting really embarrassing. I have converted my family over to Apple computers but now they want to buy iPhones, iPads, and iPods even though I tell them to go Android. It took a decade to convert them away from windows now I'm trying to keep them away from these freedom limited iOS devices and they won't listen. Then it becomes my responsibility to make their iPads print to their fancy pre-airprint color laser jet printers, get home movies onto them, and countless other things. It's driving me nuts.
    I have converted these files to a format that the iOS devices will play directly off of dropbox. Now, how do I get the infernal devices to save it instead of play it?

  • Just upgraded to Lion, can't open any pdf file downloaded from internet that was fine with Leopard. How can I overcome this obstacle ?

    Just upgraded to Lion, can't open any pdf file downloaded from the internet that was fine with Leopard before. I just got a black screen when I clicked on a pdf icon on a given internet site, and same happened with several sites that I visited. How can I overcome this obstacle ?

    Try two things with Safari not running:
    1) Launch Adobe Reader, open its preferences, select the Internet category, and check the values under "Display PDF in browser using".  If it's checked, try unchecking it.
    2) Look in /Library/Internet Plug-Ins (at the top-level of your boot volume) for something names AdobePDFViewer.plugin.  If you see such a file, try moving it to a folder named "Disabled Plug-Ins" (if such a folder exists) or onto the Desktop.
    Then see how things work.

  • Im want to download Adobe Photoshop Elements 11 I received with Epson Artisan 1430 printer  I have cd but no cd unit  I need  to download from internet how pls ?

    Regarding installing Adobe Photoshop Elements 11 from internet...how ? 
    I don't have a cd compartment to download from disk
    thnx

    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5.5 (win), 5.5 (mac) | 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • ERROR OPENING PDF FILES DOWNLOADED FROM INTERNET

    I have a problem when I download a pdf file from Internet and I try to open in throughout Acrobat Reader. It appeared one error saying "The file path is not valid". What can I do?.

    Hi there,
    I found this can happen if the file does not download correctly. When this happens, simply try redownloading the file and wait until it has fully downloaded before doing anything else with the browser.
    Does that work now?
    If you want to thank someone for their comment, do so by clicking the Thumbs Up icon.
    If your issue is resolved, don't forget to click the Solution button on the resolution!

  • Block users from downloading from internet

    I'm curious as to what everyone is using to block users from downloading certain file types (.exe, msi, zip, bat, etc) from the internet? We had websense, now barracuda for a web filter but have major issues with filtering downloads from the internet. The main issues is filtering SSL sites.

    Hello,
    The WSA has a feature called Object Filtering which allows admin's to configure access policy parameters to block certain file types from being downloaded through the WSA. To apply the same settings to HTTPS requests the WSA would need to decrypt the request.
    I Hope this helps.
    Best Regards,
    Michael Hautekeete
    Customer Support Engineer
    Cisco Content Security - Web Security Appliance
    http://www.cisco.com/en/US/products/ps11169/serv_group_home.html
    https://supportforums.cisco.com/community/netpro/security/web
    https://supportforums.cisco.com/community/feeds?community=2091

  • I can install apps downloaded from my friends apple ID but i can't install apps downloaded from internet. WHY?

    in both cases the apple ID is different but i can install apps from my friends apple ID but not with apps downloaded from internet

    What do you mean by apps downloaded from the internet?
    iPhone apps can be downloaded and installed from the iTunes App Store only.

  • Applications downloaded from internet

    Just upgraded to 10.5 from 10.4. I'm now getting an new (to me) message that pops up when I try to run an application I've downloaded. Says something like "Application downloaded from the internet, do you still want to run". I'm looking for a way to "turn off" that message. Some apps do not show the message after I've run the app the first time. Others continue to show the message each time I run the app. Can someone point me to the place I can turn off this message?
    Thx.

    Speaking as someone who has been a Windows network admin for 20 years, the biggest effect these kinds of "you're about to do sothing that might occasionally be stupid, but is almost always normal" dialogs is to train people to answer warning dialogs in the affirmative.
    And it's really hard to un-train them.
    I've had several people come to me and as "Peter, it asked me 'do you want to install a virus on your computer' (or something equally scary) and I clicked 'install' before I noticed what it was saying, and now my computer's acting funny".
    When Apple added "open safe files" to Safari I groaned. I knew some stupid thing like this was coming up.
    The most fun I've had with this was when a screen saver tried to run a program, and LaunchServices came up with the stupid warning, AND I COULDN'T DO ANYTHING ABOUT IT BECAUSE IT WAS UNDER THE SCREEN SAVER, AND THE SCREEN SAVER WAS WAITING FOR IT. I mean, Whisky Tango Foxtrot, Apple...

  • External USB drive unusable while downloading from Internet

    I searched for something similar to this, but didn't see anything...
    I have a 802.11n AEBS (100MBit version) with firmware 7.2.1. I have an 500GB SEAGATE ST3500830A 3.AA USB 2.0 disk attached. I am on a MacBook Pro Core 2 with a 7200 RPM hard drive. I have my AEBS connected directly to my cable modem. I have one device - a Vonage VoIP adapter - connected via Ethernet.
    I get about 5MB/s transfer to and from the disk under normal use. I store my music on the shared drive and have no problems streaming music or even movies from the air disk until I decide to try to download something from the Internet. The disk slows to literally bytes per second if I try to download anything from the Internet.
    If I'm streaming a movie, downloading a big web page makes it halt and stutter. If I download a large file that takes more than a few seconds, everything on that disk comes to a screeching halt. I can't even stream (or copy, or move, or access in any way) anything on that disk until the Internet traffic is stopped.
    Basically, if I'm using bittorrent, or if I'm downloading an installer, or whatever would cause me to access the Internet in some way for sustained transfer (like doing feed refresh in NetNewsWire,) it totally kills my ability to use the disk at all. As soon as the Internet traffic dies, it all starts right back up like nothing ever went wrong.
    That means, it is totally impossible to say download anything from the Internet directly to the air disk. What kinda bull is that?
    This is the default behavior regardless if I'm the only computer on the wireless or if there are others. It happens when connected via Ethernet. It happens in 5GHz mode. It happens in 2.4GHz mode. I have reformatted the disk twice. I have tried just about everything imaginable outside of chucking the thing in the river and buying a new one.
    Anybody else have this problem? Found anything to fix it? Any ideas what I can do?
    I commented in another thread about having a problem with the AEBS crashing regularly (requiring an unplug and restart) using bittorrent. I wonder if the two problems aren't related in some way. Perhaps the CPU is underpowered for all the NAT translations, encryptions/decryptions, and IO in different directions going on?

    It may not be a problem with your AEBS but it could be an issue with your cable modem or your VoIP adaptor. Here are a few suggestions:
    1) Disconnect your VoIP adaptor.
    2) Connect your MacBook Pro directly to your cable modem with an Ethernet cable and try to download from the Internet.
    Karsten

  • Document not downloadable from internet to goodreader.

    Hi, I was using my Ipad 1 to save document downloaded from the internet into Goodreader
    by tapping on a tab on the top right of the page once the document was displayed...
    Now, I bought an Ipad3, the "Open in Goodreader" tab still shows, but when I tap on it,
    nothing happens... but the file can be downloadable to "Dropbox" by tapping on
    "Open in..." and selecting "dropbox" from the dropbox menu...
    Any idea why?

    Hi Glenn
    Thanx for ur reply. I have defined filter condition for that transaction type, so that it flows across. I have checked table entries also in ECC system and it has got updated.
    There are 2 document types, for one it is running as desired, whereas for the other one I am facing this specific problem.
    Cheers
    Hits

  • How do I uninstall games downloaded from internet?

    So I have recently downloaded and installed an online game from internet.
    Turns out it doesn't want to work. So i am trying to uninstall/delete this game, but i don't know how.
    I have tried trash can, but it doesn't work. Any ideas?

    http://guides.macrumors.com/Uninstalling_Applications_in_Mac_OS_X, http://www.cultofmac.com/90060/how-to-completely-uninstall-software-under-mac-os -x-macrx/

Maybe you are looking for

  • Check if in Word document (Word 2013) advanced option "Use fonts that are stored on the printer" is set

    Is it possible in a VBA macro to check whether an opened word document has the advanced option "Use fonts that are stored on the Printer" is set. I have a word macro that opens and processes thousands of word documents.  The processing needs to be di

  • Why is Apple doing the bait-n-switch?  Have they become complacent?

    I just bought Logic Express after being sold on the beautiful sound of the Bosendorfer piano sample that was advertised as a feature of the software. And, to my surprise, its not there. What the F...?!? Don't get me wrong - the software is still grea

  • Adobe CS5 Trial Setup failure on Mac. Help!

    Ok so I've been trying to download the trial for Adobe CS5 Photoshop and have run into some problems on my Mac. Here's where I am in the download process. I went to the site and clicked the download now button for the trial. I open the adobedownloada

  • Lightroom 2.7 plug-in for Canon G15 raw conversion?

    Does anyone know if this exists, or do I need to purchase the lastest version of Ligthroom?  Currently, I can't load any raw files shot on my Canon G15 into my Lightroom 2 catalogs. Thanks for any help- Kim

  • Cs5 won't load since yosemite update

    Since I updated with Yosemite I can't open my Photoshop cs5. I get the error message ... To open "Adobe Photoshop CS5" you need to install the legacy Java SE 6 runtime. I have updated my Java, verified it and it all seems up to date. I have also unin