Using Automator to app to create. ISO

Hello

I have an Applescript that is very useful for the use of ffmpeg to convert video files.  Of course, in this script is a Terminal script to actually run ffmpeg.

It looks like this:

the term {parameters}

Tell application "Terminal".

activate

filesString the value «»

Repeat with file_ in entry

the value filesString filesString & "" & quoted (file_ POSIX path)

end repeat

do script "for f in" & filesString & ";" do. "

/ Users/Mike/Documents/Scripts/ffmpeg - i \"$f\" - acodec pcm_s16le - vcodec v210-level 1 - Encoder 1 - context 1 - qscale 1 g - 0 ${f%.*}.mov.

tell the end

Back entrance

end of race

It works really well for just a file on the app and do run.  But now I want to create ISO from DVD images that I created in the past.  The above script searches the path of entry and in the output path of the new file with the same name.  I want to do a couple different things.

First of all, I cannot of course back the new file on the DVD but I don't know how to change the script correctly, but I've highlighted where I think we should probably change. In addition, I want a prompt the user to choose a destination.  I was really close with:

"myPath choose the folder with the value prompt" choose a folder:

It would be nice to both the value of the path and the name of the file at that time.

I also like that I can see the status of the creation of the ISO in the Terminal.

I take a very basic course to learn Applescript, but I'm still not there. Help please?

I have a few comments...

There is nothing inherently wrong with your script - it is essentially collecting all the data, and then firing a shell single command to do the job. The problem is that to extend the functionality to create a .iso, you must do this within the shell command.

An alternative (more easy - at least for an experienced AppleScripter) way would be to reduce to a minimum the shell command to the bare (i.e. treat as an individual file) and use AppleScript to manage the closure and variable. For example, rather than build a chain of files and passing to a shell command that iterates over it, I'd do something more like:

say application "Terminal."

activate

Repeat with file_ in entry

filesString game to quoted form of (path of file_ POSIX)

script "/ Users/Mike/Documents/Scripts/ffmpeg - i" & fileString & "- acodec pcm_s16le - vcodec v210-level 1 - Encoder 1 - context 1 - g 1 - qscale 0"& fileString & ".mov".

end Repeat

end say


You have now each specific file in an AppleScript variable (file_), which is passed to a shell command that executes your order. Several input files only invoke the command shell several times. This makes it much easier to add treatment by folder

Regarding the other issue - selecting the location/name of output file, simply replace your folder "Choose" with "Choose file name." This will allow the user to specify a file name and a directory using the standard user interface, from which you can extract the data you want:

Repeat with file_ in entry

-This establishes name of input file:

say application "System events".

put nomfichierentree to the name (obtain the properties of file_)

end say

-prompt the user for where this file should be saved

outputFile to choose the file name prompt "specify output file name for" & nomfichierentree

inputFilePath game to quoted form of (path of file_ POSIX)

outputFilePath game to quoted form of (POSIX path of outputFile)

say application "Terminal."

activate

script "/ Users/Mike/Documents/Scripts/ffmpeg - i" & inputFilePath & "- acodec pcm_s16le - vcodec v210-level 1 - Encoder 1 - context 1 - g 1 - qscale 0"& outputFilePath.

end say

end Repeat


Also note that I've separated the code in more sense (to me, at least) pieces... I have separate application logic regarding input and output files and target just Terminal.app with the specific commands that relate to it.


From there, you can easily integrate additional orders to "do script" to do what you want, using the same variables to map the input and output file names.

Tags: Mac OS & System Software

