Mac OS X Externals

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Mac OS X Externals

Post by shaosean » Thu Jul 25, 2013 7:41 am

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..

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

ShowAnimationEffect

Post by shaosean » Thu Jul 25, 2013 7:48 am

Description
Displays the "poof" animation.

Syntax

Code: Select all

ShowAnimationEffect
Attachments
ShowAnimationEffect.bundle.zip
(5.74 KiB) Downloaded 392 times
Last edited by shaosean on Fri Jul 26, 2013 7:09 am, edited 1 time in total.

Klaus
Posts: 14206
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Mac OS X Externals

Post by Klaus » Thu Jul 25, 2013 11:39 am

Nice :-)


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

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Mac OS X Externals

Post by shaosean » Thu Jul 25, 2013 1:44 pm

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..

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

SecureInput

Post by shaosean » Thu Jul 25, 2013 2:14 pm

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
Attachments
SecureInput.bundle.zip
(6.42 KiB) Downloaded 398 times
Last edited by shaosean on Fri Jul 26, 2013 7:09 am, edited 1 time in total.

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

ss MenuBarHeight

Post by shaosean » Thu Jul 25, 2013 2:40 pm

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
Attachments
ssMenuBarHeight.bundle.zip
(5.2 KiB) Downloaded 390 times
Last edited by shaosean on Fri Jul 26, 2013 7:10 am, edited 1 time in total.

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

ssUserName

Post by shaosean » Thu Jul 25, 2013 2:57 pm

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 ;-)
Attachments
ssUserName.bundle.zip
(5.62 KiB) Downloaded 373 times
Last edited by shaosean on Fri Jul 26, 2013 7:10 am, edited 2 times in total.

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Mac OS X Externals

Post by Mag » Thu Jul 25, 2013 11:52 pm

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)?

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Mac OS X Externals

Post by shaosean » Fri Jul 26, 2013 12:01 am

Maybe I can write an external to check for Retina or not, I think I posted something about it a while back..

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Mac OS X Externals

Post by Mag » Fri Jul 26, 2013 12:11 am

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 :-(


shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

ssExpose

Post by shaosean » Fri Jul 26, 2013 6:32 am

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
Attachments
ssExpose.bundle.zip
(6.16 KiB) Downloaded 389 times

Kangaroo SW
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 40
Joined: Sat Jan 15, 2011 10:57 am

Re: Mac OS X Externals

Post by Kangaroo SW » Fri Jul 26, 2013 8:54 am

Hello Sean thanks for your great externals I love the poof one !!!!!

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Mac OS X Externals

Post by shaosean » Fri Jul 26, 2013 9:11 am

Thanks.. They're nothing overly fancy, but figured that they could help someone out..

dave_probertGA6e24
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 328
Joined: Mon Dec 05, 2011 5:34 pm
Contact:

Re: Mac OS X Externals

Post by dave_probertGA6e24 » Fri Jul 26, 2013 9:21 am

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.
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.

Post Reply