
Tab_summaries.append('%s\n%s' % (name, url))Ĭlipboard = subprocess.Popen('pbcopy', stdin=subprocess.PIPE)Ĭ('\n\n'.join(tab_summaries)) So I used subprocess to call the command-line pbcopy utility.įor window in app('WebKit').windows.get(): The only stumbling block was that I couldn’t find a way to access the clipboard with appscript, and I didn’t want to have to pull in the PyObjC framework just to write to the clipboard.
#Simbl plugins install#
I was able to install this with a simple easy_install appscript and quickly ported most of the applescript to Python. I had some recollection that is a way to do this from Python, so I looked and found Appscript. Now I can copy the title and URL of all my open tabs onto the clipboard easily again, without any InputManager hacks. From there it was easy to create script folders that are specific to both WebKit and Safari and save a copy of the script (with the appropriate substitution, see comment in script) into each folder. I had to use AppleScript Utility to add the script menu to my menu bar. Set url_list to url_list & URL of t & "\n\n" Set url_list to url_list & name of t & "\n" change WebKit to Safari if you are not running nightlies In Script Editor, paste in the following: It may not be the best possible solution (in fact I suspect the string concatenation may be one of the most pessimal methods), but it Works For Me™. But what I wanted looked achievable with it, so I armed myself with some examples from Google searches, and Apple’s intro pages and managed to get what I wanted working. I find the attempt at English-like syntax just confuses (and irritates) me no end. Long ago, John Gruber had written about the frustration with Safari’s tabs not being scriptable, but a glance at the scripting dictionary showed me this was no longer the case (and probably hasn’t been for years, I haven’t kept track). So I tried looking at Safari’s scriptable dictionary, using the AppleScript Script Editor.
#Simbl plugins how to#
I toyed with the idea of rewriting it as a service, which would then be available from the services menu, but couldn’t figure out how to access the application’s windows and tabs from the service.
#Simbl plugins update#
I miss a handful of the Saft extensions (but not having to update it for every Safari point release), and I found I really miss my little tab-dumping tool. So I removed those and the crashes went away. I was running both Saft and my own tab dumping plugin, and WebKit was crashing a lot. WebKit warns at startup that if you’re running extensions (such as SIMBL plugins) it may make the application less stable.
#Simbl plugins code#
I have been running the WebKit nightlies, which are like Safari, but with newer code and features (most importantly to me right now, a Firebug-like developer toolkit). Some developers and users shun such hacks, and at least one Apple application checks for them at startup and warns you from using them. That still works well as the basis for extending any Cocoa-based application at runtime, but it relies on SIMBL, which while it is a great bit of code, essentially is abusing the InputManager interface. This is an update to Tab Dumping in Safari.

Java HotSpot(TM) 64-Bit Server VM (build 20.Goal: Iterate through all my (OS X Safari) browser windows and make a list of titles and urls which is then placed in the clipboard ready to be pasted into an email or blog post. I run on OS X 8.1, with my Java version being: java version "1.6.0_33" I've done some more research in the mean time, and correct me if I'm wrong here, the megazoomer thing has to do with the green magnification button of windows, right? I tried a bunch of different things, such as re-installing Java or changing permissions for that file, but nothing worked.

It compiles and runs fine, but it just blurts out this error as it boots. Note that this doesn't affect the program at all (as far as I know). Library/Application Support/SIMBL/Plugins/megazoomer.bundle/Contents/MacOS/megazoomer: no matching architecture in universal wrapper

Whenever I try to run a Java program with a GUI through Terminal using the `java' command, I get the following error: 11:37:35.287 java Error loading /Library/Application Support/SIMBL/Plugins/megazoomer.bundle/Contents/MacOS/megazoomer: dlopen(/Library/Application Support/SIMBL/Plugins/megazoomer.bundle/Contents/MacOS/megazoomer, 265): no suitable image found.
