How to make something autorun off a flash drive? - usb

I was wondering if there was any way to autorun something from a flash drive since autorun was removed, without any use of a separate program. Is there ANY way to make an autorun flash drive?

Related

How will I make my app automaticly launch when I plug the USB

I put my programs into my USB. I want them to launch automaticly without asking when I plug the USB. Some of my programs are written in C and some are in Python. Is there a way to make it ?
For Windows, I have done this using USBDeview (note that this feature does exist although does not appear in the description - you have to read all the release notes).

ext2/ext3 in embedded device

I would like to be able to use the ext2 or ext3 file system in an embedded device without having to use Linux. I plan to have an embedded processor with a SATA hard drive attached. I have found the source code on Kernel.org but I am unsure how to use it. Idealy I would like to have some functions I can call to write/read a file etc. Is there any documentation about this or has anyone done something similar.
Thanks
Jon

Capture playing sound

I would like to build a program that can catch sound played on Mac OS X, either all sound or from individual programs. Is that possible? I've been reading a lot of documentation but have not found much that looks useful. It could be that I'm just looking in the wrong direction. Can it be done and are there a specific group of APIs that I should focus on?
Haven't tried it, but the idea would be to direct all sound output to an audio "device" (a kernel component) that allows it to be captured. According to this page, you can do that with soundflower.
If you want to do it programmatically, I'd install the soundflower driver and look into controlling it from your program.

are there best practices or tricks for indexing/monitoring a drive for files?

I need to find and monitor all the photos on a hard drive or a folder for a photo organizer. Currently I'm doing this naively: recursively traversing, manually marking folders as indexed, and repeating that process to catch when photos are added or moved.
The problem is with a large enough folder tree this is very expensive, so I'm looking for tips to do this differently and/or tips on keeping it a low cpu process.
Ideally solutions would be not platform-dependent.
EDIT: I'm using xulrunner currently, but could compile a module do platform specific stuff.
What about the first run? Is there no solution (even platform-dependent) besides running through the entire folder tree manually.
Ideally solutions would be not platform-dependant.
Impossible. The Win32API has FindFirstChangeNotification, Linux has inotify (and others), Mac OS X has FSEvents, et cetera. This is stuff that's very low-level, and no OS does it the same as any other OS. If you want something cross-platform, you have to find an API with several backends that works on the platforms you want, but if there are any of these, I haven't yet found them.
I don't know of a way to do this in a platform independant way, but on Linux I'd hook into inotify to call something when a file gets added or updated. You could even use inotify-tools to run a script when that happens, so you don't have to be running all the time to capture all these events if they're infrequent. Just have the script update the database, and optionally notify your gallery/display program if it's running.
Are you coding on .NET? If so, you could use the FileSystemWatcher class instead.
Why not user a filewatcher program, which will notify you of changes in particular folder trees?
If you want to write your own you could use the FileSystemWatcher class to do it.
One answer as of 2014 is facebook's watchman: https://facebook.github.io/watchman/
A couple of years ago I ported some functions of Windows API to Linux like (FindFirstChangeNotification, FindCloseChangeNotification ...) it has some limitations but for what you need it could be enough, please take a look at: https://github.com/paulorb/FileMonitor

Access the stage in the Flash CS4 IDE

The stage in the Flash CS4 Authoring Enviroment is a running SWF. That what makes thing like the 3D and Bone Tools to work in the IDE.
Is it possible to access that swf ? I suspect the immediate answer would be no because that would raise some security issues maybe and cause lots of developers to crash the IDE every 5 minutes :).
That said I don't expect this to be a straight forward process, but I guess there should be a way to access that.
Any thoughts ?
I can only tell you how components work on the stage, where we've attempted the type of access you talk about.
I suspect that at their core, the 3d and bone tools are implemented using component-like tech to display the "live" stage instance. In general this would involve a compiled instance of a live preview swf that is placed on the stage. It is misleading to think of the stage as a single player. Each component preview runs in its own sandbox that, as far as I can tell, has no means of communication with other component previews on the IDE stage. There is no common storage location.
Of course, if you were in charge of the preview swf (as with the case of a component), you could try LocalConnection to chat, but the previews you want to penetrate are closed. I suspect if you dig hard enough, you'd find the bone/3d preview hidden in the installation folders (perhaps in a swc.. ik.swc looks interesting) and might be able to hack about at it with a decompiler, but straight out the box, I'm not sure there's a solution to what you ask.