osx

AppleScript to target frontmost application

I want to program my mouse button to show/hide the Finder. I wrote the following AppleScript and bound it to my mouse button: tell application "System Events" --When this script is run, -- the frontmost application will be this script itself --Get the name of this script as it is running and hide it, -- so that the pr...

Add images to window with AppleScript Studio

How do you add and manipulate images on a window with AppleScript Studio? Ideally I'd like to have an image display on the window and change it to a different image using applescript. I've added an image view in interface builder, but that's about as far as I have gotten. ...

Rubys on Rails project Using Aptana

Hello, I am having a major issue with creating a Rails Project on Aptana (using mac os x). Basically, when i try starting a Rails project and name a file, it comes back with an error saying: "!!! Path to log file not valid: /Users/fab/Documents/Aptana Studio Workspace/test.rb/log/mongrel.log mongrel::start reported an error. Use mong...

Unable to build SciPy on OS X 10.5.7

Hi, I am trying to install SciPy following these instructions: http://www.scipy.org/Download And constantly getting error to build them for OS X Lepeord 10.5.7: dyld: lazy symbol binding failed: Symbol not found: _iconv_open Referenced from: /usr/lib/libaprutil-1.0.dylib Expected in: /opt/local/lib/libiconv.2.dylib dyld: Symbol n...

Applescript detect new drives

I have an applescript studio application that I use for imaging hard drives. Right now it runs a shell script (diskutil list -plist) to get information about the drives attached to the computer, it then presents this information to the user, and the proper drive to image is selected. Ideally I would like my application to be able to d...

To get PYTHONPATH correct in running Django

I run at a cloned Django repository python manage.py runserver I get Traceback (most recent call last): File "manage.py", line 2, in <module> from django.core.management import execute_manager ImportError: No module named django.core.management The problem is in my PYTHONPATH according to MacPorts' IRC. I run ls -l $(which ...

How do I disable warnings being flagged as errors in XCode

Is there a setting XCode that lets you treat warnings NOT as errors in XCode? I'm doing alot of prototyping code where I don't care if I have an unused variable for example. XCode is treating these warnings as errors and it is seriously slowing down my productivity. Can't figure out how to disable this though. ...

OS X Get highlighted text

Hi, I'm interested in writing a plugin for OS X to support multiple operations on highlighted text in the right click context menu. The operations are simple enough that I could write them by myself. I've looked at automator's "Copy to Clipboard" action, but it requires some text input first. The "Get contents of Clipboard" action will...

Getting Items on the Local Clipboard from a Remote SSH Session

Borderline ServerFault question, but I'm programming some shell scripts, so I'm trying here first :) Most *nixes have a command that will let you pipe/redirect output to the local clipboard/pasteboard, and retrieve from same. On OS X these commands are pbcopy, pbpaste Is there anyway to replicate this functionality while SSHed into ...

Get Activity Monitor (Mac OSX) through Java

Is there a way using Java that I can gain a list of all active processes running on a Mac? I can do so in Windows using the code below to return the Task List, but that throws an exception on a Mac. I want my app to stop if certain applications are also running. Any ideas? Thanks. Windows Code: Process p = Runtime.getRuntime().exec...

How can I do full screen in Java on OSX

I've been trying and failing to use the java full screen mode on the primary display of an OSX system. Whatever I've tried I can't seem to get rid of the 'apple' menu bar from the top of the display. I really need to paint over the entire screen. Can anyone tell me how to get rid of the menu? I've attached an example class which exhi...

How to configure term on Mac OS X with color?

I see some one demo git on Mac OS X on line. He can configure his Mac OS X terminal to have multiple color. for example, his prompt is 'wheat' color, his ls directory is purple color. And his 'git diff' output can have ~ 4 colors (pink, light green, red, pale yellow) Can you please tell me how can I configure Mac OS X terminal to achi...

reduce the number of colours used for PNG image with Automator/Applescript

I want to convert scanned text (black & white) to a PNG image with a colour depth of 1 bit. With Image Events it is possible to convert the scanned image. But "bit depth" is read only. Is there a better way to set the colour depth of a PNG image than to call the shell and use ImageMagick? Thanks ...

Is libusb the preferred method on Mac OS X to access USB device?

Is libusb the preferred method to talk to a device over USB (using AT commands) on OS X these days? Is there any high level equivalent in cocoa? ...

print from php in macosx

Does anyone know a way to print from php5 in macosx leopard similar to the windows approach using php_printer.dll? I'm using macosx 10.5.7 and php 5.2.8. ...

How to intall Tomcat as a daemon on OS X?

How do I install Tomcat as a daemon on OS X? It should run even when a user is not logged on. I could probably survive installing Tomcat for a single users and having it run at log in, for now. But long term I need it installed and running as a service on boot. ...

Getting Callback from OS X When Application Foucs Changes?

Hi, I am trying to find a way how to write a "software sensor" in Java, running on Mac OS X (10.5), which records each application focus change. My first idea was to write a "pull sensor" that uses an Applescript, which just returns the name of the app. that is in focus. Obviously this approach is not very good. Therefore, I was wonde...

Check signature of OSX bundle before load

Goal: Load .so/.bundle that has been verified to be signed (or verified against an arbitrary algorithm). I want to be able to verify a .so/.bundle either using OSX's builtin binary signature tools or some custom algorithm and then load that .so/.bundle with dlopen... The wrench in this is that there seems to be no programmatic way to c...

AppleScript for unlock screen dialog

I've written an Applescript that sets various IM clients to away, closes iTunes, and then starts my screensaver. tell application "Adium" go away end tell tell application "Skype" send command "SET USERSTATUS AWAY" script name "StatusSetter" end tell tell application "iTunes" if player state is playing then pause ...

gem server -- where is my root dir? mac osx

I'm a complete apple newbie coming from a LAMP+windows setup trying to figure out how ruby and apple works. So I just executed "gem server" and i have this server running on localhost:8808 now, great -- it works. BUT Anyone know where the heck is my root directory ie. the equivalent of htdocs? I can't find it, damnit. cheers... ...