Hide application?

hi all,
I’m pretty new to applescript and am busy doing various tutorials Ive found around the place, and lots of reading here (as well as a fair bit of experimentation/head-scratching)…

Eventually i want to write a very simple version of ‘name that tune’ with iTunes and at the moment I am trying to make it so that when I run my script it opens, then automatically hides iTunes. I’ve tried various variations on this, but it isn’t working:

on awake from nib theObject
tell application “iTunes”
hide
end tell
end awake from nib

I would have thought it is something simple.
Any ideas, anyone?
Many thanks, in advance.
(Apologies if the answer is here and Ive missed it - I have searched here and elsewhere before posting.)
All the best
Ron

Browser: Safari 100
Operating System: Mac OS X (10.4)

Use System Events to handle hiding and showing apps:

tell application "System Events"
	set this_app to some item of (get processes whose name = "iTunes")
	set visible of this_app to false
end tell

Jon

Model: PowerBook 1.25MHz
AppleScript: 1.10
Browser: Safari 412
Operating System: Mac OS X (10.4)

Thanks John, - really appreciate your help.
I’m looking into System Events now
All the best
Ron

Browser: Safari 85.7
Operating System: Mac OS X (10.4)