Similar Questions

  • How safe is using secret ios app from appstore to store important documents? Can the creater of ios app app have access to my stuff using their secret app? Thank you

    How safe is using secret ios app from appstore to store important documents? Can the creater of ios app app have access to my stuff using their secret app? Thank you

    Of "secret iOS app" are what kind you referring? You will need to provide more information for someone to respond to you.

  • How to create a shared library of Qt and use it on App without a head?

    Hi all

    I'm experimenting with some waterfalls headless basic application development, and I just hit another problem of blocking.

    I want to create a Qt library with some shared code between the head and user interface elements.

    That's what I did:

    1. created a new application without head the wizard project
    2. created a new library shared by using the wizard project. Adds a simple C++ (Qt not) class
    3. Set up the two parts of the Headless App to use the shared library ("Library in the workspace project" option from the "Add library...) (' Assistant).   Everything compiles and works very well so far.
    4. Now, I want to use the shared library Qt. I choose 'Library of the Standard BlackBerry platform' and ' platform > Qt Core "from the «add library...» "Wizard. Now, I had this error on the shared library project: C:\dev\bbndk\host_10_2_0_15\win32\x86\usr\bin\ntoarm-ld: could not find lQtCore.

    How to create a shared library of Qt and use it on App without a head?

    In fact, I would also use other NDK libraries on library shared as lbbdata and libbbdevice.

    I expect that workers would deal with all the problems for me. As an improvement, I suggest you add the selection screen platform library of the Wizard "Add library...". «the wizard «Shared Library Project»

    There is a model of library project

    https://github.com/BlackBerry/Cascades-community-samples/tree/master/Cascades-library-template

    Unfortunately, the library create Assistant isn't really useful #t

    There is also a great series on using headless headless library and user interface:

    http://devBlog.BlackBerry.com/2014/02/a-flexible-architecture-for-enterprise-mobile-applications-par...

  • This identifier apple has not yet been used with the App store.

    I bought my macbook pro to my brother and always used without my Apple ID and then I decided to restore the macbook to the factory because of some problems with the performance setting, when I hit install OS X Yosemite on the disk, it asks you to login Apple ID and when I try to login with my account , he says "this identifier Apple has not yet been used with the App store" Please check your account information, when I hit "see" nothing happens and it of kind of stuck and makes me restart the process and enter my apple ID and password. "

    I don't know what the problem is and now I can't open my macbook to use

    Because the computer has been configured using Apple ID of your brother, it is bound to this ID. If you have never downloaded Yosemite, you can not install it. Ask your brother to insert his Apple ID, so you can get the computer operational again. Then, go to the App Store, sign in with your ID and check the purchases tab to see if the Yosemite is an option. If this is not the case, download El Capitan and see if it will install. If you want to do a clean install, quit the installer and the program below allows you to create a bootable USB key. Boot from it, wipe the hard drive and then install El Capitan. When you restart normally it will be your computer. See also the link for sale.

    Bootable USB Flash Drive-Diskmaker X

    Sale of old Mac (4)          Apple support

  • On facebook I can't watch my friends with the name of Tracey I can using my phone app I can with Chrome etc but not on my PC Tower firfox

    On facebook I can't watch my friends with Tracey name I can use my phone app I can with Chrome etc but not using Firefox on my PC Tower

    Hello

    To better help you with your question, please provide us with a screenshot. If you need help to create a screenshot, please see How to make a screenshot of my problem?

    Once you have done so, attach the file to screen shot saved to your post on the forum by clicking on the button Browse... under the box to post your reply . This will help us to visualize the problem.

    Thank you!

  • "this identifier apple is still used with the app store - 3times deducted from my credit card.

    I am trying to connect to the iStore, but I receive the following message: "" this identifier apple is still used with the app store.

    I following the registration process, but nothing happened just 3times deducted from my credit card...

    I filled the fields are all required and still does not work, just my credit card losing ~ $7 Dollar (2.2 dollar every time with the following msg: ITUNES ITUNES.COM/BILL.) COM READ) I don't want to spend more money for a simple registration... Thanks for help.

    They are fresh from holding temporary store, your card issuer should remove in a few days or more: on the payment card's authorization in the iTunes Store - Apple Support

    A card having a chance to be accepted it must be registered with the same name and address (including the format and spacing etc) that you have on your iTunes account and have been issued by a bank in the country where you are (and, therefore, the country that sits on your iTunes account). If it is you can check with the card issuer to see if it is them who are in decline. Or do you have another card you could try?

    Or to create a new account without giving details of the payment: create an iTunes Store account, App Store and iBooks Store without credit card or other method of payment - Apple Support

  • How to add comments to several files in the finder using automator?

    I need to add comments to multiple files in the finder. Can I do this using Automator application, without going file-by-file and press command + i to add a comment one by one?

    Hello

    Open the Automator application:

    Select the Service icon

    Create the workflow, as this image

    Save the workflow.

    -----------

    After that, to add comments:

    Selectionner select files in the Finder, right-click on the selected files and select your service in the menu 'Services' in the context menu.

  • How to pass a product code using liquid/Web App

    I want to do is have a user to enter a code - say "12345" in a text box and click a "submit" button.  It then takes them to another page showing results or error message.

    I have created a web application with the following fields:

    ProductCode

    Name

    Details1

    Detials2

    When the user sends a code ("12345"), the next page displays the data for the product matches "12345" - If no product not match code, then a message saying ' data cannot be found.

    Can someone give me guidance as the best way to do it with the liquid, how I pass / send the code of the search page to the results page?  So is this a case of web filtering app 'collection' by the product code?

    Thank you very much.

    You use cash to do so. You just need to use a web app search. Get the form code, remove the other fields so just have the input of this custom code field field and have the module of search results web app on another page etc.

  • Is no longer able to navigate using the Remote app

    I'm suddenly is no longer able to navigate (left, right, up, down) on the Apple TV using the remote app. I also tried with the new application. I'm t able to select the current item and return to the previous menu using button "Menu".

    given that it could also have been a problem with the display of my mother's phone, I scroll on different applications etc and it works fine. So it seems that it is an application (or Apple TV) problem.

    any ideas? I use an Apple TV, I bought 3 years ago.

    Thank you!

    Make sure that the software on your TV is up-to-date. Perform a restart of settings or by unplugging the power cord for 30 seconds. Alternatively, you can perform a reset of settings.

  • Just updated to IOS 10.0.2 and unable to connect using Store.Please App!

    Just updated to IOS 10.0.2 and unable to connect using Store.Please App!

    Harry

    Hello

    Go down to itunes apple ID page homepage remove ID, then reconnect again.

    See you soon

    Brian

  • Can I use the iTunes on PCs using Windows 10 app or not? !

    Can I use the iTunes on PCs using Windows 10 app or not? !

    You can run the application iTunes, but not those obtained from the iTunes App Store.

    (144221)

  • Is it possible to use the Remote app with the Apple TV connected via ethernet and iPhone via WiFi?

    Is it possible to use the Remote app with the Apple TV connected via ethernet and iPhone via WiFi? When I try this Apple TV does not appear in the list of devices on my iPhone.

    Yes, I'm doing exactly this with the same put in place.

    If the problem persists the next relative to the following articles might help you.

    Troubleshooting home sharing

  • Can I use automator to change the modified time of a file as its content?

    I use automator to rename a series of images.

    The problem is whenever I change a change of time of amending records file.

    Can I use automator to change the modified time of a file as its content?

    I know that I can use the Terminal to change a date but I have no idea how to do to automate this process

    As you say you know the command to use in the Terminal, and then with Automator, use the Action run the Shell Script after the name change.  The new file name will be passed to the Action run a Shell Script, and from there, you can use touch - r to set the time of the file at the time the name of the new file

  • How many cell data uses the health app?

    We have little data plans, and my wife intends to use the health app every day.  Should I use to run the cell data health application?  Another reference... If I used the maps on the watch application would use this as much data as it normally does on my iPhone?  Just try to get an idea of the amount of data from the watch uses.  Thank you.

    I have not observed the health app using cellular data at all.

    Regarding the cards on the watch, it's just an extension of maps on your phone. Cards cannot run independently on the watch. If you use maps on the watch, he uses exactly this use from your phone from your phone is running the show.

  • My child has its own Apple ID, throughout I would buy apps for her and she would transfer to his iPad. But since a new update she has no access to its power supplies that are on my shopping list. She is using "Video star" app?

    My child has its own Apple ID, throughout I would buy apps for her and she would transfer to his iPad. But since a new update she has no access to its power supplies that are on my shopping list. She is using "Video star" app?

    Hi Breda49

    iTunes purchases (free downloads are taken for granted) are permanently linked to the Apple that was used to buy ID.

    To work around this problem, you can set up sharing of family and your child. This will allow you to share all your purchases.

