dupa

Author Topic: Callbacks within scripts?  (Read 2492 times)

Cefwyn

  • Newbie
  • *
  • Posts: 45
    • View Profile
Callbacks within scripts?
« on: March 22, 2009, 11:34:29 am »
I just came across the plugin "vrMP3" while checking to see what sort of plugins were already available for Ultra Hal 6, and as it was something I was already planning on doing myself if it didn't exist I've decided to have a go at fixing up vrMP3. I'm not all that familiar with Visual Basic as I tended to use either perl or pascal most of the time when I needed a scripting language, and anymore I only ever get to use C or C++ in my work. The method that the vrMP3 plugin uses to scan the files seems a bit--bad since a large number of files causes the script to get that "This script is taking to long.." popup, which brings me to my main question. Are callbacks supported by Visual Basic? Can Ultra Hal use callbacks if they are supported by the language? The reason I ask this is a much more effective way to handle the scanning would be to have hal initiate the scanning and then carry on with it's normal operations (i.e. conversing or running other things) until the callback returns that the scanning is complete or has failed and then hal says something saying that it's ready to start playing music. For most this is probably not really a problem, but I've actually got over 100GB of music, and having a program freeze while a script runs is never a good way to program something if it can be avoided.

EDIT: just realized another reason that this would be important. To expand the script to do something like "Play the song FOO by BAR" to allow you to select a song by a specific band instead of covers or other songs by the same name would require reading the ID3 tag into the database instead of just the file name which means even longer time to read each file.
« Last Edit: March 22, 2009, 11:53:30 am by Cefwyn »
"I've just decided to lobotomist my hal..."

EULA: By reading this you agree not to take offense to anything contained in post above. If you do choose to take offense, you forfeit all rights to criticize same post unless said criticism contains important corrections and helpful information.