Page 1 of 2

Mac OS X Externals

Posted: Thu Jul 25, 2013 7:41 am
by shaosean
Got bored. Figured out how to make externals with Xcode 4. Here you go. I will be posting them as I make them, they are all released in to the public domain and if you like them feel free to bribe me via PayPal ;-)

Some will be small little one off features, others will be larger in scope.. I am writing them in Xcode 4.6.3 on a MacBook Pro running 10.8, so no idea if they will actually run on lower OS versions, but I do not see why not..

ShowAnimationEffect

Posted: Thu Jul 25, 2013 7:48 am
by shaosean
Description
Displays the "poof" animation.

Syntax

Code: Select all

ShowAnimationEffect

Re: Mac OS X Externals

Posted: Thu Jul 25, 2013 11:39 am
by Klaus
Nice :-)


Your message contains 8 characters. The minimum number of characters you need to enter is 10.

Re: Mac OS X Externals

Posted: Thu Jul 25, 2013 1:44 pm
by shaosean
Forgot to mention that these externals are for Intel-only.. If you still need a PPC version of any of them, let me know and I will see about getting a PPC version made..

SecureInput

Posted: Thu Jul 25, 2013 2:14 pm
by shaosean
Description
This one allows you to enable the secured input feature.. When your application quits or you application is made inactive, the external automatically disables secured input (if required)..
When secure event input mode is enabled, keyboard input goes only to the application with keyboard focus and is not echoed to other applications that might be using the event monitor target to watch keyboard input. If your application implements its own password entry, you should enable secure event input while the user enters text.
Syntax

Code: Select all

EnableSecureInput
DisableSecureInput
IsSecureInputEnabled() -- returns a boolean

ss MenuBarHeight

Posted: Thu Jul 25, 2013 2:40 pm
by shaosean
Description
Just something simple to get the height of the menu bar (yeah, it pretty much has always been 22 pixels, but things can change)..

Syntax

Code: Select all

MenuBarHeight()  -- returns an integer

ssUserName

Posted: Thu Jul 25, 2013 2:57 pm
by shaosean
Description
Returns the long and short user names

Syntax

Code: Select all

UserName()  -- returns the long user name; i.e.: Shao Sean
ShortUserName()  -- returns the short user name; i.e.: shaosean
ps.. yes, those are really mine ;-)

Re: Mac OS X Externals

Posted: Thu Jul 25, 2013 11:52 pm
by Mag
shaosean wrote:Description
Just something simple to get the height of the menu bar (yeah, it pretty much has always been 22 pixels, but things can change)..

Syntax

Code: Select all

MenuBarHeight()  -- returns an integer
Great pieces of software. Maybe the height of the menubar could help to learn if the display is Retina (provided it give the size in pixels and not points)?

Re: Mac OS X Externals

Posted: Fri Jul 26, 2013 12:01 am
by shaosean
Maybe I can write an external to check for Retina or not, I think I posted something about it a while back..

Re: Mac OS X Externals

Posted: Fri Jul 26, 2013 12:11 am
by Mag
shaosean wrote:Maybe I can write an external to check for Retina or not, I think I posted something about it a while back..
This would be absolutely great. It could fill a gap quite heavy LC. I'm not sure but then there need also a way to say to LC to use the device resolution (like iphoneUseDeviceResolution in iOS), in this way you can use the appropriate images dependind on the retina/nonretina info.

PS
BTW I downloaded ShowAnimationEffect.bundle but I don't know how to install (and call) it :-(

Re: Mac OS X Externals

Posted: Fri Jul 26, 2013 5:41 am
by shaosean

ssExpose

Posted: Fri Jul 26, 2013 6:32 am
by shaosean
Description
Allows you to hide a window from Expose.
Allows you to show a window on all Spaces.

Syntax

Code: Select all

VisibleInExpose windowID, boolean  -- show/hide a window from Expose
IsVisibleInExpose(windowID)  -- returns true if the window is visible in Expose, false otherwise

VisibleInAllSpaces windowID, boolean  -- show a window on all Spaces (when the user switches desktop spaces, the window moves to the new Space)
IsVisibleInAllSpace(windowID)  -- returns true is the window is visible in all space, false otherwise

Re: Mac OS X Externals

Posted: Fri Jul 26, 2013 8:54 am
by Kangaroo SW
Hello Sean thanks for your great externals I love the poof one !!!!!

Re: Mac OS X Externals

Posted: Fri Jul 26, 2013 9:11 am
by shaosean
Thanks.. They're nothing overly fancy, but figured that they could help someone out..

Re: Mac OS X Externals

Posted: Fri Jul 26, 2013 9:21 am
by dave_probertGA6e24
Heyup Sean,

Thanks for all you are doing here - I'm now a happy user of a non-rev external.

Your showAnimationEffect is now exploding on every button I press in my private Program :) :) - Yeah, I'm sure I'll get bored of it, but it's fun just now and so nice and simple to implement.

Mag: Once installed (follow the instructions from other post) then just put 'ShowAnimationEffect' in an on mouseUp handle on a button. Then click the button. :)

Keep up the great work.

Cheers,
Dave

BTW, if you feel bored one evening you might want to do a very plain tutorial on the creation of an external - I'm sure that it would be very well received. Many people (well, ok, probably just me!) don't have a clue which external SDK stuff to get (and from where) and how to setup XCode for the work flow. And then the basics of the Obj-C/C++/C/? that is used to do something like the showAnimEffect.