Is there another way to make a screenshot of background windows apart from screencapture -l? - macos

I'd like to take a screenshot of a background window given its title.
I know this can be made with screencapture -l idwindow output but unluckily I can't use this method because I'm on a Mac OS X 10.5.8 system so the command screencapture doesn't support the option -l.
Are there other ways to achieve this?
Thanks in advance.

GrabFS looks like a nifty tool that can solve your problem. It basically turns running programs into a file system like structure that lets you grab screenshots of those running programs.
Requires Mac OS X Leopard and MacFUSE. You are on 10.5.8 (Leopard?) so that should work out OK.

Related

Automator takes screenshot of background instead of window

System specs: mac OS Monterrey V12.5, Apple M1 chip 2020
I am making an application which will take a screenshot of a video, and take the timestamp of the current point in this video, after which both the timestamp and screenshot will be send to a numbers file (mac OS excel like program).
I could not find an application to do this and I tried to get it working using python as shown here but was unable to. Now because I am on Mac I have decided to use Automator instead. I am currently on the screenshot part and Automator has a build in screenshot functionality.
Unfortunately, this screenshot does not detect browser or application windows, it will only take a screenshot of my background.
I have no idea why this is but I suspect it might have to do with permissions related to the M1 chip.
I tried different monitors and simplyfying the automation to just taking a screenshot, but so far nothing has helped, I could not find others online who had a similar problem.
If there is any information missing from this post I will be happy to provide it.
Edit: It seems to be some kind of permission issue, automator CAN take screenshots within Safari, now I just need to find a way to do so in firefox.
I have solved the issue, it turns out that the M1 chip has a special permission for screen recording, adding my Automator application to this permission list will allow it to take screenshots of all windows.

How to play a sound with Rebol 2 on Mac OS X

The feature that is missing is to play sound. I'm thinking of calling a system library or a terminal command that would accept the sound name as a parameter.
The goal is to get some sound from, for example, a button click.
PS. I'm using Rebol/view on an iBook G3 with Mac OS X Panther.
Unfortunately the Rebol sound port (sound://) isn't supported on MacOS / OSX.
Two workarounds that come to mind:
1) Basic terminal bell
prin #"^G"
2) call out to a sound tool like afplay
call [afplay %/System/Library/Sounds/Ping.aiff]

how to make firefox or any other xulrunner based app float above all other windows in mac 10.6 and above?

afloat is very useful to keep the window above all the windows in mac, but only cocoa based applications. Is there a way that one can achieve this feature for other applications programmatically. example firefox
I do not want to use afloat, but I would like to know how to code this feature in mac.
Thanks a lot!!

Is it possible to create a Mac OS X gui app which is not a bundle?

I want to make an executable file (not the Mac .app bundle) which when run with a specific option (e.g. -gui) will pop up the gui.
For example, say I'm writing wget. I could do: wget www.google.com and that would print the result to the console, but if I instead do: wget -gui www.google.com that would pop up a gui window with the render of the html.
Is this possible in OS X (it is in windows)?
Note: I mean that the gui code is contained in the executable, calling open on another app is not acceptable.
Simple: Yes
Your second question will be how I guess.
Sometimes people ask me for applications that when launched by the Finder they should behave normal but when started by another process or terminal it should behave different. So, just like firefox, you can start the application the normal way or you can start it with special option.
Another way is creating agents. They are applications but don't appear in the dock and are designed to show interface elements when needed.
If you don't want to use a bundle per se you can just create a (cocoa) command line utility that loads an NSApplication when needed (depending on the command line options).

Calling a command line in MONO on MAC OS X

I want to be able to call the automator or unix commands like ls from a mono app and ge the results back.
This can be accomplished on windows easily. The question is how is this done on the mac??
caveat: I've never written a char of mono in my life.
I imagine it's a matter of redirecting stdout and firing up a process. this linux forum shows that you can do pretty much that - OSX will behave mostly as a UNIX-like system for you, I reckon.
Oh by the way, if you want to fire up an OSX application, have a dig around inside the ".app" bundle. OSX shows these as a file, but they're actually directories. In the finder you can right-mouse click and "show package contents", or you can open up a terminal / command prompt and cd into them. For instance, you can launch the Automator like this from the terminal:
/Applications/Automator.app/Contents/MacOS/Automator
I don't know if you would want to go down this route, but if you're going to be interfacing with OSX (gui) apps, you might want to look at using Applescript as some "glue" between Mono and the app.

Resources