topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • February 19, 2019, 04:22 AM
  • Proudly celebrating 13 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - mediaguycouk [ switch to compact view ]

Pages: [1] 2 3 4 5 6 ... 10next
1
Official Announcements / Re: DonationCoder 2018 Fundraiser
« on: May 14, 2018, 11:10 AM »
Tomorrow we will talk a little about how the money raised will be used.
Where's that post?

2
Official Announcements / Re: DonationCoder 2018 Fundraiser
« on: April 24, 2018, 08:32 AM »
I shall presume it doesn't contribute to your thermometer goal, but thank you for setting up the Patreon.

3
Really... 2011? I need to sort out my bookmarks, they read

Reddit
Giant Bomb
Twitter
Donation coder recent posts

Anyway, I blame Reddit for the lack of posts here! Also I actually managed to work out how autohotkey and visual studio works so I didn't have to pester other people to make my applications.

I worked at the University of Southampton when I joined and I'm still there. I look after online exams and lecture capture. My ExamStart system (remembering that I really couldn't program anything when I joined this site) is one of the only specialist University exam portals in existence (because no-one else would have use for it: https://www.youtube..../watch?v=Os46Zcuk_GU)

4
Sorry if I get a little Captain Obvious here, but are you sure the request packet is being replicated exactly?
It's the same as the WireShark capture, but past that I can't be 100%.

I've certainly given up on this, so don't spend any more time on it. Once the announce works I've got to query the box for the channels all while programming on a subnet that doesn't actually have the boxes on it.

This project is where an attitude of 'fail quickly and adapt' is working well. The C# application to use the Wireshark data works well enough for how little it would be used.

Thanks all

Graham

5
Thanks Jazper,
You code confirms what I've previously found. It seems quite easy and reliable to get the router you are connected to to respond to these types of broadcasts but the more unreliable and inconsistent IPTV systems seem to lock up the .Receive commands.

In the end I've been using Wireshark and monitoring the responses of a propriety IPTV multicast program. I then export the filtered Wireshark output into a C# application to get all the channels.

Code: C# [Select]
  1. // Please excuse the fact that I found out it was called 'Wireshark' about half way through and then
  2. // couldn't be bothered fixing the function names
  3. private void btnOpenWireShackFile_Click(object sender, EventArgs e)
  4.         {
  5.             MessageBox.Show("Remember to select the Wireshark \"K12 Text File\" that you have saved with " +
  6.                 "the filter 'sap.flags' (no apostrophes) and save \"Packet Range: Displayed\" and \"All packets\"",
  7.                 "Instructions", MessageBoxButtons.OK, MessageBoxIcon.Information);
  8.  
  9.             btnSave.Enabled = false;
  10.  
  11.             openWireshackTxtFile.Title = "Choose wireshark txt file";
  12.             openWireshackTxtFile.Filter = "TXT Files|*.txt";
  13.  
  14.             if (openWireshackTxtFile.ShowDialog(this) == DialogResult.OK)
  15.             {
  16.                 strWireSharkFileLocation = openWireshackTxtFile.FileName;
  17.  
  18.                 replaceBigTextBox("");
  19.                 replaceM3UTextBox("");
  20.  
  21.                 Thread threadReadHex = new Thread(readHexAndOutputASCII);
  22.                 threadReadHex.IsBackground = true;
  23.                 threadReadHex.Start();
  24.             }
  25.         }
  26.  
  27.         private void readHexAndOutputASCII()
  28.         {
  29.             if (strWireSharkFileLocation == "VOID")
  30.             {
  31.                 return;
  32.             }
  33.            
  34.             try
  35.             {
  36.                 strWireSharkFile = File.ReadAllLines(strWireSharkFileLocation);
  37.             }
  38.             catch
  39.             {
  40.                 MessageBox.Show("Failed to open Wireshack file", "Fatal error",
  41.                     MessageBoxButtons.OK, MessageBoxIcon.Error);
  42.                 return;
  43.             }
  44.  
  45.             replaceM3UTextBox("#EXTM3U\r\n");
  46.  
  47.             int i = 1;
  48.             int j = 0;
  49.  
  50.             foreach (string line in strWireSharkFile)
  51.             {
  52.                 if (line.Length > 2 && line.Substring(0, 2) == "|0")
  53.                 {
  54.                     string[] characters = line.Split('|');
  55.                     string completeLine = "";
  56.  
  57.                     foreach (string hex in characters)
  58.                     {
  59.                        
  60.                         if (hex.Length == 2)
  61.                         {
  62.                             try
  63.                             {
  64.                                 int n = Convert.ToInt32(hex, 16);
  65.                                 if (n >= 32 && n < 255)
  66.                                 {
  67.                                     char c = (char)n;
  68.                                     completeLine += c.ToString();
  69.                                 }
  70.                                 else if (n == 10)
  71.                                 {
  72.                                     completeLine += "|";
  73.                                 }
  74.                             }
  75.                             catch
  76.                             {
  77.                                 // Do we need to do anything here?
  78.                             }
  79.                         }
  80.                     }
  81.  
  82.                     addToBigTextBox(completeLine.Replace("|", "\r\n") + "\r\r\n");
  83.  
  84.                     string[] partLine = completeLine.Split('|');
  85.  
  86.                     foreach (string data in partLine)
  87.                     {
  88.  
  89.                         if (data.Length > 3 && data.Substring(0, 2) == "s=")
  90.                         {
  91.                             string channelName = data.Substring(2, data.Length - 2);
  92.                             addToM3UTextBox("#EXTINF:" + i + "," + channelName + "\r\n");
  93.                         }
  94.  
  95.                         if (data.Length > 3 && data.Substring(0, 2) == "c=")
  96.                         {
  97.                             string nospacedata = data.Replace(" ", "");
  98.                             string[] splitip = nospacedata.Split('/');
  99.                             string ip = splitip[0].Substring(7, splitip[0].Length - 7);
  100.                             addToM3UTextBox("udp://" + ip + ":5000" + "\r\n");
  101.                         }
  102.  
  103.                        
  104.                     }
  105.                     decimal deProgressBar = (((decimal)j + 1) / (decimal)strWireSharkFile.Length) * 100;
  106.                     intProgressBar = (int)Math.Ceiling(deProgressBar);
  107.                     changeProgressBar();
  108.                     i++;
  109.                 }
  110.                 j++;
  111.             }
  112.             intProgressBar = 100;
  113.             changeProgressBar();
  114.         }

6
Thanks Joker

7
LAN.

I'm working my way through the example code I linked above and was wondering if anyone else had seen any code like it. I suppose it really was a shot in the dark.

This is the kind of code I'm after

Code: C# [Select]
  1. public static bool Discover()
  2.         {
  3.             Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
  4.             s.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, 1);
  5.             string req = "M-SEARCH * HTTP/1.1\r\n" +
  6.             "HOST: 239.255.255.250:1900\r\n" +
  7.             "ST:urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\n" +
  8.             "MAN:\"ssdp:discover\"\r\n" +
  9.             "MX:3\r\n\r\n";
  10.             byte[] data = Encoding.ASCII.GetBytes(req);
  11.             IPEndPoint ipe = new IPEndPoint(IPAddress.Broadcast, 1900);
  12.             byte[] buffer = new byte[0x1000];
  13.  
  14.             DateTime start = DateTime.Now;
  15.  
  16.             Console.WriteLine("Starting do while < timeout");
  17.             do
  18.             {
  19.                 s.SendTo(data, ipe);
  20.                 s.SendTo(data, ipe);
  21.                 s.SendTo(data, ipe);
  22.  
  23.                 int length = 0;
  24.                 do
  25.                 {
  26.                     length = s.Receive(buffer);
  27.                     string resp = Encoding.ASCII.GetString(buffer, 0, length).ToLower();
  28.                     Console.WriteLine(resp);
  29.                 } while (length > 0);
  30.             } while (start.Subtract(DateTime.Now) < _timeout);
  31.             return false;
  32.         }
  33. }

