Is it possible for me to listen to listen to OSX's built in screencapturing so I can handle the files myself rather than osx doing it?
There are a few options.
Just use Ctrl-Cmd-Shift-3 or 4 instead of Cmd-Shift-3 or 4. This does not save the file to the desktop, instead it saves the data in the clipboard/pasteboard. I don't know where's the official mention of this, but here is one. Then you can get the data through NSPasteboard, see here.
You can use FSEvents to be notified whenever a file is created in a specified folder. Then you can rename the screenshot file soon after it was saved to the desktop by the system. Note that the file name of the screenshot depends on the language environment you choose in System Preferences. So, be very careful if you want to make your program work on a non-English machine.
If you just programmatically take the screenshot, you can use the command line tool screencapture, see the man page.
Of course you can hack into the system and take over the handling of Cmd-Shift-3,4, as Snapz Pro does, for example. You know what you're doing if you choose that way.
Related
I have Shtrumann Link 500sl navigator powered by winCE 6.0. I want to get into windows shell (or explorer or something). I know it’s possible as I did it three of four years ago, but I can’t recall exactly how. All I remember is that the method involved usage of SD card with especially formatted text file. The text file contained path to shell.exe (or something alike). I can’t remember exact file names. For some reason google didn’t help.I’d appreciate any ideas (including proper search terms for google)
I've recovered my old solution. I did it as follows:
1. On SD card, create ascii file called shell.ini. This file consists of a single line '\windows\explorer.exe' (without quotation marks)
2. Insert the SD and reboot
3. Navigator boots into its regular shell, if you chose 'navigate' from the menu it takes you to winCE explorer
I have some source code that I want to document without touching the code. For every source file (e.g., example.cpp, example.f90, etc.) I would like to have a separate documentation file (e.g., example.cpp.doc, example.f90.doc) that has some metadata (ctag) linking it to the original source file.
Ideally I could open the source file and the documentation file in parallel views in my favorite editor (ViM) and have the two files synced so that they scroll together. In this manner, I can keep my documentation visually inline with the un-touched source code.
I know this is likely to be a unique scenario. But I'm hoping someone else has already figured this out.
Is this even a possibility?
Create the initial .doc structure outside of Vim such that the "metadata" you want to keep is in the same line number as the original file.
Then open the two files in different Vim windows with vim -O example.cpp example.cpp.doc. At this point use :windo set scrollbind to enable scroll binding, which will allow to navigate any of the windows while keeping both in sync.
So I decided to take a look at Smalltalk. Googling led me to Squeak and Squeak By Example. Squeak By Example tells me to drag the .image file onto the Squeak.exe icon. I do this and get an error:
"Error: No content to install"
If I load squeak.exe by itself, no error message occurs. I assume this is because it uses the image file that was included in the download from squeak.org instead of the on I'm trying to use. I've verified that the .image and .changes files are not read only and are unblocked (you know, that little button that exists on the properties dialog of a file that was downloaded from the internet).
Squeak version: Squeak-4.2-All-in-One
SBE: 1.3
What's next?
Edit:
Proceeding with the book a bit, I got to the part where you save the environment, then try to open your recently saved image. I got the same error. So it must be an issue with how I'm opening it, or an permissions thing or something. I made sure both my user and the system user have full control over the image and changes files. I also tried forcing squeak.exe to run as administrator. Still having problems.
Saving the default image while exiting instead of a save-as and simply loading squeak.exe (and the default image) worked without error. I'll look at it some more later.
It seems that when an ImageFile is specified in Squeak.ini (as is the case in Squeak-4.2-All-in-One) that image file is always used. And if you pass a file as an argument to Squeak.exe (or drag and drop it) that file is passed to the image as a source file to be executed instead.
If you want to open an image file by dropping it on the Squeak.exe icon remove the ImageFile directive from Squeak.ini
I'm looking to log all the text that gets displayed on my OS X 10.6 machine. e.g. all webpage text (no matter the browser), PDF text (not necessarily the entire PDF, but at very least all the text that was actually viewed), anything I type into emacs, any email I write.
I've looked at the Accessibility API, but it seems to be more about describing function than content - and in any case relies on application developers to have implemented accessibility objects. Is there something lower-level? perhaps I can watch everything that goes through the OS font renderer?
After searching for a while my impression is that Apple doesn't explicitly make this possible, I'm open to any hackish suggestions you might have.
You'd have to get deep inside the Window Server to have any hope of getting all the text that was written to the screen. I suppose you could patch it yourself, but it's hard to see how without source. What you want has obvious nefarious uses so there's hardly going to be a public API for it.
Just a shot in the dark, but what about turning on Screen Sharing on the 'target' Mac and pointing a modified VNC client at it? I don't know whether text is sent as text over VNC or not, but if it was that might be one place to start. It's effectively giving you a Window Server equivalent that you control.
I don't remember where I heard about it, (I think I was searching up on how selectors worked and it ended up not being exactly the same as a callback function) and I can't confirm it. But more importantly than that, is there a way I could get a list of the function names from another application?
See class-dump.
You can sometimes see a list of the method names in an application. Find the .ipa file for the app (possibly in the Music->iTunes->Mobile Applications directory on a Mac). Make a copy of one of the ipa files and change it from .ipa to .zip. Unzip the file and in the Payload folder, there's a file with the same name as the app. Right click on it and "Show Package Contents". In there, you'll find another file with the same name as the app (with no extension). This is the executable file for the app. If you open it in a text editor like BBEdit, you'll sometimes be able to see some method names, as well as a list of the frameworks the app is built against. You can find the path name where things were kept too, often with the developer's name.
For example, looking into the Japanese dicitonary Daijirin, I can see these methods:
-[HMWebSupport openMONOKAKIDOSupportWithSafariForView:style:]
-[HistoryViewController viewWillAppear:]
I can also see that one of the developers was called Norihito, and he was using SVN: /Users/norihito/Developer/SVN/Mobile/DAIJIRIN/Other
Other applications (like Weightbot) don't show as much information. I don't know the reason it shows up some times and doesn't other times.