Re: downloading a file with Euphoria
- Posted by Ad Rienks <kwibus at ZONNET.NL> Nov 14, 1999
- 534 views
Hi Jeremy, This is a possible solution: (The code is not mine) -- start -- include dll.e include machine.e atom shell32, parent_handle shell32 = open_dll("shell32.dll") parent_handle = 0 constant SW_SHOWDEFAULT = 10, xShellExecute = define_c_func(shell32, "ShellExecuteA", repeat(C_LONG, 6), C_LONG) procedure shellExecute(sequence cmd, sequence file, atom style) -- call ShellExecute to display a file atom result, file_string, cmd_string -- convert to strings file_string = allocate_string(file) cmd_string = allocate_string(cmd) -- call ShellExecute result = c_func(xShellExecute, {parent_handle, cmd_string, file_string, 0, 0, style}) -- free the strings free(cmd_string) free(file_string) end procedure -- open the URL shellExecute("open", "http://www.RapidEuphoria.com", SW_SHOWDEFAULT) -- end -- ----- Oorspronkelijk bericht ----- Van: Jeremy Foster <jeremy at CANADIANLEAF.COM> Aan: <EUPHORIA at LISTSERV.MUOHIO.EDU> Verzonden: zaterdag 13 november 1999 22:22 Onderwerp: downloading a file with Euphoria > Hello All, > > This is sort of off my usual topic but still be new to the language I am > exploring the language. > > Would it be possible to write a Euphoria Windows program that upon start-up > or click of a button..it downloads a file from a website..say for instance > just a text file and then have the program read the file and use it for > displaying info...like say a chart or graph. > > Just wondering if it is possible and if anyone knows of examples I should > look at that would help/ > > -Jeremy