8
Hi all,
I've got a multicast IPTV system where I work and a piece of software, which no longer works in Windows 7, discovers what channels are available using SSDP. I was hoping to write a short console application that would annouce itself and then wait for replies.

My programming skills lend themselves to manipulating online examples to do what I want, but I'm having trouble finding any example code for this type of thing, this being the only example I can find - http://www.codeproje...l.aspx?display=Print . I was wondering if anyone knew of anything else out there?

9
Found Deals and Discounts / Re: Windows 7 Pro Academic Discount
« on: April 27, 2011, 08:22 AM »
The British price is strange. The American version stays quite constant during the year, but the british goes down to £29.99 between about September and November and then returns to £79.99 for the rest of the year.

10
Developer's Corner / onsubmit doesn't work in IE
« on: March 14, 2011, 05:09 PM »
Hi all,
I'm getting confused by a problem. Everything works fine in Firefox, but in IE I can't get a form to submit correctly with the enter key.

I have this function

Code: Javascript [Select]
  1. function enter()
  2. {
  3.         if (step == 7)
  4.         {
  5.                 return true;
  6.         }
  7.         else
  8.         {
  9.                 next();
  10.                 return false;
  11.         }
  12. }

and this line of code

Code: HTML [Select]
  1. <form id="form" name="form" method="post" action="upload.php" onsubmit="return enter();">

