Transparent NSWindow using subclasses of NSWindow and NSView

This is a quick example of how to get a Transparent NSWindow using a subclassed NSWindow class and a subclassed NSView.

This is in response to a stackoverflow users request I post the source code. Which I have done here in context.

(Originally it had also had a webview which was related to the question but was not essential in any way in this example so it has been removed.)

Transparent Window with Controls and Labels overlaying it. If you click any where in the transparency the mouse will click the object behind the window. And the objects Application will become the active one.

transparentWindow2

Continue reading “Transparent NSWindow using subclasses of NSWindow and NSView”

Broken Skype Applescripts Fix…

Some of you may know that  Skype have an API that you can access via Applescript. To do such tasks as send sms text messages.

You may have found that for some unexplained reason this has stopped working?

 

Continue reading “Broken Skype Applescripts Fix…”

Join List items v2

Version 2.
Now allows you to add single quotes,double quotes or no quotes around each list item  as it is placed in the final string. This is useful for example  in placing single quotes around file paths in the list. 

Continue reading “Join List items v2”

Join List items Applescript Script libraries command

 join list items command

#the list

set  theList to {“the”, “cat”, “jumped”, “over”}

#join the list

set theString to  join list items theList using text space

Result:

“the cat jumped over”


After watching Apples  Introducing AppleScript Libraries  WWDC 2013 session 416. I wanted to share one of my simple Applescript Libraries commands.

Applescript Libraries are a new thing in Mavericks which allow you to put all you commonly used Applescript handlers in one place to make them easily accessible  in any new script.

As apposed to having them only in snippet file or some script file  stored somewhere you cannot remember where or what exactly the code contained to help find it.

Continue reading “Join List items Applescript Script libraries command”

SOLVED – WordPress.com on iOS – Jetpack “sorry we can’t log you in. Please update your credentials and try again”.

For months now I have not been able to see my stats or notifications using the WordPress iOS app on iPhone or iPad.

Why. Because after an update; every time I tried to use the ‘stats’  or ‘notifications’ buttons the app kept telling me  “sorry we can’t log you in. Please update your credentials and try again”.

Googling and reading posts on the WordPress support site showed me many others had the same problem. But no concrete  answers were forthcoming…

Sure I could see my site and login to the Admin and click the jetpack button there. Which would show me the stats etc. But doing that just takes me to Mobile Safari. And on an iPhone it is not such nice an experience or interface. Everything is tiny. Pinch zoom, pinch zoom..

Today I finally solved it for me at least and want to share how..

Continue reading “SOLVED – WordPress.com on iOS – Jetpack “sorry we can’t log you in. Please update your credentials and try again”.”

Grrr.. PackageMaker things to remember

I do not often use Apples PackageMaker; Part of Apples Developer Auxiliary tools

Screen Shot 2013-05-24 at 19.57.13

When I do dabble  I always forget a couple of simple things that stops me in my tracks and have me spending a whole lot of  wasted time trying to figure out whats going on.

I am writing this post in the hope it will burn at least two of the things I forget firmly into my BRAIN.

The first thing

 

Continue reading “Grrr.. PackageMaker things to remember”

An Epiphany for fixing NSPopover not closing behaviour

 

First this is not a tutorial for NSPopover . Just fix for an issue.

Apple introduced NSPopover in OS X v10.7

The  NSPopover  class provides a means to display additional content related to existing content on the screen. The popover is positioned relative to the existing content.

An anchor is used to express the relation between these two units of content. A popover has an appearance that specifies its visual characteristics, as well as a behavior that determines which user interactions will cause the popover to close. …….

 

But it seems Apple never intended for the NSPopover to be used in a  NSStatusBar  menu item.  Those are the little menu icons in you menu bar that when you click show you info or perform an action. This is probably why Apple has not fixed the bugs when using a popover in this way.

THE Problem

Continue reading “An Epiphany for fixing NSPopover not closing behaviour”

Make a new note in note.app from selected text.

I just noticed a post on cult of mac  which showed how to make a new Automator  ” System Service To Save Text to Notes.app In Mountain Lion”

It is a nice idea but I was surprised that the Author used a copy to clipboard  Automator Action along with a  Run Applescript action

Screen Shot 2013-04-15 at 20.02.01

There is  some redundancy in this workflow as well as unnecessary GUI commands.

Continue reading “Make a new note in note.app from selected text.”

Keep apps from adding themselves to login items when installing them.

Some times when you install applications they also add them selves to the login items.

This means they will startup when you login to your account. Which in some cases is not desirable.

Someone asked on Stackoverflow how to stop this.

I posted two approaches.

  1. Lock the login items preference file. items preference file.
  2. Get notified when there is a change to your login

Continue reading “Keep apps from adding themselves to login items when installing them.”