Maybe you are looking for

  • PC HP Pavilion dv6000 p/n 301UA #ABA

    Hello I want to add more ram if possible.  Where can I find instructions on this operation?  In my opinion, it currently has 1 GB.  And can do a relative beginner?  I have updated the material on a desktop computer, but never a laptop.   Should I upd

  • Nighthawk D7800 and BT Infinity 2

    My first time here so apologies for any errors of Protocol. I bought the Nighthawk to replace my BT Homehub 3 and a modem to connect to broadband Infinity 2 (fiber). I managed to connect to the internet via the BT modem so I know the system works. Wh

  • Computer has been great, but now running slow, hot and almost 50% registry errors. What is going on?

    Computer will have 2 years in April.  Had no problems until last week when it crashed.   Could not get going by the restoration of the State of origin.  Now runs very slowly and has very high CPU usage.  Internet often stops.   Fan runs all the time,

  • HP Laser Jet P 2035

    I bought a HP Laser jet P2035, but there is no network port with only parallel and usb port, I don't want to share this printer through my computer, I want to connect to this printer to a network. is it possible to add a network port in this HP laser

  • What can we do to ensure that my system restore feature will work?

    I tried to restore the system. It did not work and all that was said was: unspecified error occurred and the restoration was not completed. Any help would be of value. Gerald Patten