But enter() never seems to load until you get to a real submit button. I've put the entire code here - http://www.unics.co.uk/onsubmit/

Does anyone know what might be the issue?

11
I've not really been around this site in the last 12 months. Here's to improving that  :Thmbsup:

12
http://www.autohotke...orum/topic28838.html
That looks amazing. I'll try and check it out over the next few days.

Thanks skwire

13
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

14
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'?

15
Thanks, that's the perfect command.

Do you see why this doesn't work?
#2::
Run, C:\Windows\System32\notepad.exe, , , notepad1pid
Run, C:\Windows\System32\notepad.exe, , , notepad2pid
Sleep, 500
ControlSend, notepad1pid, Hello Notepad 1
ControlSend, notepad2pid, Hello Notepad 2
return

16
Hi all,
I've just written a very simple AHK script to load up VNC and then log into a PC, open IE, go to a website and login. The trouble is that if I click off the window it all breaks.

Is there a way of sending keys to a particular process (and if so how to find the process)? The process is started by AHK in the script.

Thanks

Graham

17
Living Room / Re: KVM switch woes -- any recommendations?
« on: May 09, 2010, 05:15 AM »
If your monitor has two inputs on it then multiplicity is very good.

18
General Software Discussion / Re: Default audio settings
« on: March 26, 2010, 01:17 PM »
I just wanted to thank you for the link. It's a shame that the program doesn't seem to work with Win 7.

19
General Software Discussion / Default audio settings
« on: March 25, 2010, 02:18 PM »
Does anyone know of a program that will remember a audio setting (default playback / recording device, levels, mute settings, etc) and will automatically set them each time it loads?

I'm also looking for a levels meter that can sit in the system tray or desktop. Can anyone help me out?

20
Well I'm 3 hours into Metal Gear Solid 4 now. Thanks for the link

21
Screenshot Captor / Re: No disc in Drive D
« on: March 01, 2010, 08:02 AM »
I don't think so. I'm running Windows 7 Enterprise 64 bit on a domain, Sophos as the anti virus, no anti-malware, windows firewall. I'm an admin and setup prompted me to run as an administrator.

22
Screenshot Captor / Re: No disc in Drive D
« on: March 01, 2010, 05:54 AM »
I don't have a donationcoder folder in my My Documents folder (\\soton.ac.uk\ude\PersonalFiles\Users\gra\mydocuments) nor anywhere else I can think of (C:\Users\gra\Documents)

23
Screenshot Captor / Re: No disc in Drive D
« on: March 01, 2010, 05:43 AM »
Where is it?

24
Screenshot Captor / No disc in Drive D
« on: March 01, 2010, 05:36 AM »
Hi Mouser,
I upgraded my work computer to Windows 7 last week and I've just installed SC. The trouble is after I install (to C:\Program Files (x86)\ScreenshotCaptor) I get 4-5 error messages appear saying

"There is no disk in the drive. Please insert a disk into drive D:"

D is my CD drive. I've uninstalled and re-installed. My shortcut points to "C:\Program Files (x86)\ScreenshotCaptor\ScreenshotCaptor.exe", the program occasionally says 'no timers availble' and I cannot use it.

Can you think what the problem is?

25
http://news.bbc.co.u...0056500/10056547.stm

I have to admit that it takes a lot of time to educate the whole world! ;D

Even that article isn't too reassuring. Budget 10% of your system money for a cable? So if I buy a $4,000 HDTV I'm supposed to budget $400 for the HDMI cable?

I'd rather stick to MonoPrice. A $5 HDMI cable suits me just fine. Unless I can get it for less. (c;

Richer sounds always used to quote 10% for cabling but that was because of all the composite and speaker cables that have to go between everything. 10% between two devices seems a bit excessive.

Pages: [1] 2 3 4 5 6 ... 10next