AppleScript to Burn a Single Data File to a CD - applescript

I need a/the AppleScript (not automator) command(s) that will burn a single PDF file (stored as a POSIX path) to a CD with a specified Disc Name (also stored in an AppleScript variable).
Today … I right click on a PDF file (mySpecial.pdf) in Finder and click Burn "mySpecial.pdf" to Disc… I then provide the name/title for the disc "Jimbo’s Special Disc" and click on Burn.
Thank you #matt. I did try drutil before posting my question. When I try this …
drutil burn ./test.PDF
I get the following:
Burning Image to Disc: ./test.pdf
Must specify a valid unmounted image path (dmg, iso, cue/bin, and toc).
Everything I’ve found so far seems to only refer to entire directories/folders or image file, not plain old data files.

Related

Adding customized colors to POTX file

I know there already is an answer to the question here:
How to add new(customized) Theme colors to Powerpoint using VBA
But it didn't work. And as I'm not allowed to comment there (not enough reputation) I'm sorry for opening up a new question. (Dear admins - this isn't really clever in my opinion. Now we have two threads on the same thing, just because I'm not allowed to comment.)
Back to topic:
http://echosvoice.com/wp-content/uploads/pptfiles/customcolors.pdf
I followed the instructions of Echo, recommended in the other thread, but it didn't work. I have ppt2010 and tried with a THMX, a POTX and a PPTX. It's always the same. I rename the file by adding a .zip - I extract the ZIP - I copy Echo's example code and paste it right before /a:theme in theme1.xml file - I save it - I zip the whole folder - I delete the ZIP Extension - and it's corrupt. When I doubleclick, PPT opens without a slide. When I got to "open" and choose the template, I get an error message. "Repair" doesn't help. - What am I doing wrong?
(Somewhere else I read, I have to add this to every theme-file, but it doesn't make a difference)
Be kind to yourself. Use 7-zip (free) to open the PPTX (it can open them directly w/o having to rename them, and won't corrupt the files).
Alternatively, rename the file to zip, doubleclick to open the zip in Windows Explorer, drag any file you need to edit to the desktop, edit it there, drag it back into the still-open zip, then close the zip.

Creating Dropbox like DMG package

Does anyone suggest a freeware tool/script/manual_way of creating Dropbox like DMG -
Need to ask couple of questions --
I want double clicking the Folder-Icon should copy the folder(which would contain installer and uninstaller .app files of my application) into the system's /Applications folder.
Solution -- This has been solved using Applescript and changing icon of that applescript file to the folder-icon(i.e double clicking that script will move our folder(which would be present in a hidden folder) to /Applications.Any suggestions for second and third part?
Is it possible to show hyperlink of actual dropbox.com to actually open it's website?
And how we can customize volume's/Drive icon?
You can find a way to do it by reading this: Packaging a Mac OS X Application Using a DMG » asmaloney.com
I believe you can also use the trick of naming a shellscript file something.command in order to make it double clickable, (but maybe it will open the terminal, -I haven't tried it).

Changing default program for a file type (workaround)

I would like to specify that images of a certain type (for example, .png) open by default in a program I've written when the file is contained in a certain directory. I've seen by searching (Change Default Program for a specific folder) that this is not possible on Windows 7 or 8.
I am saving these images in this directory myself, so I have some leeway with how I name the files. For example, I could change the filename a bit... perhaps to be example.myprog.png or something similar. Is there a way to set it up so files that match this filename pattern get opened, while other .pngs (in other directories) still open in the default viewer?
I don't really want to name these PNG images example.myprog (i.e., fully change the extension), because when the user is browsing the directory in Windows Explorer, I would like the thumbnail images to still show up. Also, users will be eventually transferring these images to their own machines, where they'll want to use standard image viewers to look at them.
If this is not possible, does anyone have another suggestion for how to tackle this problem?
As you are mentioning that files should be opened in a program that you have written, try to change the code of your program to read files from the specific folder. So, by opening your program from anywhere in your pc, you should be able to open files from specified folder.

"Virtual Files" in OSX Finder that only appear when my Application runs, possible?

is there a way to "hook" into the OSX Finder to perform the following:
When my Application starts, the User sees a Folder in his Finder which is created by my application. Inside this Folder the User sees Files from several Folders...a unified view to several Files in several Folders that the User specified in my Application.
So, in this "Unified Folder" are not the real Files, they are still in there original Folder but the User sees them in this one Folder as if there were all his real Files in this new Folder. So there is no copying or moving involved.
To be honest, I've no Idea if it's possible and what I should looking for inside the Cocoa SDK. Maybe there is an API for the Finder itself or some other way?!
Regards
twickl
First option is your application could create aliases to the original files. The Finder will show these with a small arrow "badge" over the icon, so it is clear they are not the original files but aliases of them.
If you don't like the badges on the icons creating hard links may give you what you want.
Mac OS X presents a view of the HFS+ (Mac) filesystem which matches the UFS (Unix) one and you have access to hard and symbolic links. The latter are treated by the Finder similar to aliases but the former are indistinguishable from the original files as they are the original files - under the Unix filesystem a file in a directory is just a reference (the inode number) to the real file, each entry in a directory is just a hard link to the actual file, and a file can have any number of hard links to it (a file is deleted when the link count drops to 0, think of the retain/release model if that helps).
At the Cocoa level NSFileManager has methods to create hard links, or you can use the Unix level link(2) function.

Redirect default program to another program when a file opens in Windows OS

This is only under windows env.
As I know windows os identifies associated application of a particular file by file extension.
Like wise each file (binary) starting with corresponding symbols ("starting symbols"). For an example .JPG starts with ÿØÿà. Let say I open this .JPG file in a Hex editor or a Text editor and then I change that starting symbols into another file type. for an example I can change ÿØÿà to .Eߣ (.mkv). So when I double click on the .JPG the Windows Photo Viewer says there are some errors or similar message. So I need to get some information about the application that tries to open that kind of a file. If I can, I need to open that file using the application that associated with "starting symbols".
Briefly when I open .JPG I need to open a default video player .mkv files. But It may not work for this example. Because I changed only the "starting symbols" of my .JPG.
Please give me any idea to do this.
Thanks!
When you encrypt the file, give it a new extension. e.g. Picture.jpg becomes Picture.encrypted-jpg. You then register as the handler for encrypted-jpg, decrypt the file, then launch the normal jpg handler.
When the shell is asked to perform a verb on a file, the shell does not use the contents of the file to determine which app to pass it to. The file extension is what determines how the file will be treated.
You wish to use the contents of the file to influence which app processes a shell verb. In order to do so you would need to create a launcher app that reads the file header and then decides which app to pass the file on to. You would assign your launcher app as the handler app for all file extensions that you were interested in.
Although you could do this, it would be much easier just to set the file extension appropriately.
The proper way to do this sort of thing is to replace the files with reparse points.
The downside is that this involves writing a file system filter driver, i.e., an operating system extension, which is a whole level of trouble above and beyond ordinary application programming. (Since Windows already does file encryption, I doubt it would be worth the effort.)

Resources