• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
window gone trick
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

window gone trick


  • Subject: window gone trick
  • From: Bill Briggs <email@hidden>
  • Date: Fri, 12 Jul 2002 11:59:39 -0300

Haven't been reading hardly anything on the list recently, so maybe this has been posted already. Apologies all round if it's a repeat.

You all knew that there was a way to "windowshade" a Finder window in X with AppleScript - Sal figured that out ages ago. But maybe you didn't know that there was a way to make open windows vanish altogether. It's kind of odd, but is has good prank potential, for those of you who like to goof with your friends.

Open a Finder window. Make sure the toolbar is showing.

Run this script.

tell application "Finder"
activate
set {x, y, z, t} to (bounds of window 1)
set bounds of window 1 to {x, y, z, y + 1}
end tell

Now you've got a windowshaded window (okay, the window is a pixel deep now, but it's effectively windowshaded).

Now press Cmd-B. Poof! Window gone!

You can get it back with another Cmd-B and a click of the zoom button. Unless you happen to switch windows, in which case you need to do something else. You can still see it in the Windows menu, and if you select it from the list, you see a featureless white bar appear, with which you can do exactly nothing using a mouse, but if you press Cmd-B again, your windowshaded window is back, and clicking the zoom button gets you a fully opened window.

Note that the following will also windowshade a Finder window, but the vanishing act won't work on it.

tell application "Finder"
activate
set {x, y, z, t} to (bounds of window 1)
set bounds of window 1 to {x, y, z, y}
end tell

If you run this script on a window *without* the tool bar showing, then click on the show toolbar button, or press Cmd-B, you get another odd thing happening - the toolbar area drops down, but it's blank (I've had it both white and black in appearance).

Totally useless, but moderately interesting.

- web
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Passing *possible* variables to a handler
  • Next by Date: Can I automate "load testing" with QT and AS?
  • Previous by thread: Re: [OT] don't suppress the receipient list -closure
  • Next by thread: Can I automate "load testing" with QT and AS?
  • Index(es):
    • Date
    • Thread