Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Reading a .edl file for commercial detection in Visual Basic 2008

Posted on 2009-05-08
2
Medium Priority
?
305 Views
Last Modified: 2013-11-27
I am using the ShowAnalyzer from Dragon Global to detect commercials on live TV (the broadcast is delayed).  Their program outputs to a .edl file which lists the blocks of commercials (in seconds).  The .edl file is constantly being updated and I was wondering what would be the best way to have my VB.Net program read and act upon a new commercial.  Thanks for the help, Ron
Contents of .edl file
 
387.84	538.92	0
1257.32	1438.96	0
1930.84	2061.56	0
2239.68	2510.92	0
2747.76	2981.56	0
3771.4	3902.16	0
4121.28	4372.36	0
4546.92	4793.84	0
5082.72	5347.28	0
5527.28	5527.28	0

Open in new window

0
Comment
Question by:rmocogni
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 15

Accepted Solution

by:
ChloesDad earned 2000 total points
ID: 24345204
You can use the filewatcher object to detect when the file is changed



sub setupwatch
 
        ' Create a new FileSystemWatcher and set its properties.
        Dim watcher As New FileSystemWatcher()
        watcher.Path = yourpath
        ' Watch for changes in LastAccess and LastWrite times, and
        ' the renaming of files or directories. 
        watcher.NotifyFilter = (NotifyFilters.LastWrite)
        ' Only watch text files.
        watcher.Filter = yourfilename
        ' Add event handlers.
        AddHandler watcher.Changed, AddressOf OnChanged
 
        ' Begin watching.
        watcher.EnableRaisingEvents = True
 
    End Sub
 
    ' Define the event handlers.
    Private Shared Sub OnChanged(source As Object, e As FileSystemEventArgs)
        ' Specify what is done when a file is changed
    End Sub    

Open in new window

0
 

Author Closing Comment

by:rmocogni
ID: 31579680
Thank you, that was exactly what I needed.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question