LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
I am experimenting with different audio codecs and I'm stuck on this one and can't figure it out.....
I'm trying to load an mp3 into QTExternal and save it out as another file type available in QTExternal. The below code works but pops up a screen that asks you to select a source file to load before the conversion screen comes up. I'm trying to preload an mp3 into "gIndAudio" so you don't get that first screen.
As soon as I take out "answer file "Select audio file" Nothing works. I've tried "put "C:\Test\test.mp3" into gIndAudio but tha won't work. I tried it with filepath...etc but nothing.
How to I hardcode the filepath of the mp3 directly into gIndAudio without the "answer file"?
global gIndAudio
on MouseUp
set the filename of player "Player" to empty
answer file "Select audio file"
put it into gIndAudio
set the filename of player "Player" to gIndAudio
put movieControllerID of player "Player" into mc
qtInitializeEditing mc
qtSelectAll mc
qtCopy mc
qtInitializeEditing mc
qtExport mc
end MouseUp
end MouseUp
on mouseUp
answer file "please choose..."
put it
end mouseUp
and copy the content of the message box and hard code that into your script. That is not elegant but unfortunately I dont know how to do the correct windows pathnames.
You could have the global filled in an extra button. That would be more flexible, unless you alway want that one file to be loaded into the player.
regards
Bernd
global gIndAudio
on MouseUp
set the filename of player "Player" to empty
put "C:/Test.mp3" into gIndAudio
set the filename of player "Player" to gIndAudio
put movieControllerID of player "Player" into mc
qtInitializeEditing mc
qtSelectAll mc
qtCopy mc
qtInitializeEditing mc
qtExport mc
end MouseUp
end MouseUp