Monday, 24 February 2014

Creating PCT images & Editing in HyperCard

I've been looking into converting current formats like .jpg into .PCT format to import into HyperCard to be manipulated or drawn onto and made into icons for buttons etc.
A bit of a meandering process that turned out to be much easier than I expected. Reading info on the web gave me the impression that converting file formats to or from .PCT would be difficult - turns out you can use GraphicConverter to do this in no time at all. I remember GraphicConverter from years ago (though not as 'front line' graphics software) - something I hadn't considered using. Whats nice is it happens to be another historic piece of software for me to look at. Anyway, some examples:



Using the paint tools in HyperCard takes a little getting used to, as they're similar to what you find in Photoshop these days but selections and layers (there are only two) work quite differently...This means you find yourself un-doing things a lot because you undertake tasks as you would in Photoshop only to find yourself in a cul-de-sac. There are also some extinct niceties to take advantage of in HypwerCard - the above used the 'lightening' and 'trace outline' commands on the PCT once it was pasted into HC.




Creating and editing icons isn't headlined in the 'getting started' info all that well. The above uses a 40x40px PCT as reference, edited with the Icon Editor - a pencil to go DOT DOT DOT with...

Tuesday, 11 February 2014

HyperCard - Automator

Have been looking into HyperCard (HC) - specifically finding about HyperTalk and how to program HC using it. HyperTalk is very accessible. Some tutorials for writing functions etc. here: http://folkstream.com/muse/teachhc/index.html

Interesting thread emerging:
1. Scripts vs programming - syntax (write like you speak e.g ApplScript) and attaching scripts to graphical objects (as you would in HC and others).
2. Options for programming by typing, using a GUI or recording a script - HC enables you to write scripts directly, 'click and select' functions via a panel or record actions to script.
3. Wider functions and historical influences - HyperTalk's similarity to AppleScript (AS), the ability to interface with AS to control system functions and the development of AS from the time of HC to its current uses and related software e.g. Automator and AppleScript Editor.

 

AppleScript Reference: Statements
AppleScript Ref: Objects - as graphics & code - early OOO




The following came up whilst looking for downloadable HC Stacks...I found many sites dedicated to HC and featuring 'downloadable stacks', the majority of which are sadly not maintained anymore, so predominantly featured dead links/ 404's etc.

1. hypercard.org
2. stacksmith.org/index.htm
3. hammer-language.com
4. Automator - Apple Support
5. Mac Automation Made Simple (Podcast - iTunes)

Not sure about Hammer, needs looking at further I think, as it seems to be an attempt to faithfully revive HC. Most intriguing is the following quoted in the Hammer Mission Statement. 

"And maybe — just maybe — a programming language with a text editor is the completely wrong approach, and this should be a learning 'action recorder' a la Automator meets AppleScript Recording."

Recording Scripts: I came across the Action Recorder in HC before seeing Hammer and did think it was a worthwhile feature (I've yet to try it out)


There are good current examples of this type of coding in Software environments (not necessarily action recorded but 'script-attach-object' type processes) - Unity being one. As well as some examples that have recently been consigned to history, such as Flash (AS 2) and Director... It seems to me on first glance that HC functionality and the 'things' it enabled users to do so well now exists within OSX as a combination of Automator and AppleScript Editor and so reviving HC faithfully is a bit of a (?). *Note question of making GUI type 'apps' currently still to be looked at - you could do this in HC and I have seen it done with a combination of AppeScript and realBASIC...mmm more thought and looking required.

A foot note to all of this: Apple are beginning to cut support for AppleScript functionality/ making API's available for certain apps (Pages & Numbers being two examples)...here we go again.
Ben Waldie states in the podcast listed below that the Apple reason for doing this is to focus providing a unified user experience across all Apple platforms for users and that giving them access to scripting/ API's to enhance functionality using AppleScript (mainly in OSX) is not a priority - a retrograde step IMHO. Seems OSX/ ios convergence is driving this scaling back, with ios framework dominating (link to podcast below - no. 60 in the list).

Mac Voices - Ben Waldie