EnhancedQT qtSetSelection not working

Interested adding compiled externals from LiveCode and third parties to your LiveCode projects? This is the place to talk about them.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
cborn
Posts: 66
Joined: Fri Dec 15, 2006 11:35 pm

EnhancedQT qtSetSelection not working

Post by cborn » Thu Aug 26, 2010 7:12 pm

I'm not sure if this is the right venue for this questions, but I'll give it a go.

I'm using the EnhancedQT external (wonderful!!), but it appears that the function qtSetSelection does not work as one would expect. I'm wondering if this is a bug in the external, or inappropriate expectations on my part.

the syntax for the command is

Code: Select all

qtSetSelection the moviecontrollerid of player "player1", StartTime, EndTime
However, in practice, it appears that qtSetSelection only allows a selection that either starts at the beginning of the file, or one that ends at the end of the file. If I attempt to use it to select a middle portion of the file, it automatically selects everything from the StartTime to the end of the file.

Is there any way around this? It seems like it should be possible, since this is a standard feature of QT editing in general. I really need to have the ability to select central portions of files (I'm working with audio files) in my Rev application. Everything else I need, I've been able to do with this external, and so I really love it!

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4016
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: EnhancedQT qtSetSelection not working

Post by bn » Thu Aug 26, 2010 11:21 pm

Carly,
what do you want to do with the selection? Do you want to overwrite it or do you want to extract it? I dont quite understand. You can set the selection in Rev. Look at startTime and endTime in the docs. That way you can set a selection. I dont know if that helps.
If I understand what exactly you want to do I would try to look into that.

regards
Bernd

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4016
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: EnhancedQT qtSetSelection not working

Post by bn » Thu Aug 26, 2010 11:54 pm

Carly,
I did a quick test:

Code: Select all

on mouseUp
   put 500 into tStart
   put 2000 into tEnd
   put moviecontrollerid of player "player2" into mc --correct player name here
   qtInitializeEditing mc 
   qtSetSelection mc, tStart, tEnd
end mouseUp
this worked every time with an audiofile of duration 3800.
maybe it is a syntax problem.
regards
Bernd

cborn
Posts: 66
Joined: Fri Dec 15, 2006 11:35 pm

Re: EnhancedQT qtSetSelection not working

Post by cborn » Fri Aug 27, 2010 6:49 pm

Thanks, Bernd,

I didn't realize the startime and endtime properties of a player would essentially select a portion of the file, that is working out great. It seems to be a bit faster than using the feature in the External, too.

I'm using Rev to create audio and video recording plugins to assignment modules in our course management system. Right now, I'm working on a recorder for faculty to use to comment orally on student files, including the ability to insert comments into the student file at the moment they've made a mistake (this is for foreign language teachers). So what I'm doing is slicing up the student file based on time codes and copying out the segments to separate files in a temp folder. Then once all bits of feedback have been recorded, I compile them all in order by timecode into an output file. This output file will be returned to the student so that they can hear their mistakes and the feedback on them.

That's a very simple explanation, but I hope that gets it across. I've almost got a functional version and hope to show my faculty next week.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4016
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: EnhancedQT qtSetSelection not working

Post by bn » Fri Aug 27, 2010 9:24 pm

Hi Carly,
glad you figured it out. Once you get to know the player object plus the enhancedQT external you can do amazing things.

Sounds like an interesting project. I think Rev is very good at these specialized/vertical projects as in e.g. education/science etc. That is where I use it too.
good luck with your endeavor.
regards
Bernd

Post Reply

Return to “Using Externals”