Apple Events in Squeak
Henrik Gedenryd
Henrik.Gedenryd at lucs.lu.se
Wed Jan 31 09:50:25 UTC 2001
Splice31415927 at aol.com wrote:
> Can anyone point me to sample code for sending and receiving apple events
> with Squeak? I've found classes like AEDesc and DescType, but I can't find
> any implementations of them that demonstrate their use. Help greatly
> appreciated, thanks.
Check the category VMConstruction-AppleScript.
Try the code below, or use as inspiration:
(evaluate "SoundJam next" to test it. SoundJam needs to be running.)
Henrik
'From Squeak2.9alpha of 13 June 2000 [latest update: #2774] on 31 January
2001 at 10:47:53 am'!
Object subclass: #SoundJamScriptor
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'VMConstruction-Applescript'!
!SoundJamScriptor methodsFor: 'SoundJam commands' stamp: 'hg 8/17/2000
14:16'!
do: aString
Applescript tell: 'SoundJam MP' do: aString
! !
!SoundJamScriptor methodsFor: 'SoundJam commands' stamp: 'hg 8/17/2000
14:15'!
next
self do: 'next track'
! !
!SoundJamScriptor methodsFor: 'SoundJam commands' stamp: 'hg 8/17/2000
14:15'!
previous
self do: 'previous track'
! !
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!
SoundJamScriptor class
instanceVariableNames: ''!
!SoundJamScriptor class methodsFor: 'initialize-release' stamp: 'hg
8/17/2000 14:17'!
initialize
"SoundJamScriptor initialize"
Smalltalk at: #SoundJam put: self new! !
SoundJamScriptor initialize!
More information about the Squeak-dev
mailing list
|