ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

Is it easy to send a request to http://IP?password and make something happen?

(1/2) > >>

mediaguycouk:
Hi clever people.

I work in a University. In our lecture theatres we have a touch screen that makes all the equipment work, a computer and a projector (as well as other bits we can ignore).

We've been asked to make a button on the touchscreen that makes a picture appear on the projector. There are some expensive ways around this but the cheapest would be the following

Press button on touch panel > Touch panel sends a GET to the computer > The computer is listening for this GET and when it recieves it, it shows a picture.

Is this easy to do? Or does it involve running web servers on computers. I.e. can I write a simple c# program that says 'wait for this command on port 1337'?

MilesAhead:
If you're doing Windows it may be easiest to run a small pre-packaged web server(you can get free ones out there) and just use the InetGet() function.  It requires a Windows OS that has IE 3 or later... should not be a problem. :)

This is the InetGet call in AutoIt3

http://www.autoitscript.com/autoit3/docs/functions/InetGet.htm


but c# should have an equivalent.  You have to check the download.. maybe by file size. If the server got an error, like file not found, it may return a small xml file with some gibberish about "/somefile.jpg" not found instead of the .jpg.

Once you have the image locally you can take it from there.

mediaguycouk:
Apologies for the late reply.

I don't actually need to download anything, just to get the computer to display the image. So the computer should be listening for a command, and when it gets it it will display an image on the screen of the computer.

It's one of those things that seems hard to say and harder to actually get working. I was just wondering if one of the geniuses here had seen something around.

Thanks
Graham

MilesAhead:
I don't know if there's a utility already written. You might check sites like SoftPedia.  If you have to roll your own I would look at Socket class and ShellExecute.  The machine with the images would listen and depending on some code or number, know which image to open.  ShellExecute could launch the display program with the image filename as param.

There may be some free presentation type utility out there.  SoftPedia has quite a few varied apps.

skwire:
http://www.autohotkey.com/forum/topic28838.html

Works well; I use it.

Navigation

[0] Message Index

[#] Next page

Go to full version