Hiding an app under Windows

Ken Ray kray at sonsothunder.com
Sun Jul 5 00:24:31 EDT 2009


> On Wed, Jul 1, 2009 at 12:48 PM, Ken Ray<kray at sonsothunder.com> wrote:
>>> On the Mac, I use AppleScript to hide an application when I need to.
>>> Is there a way to do this under Windows.
>> 
>> Is this a Rev app you're trying to hide, or someone else's 3rd party app?
> 
> It's actually iTunes. I have written a music recognition quiz app for
> my son that uses iTunes. His friends want it on Windows, but iTunes
> has to be hidden or they can see what music is playing and cheat, so I
> have to be able to make it disappear.

OK, so it sounds like you could have it minimized instead of hidden and that
would work, right? If so, this VB Script will work (although since it uses
Wscript.Shell, you can't run it with "do as VBScript", but instead need to
write it to a .vbs file and execute the file):

' Assumes iTunes is already open
Set Shell = CreateObject("Wscript.Shell")
Shell.AppActivate "iTunes"
Shell.SendKeys "% n"

(BTW: that's a space between the '%' and the 'n')

HTH,


Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/





More information about the use-livecode mailing list