Re: Screenshot of Window (using Akua Sweets)
Re: Screenshot of Window (using Akua Sweets)
- Subject: Re: Screenshot of Window (using Akua Sweets)
- From: "Bob.Kalbaugh" <email@hidden>
- Date: Wed, 26 Sep 2001 23:47:27 -0500
on 9/26/01 8:24 PM, Scott Earleywine at email@hidden wrote:
>
This isn't really related to AppleScript...but since this was brought-up, is
>
there a 'better' way to grab a screenshot than the CMD + SHIFT + CAPS + 4?
>
The reason I ask is because that way doesn't work very well. Sure, you get
>
the cross-hairs...but you don't exactly get to control it's movement. I
>
want something like PhotoShop's select tool...where I can just drag the
>
cross-hairs (i.e. Rectangular Marquee Tool) how I want. Know what I mean???
>
>
Thanks!
>
SLE
>
Scott,
You get the marquee by making sure that caps lock is NOT activated before
pressing command-shift-4.
command-shift-3 = Entire screen
command-shift-4 = marquee select - drag - screenshot of selected area
command-shift-4 with caps lock on = click a window
And to answer Alexanders question,
Like Paul said, some of the properties of input state in AKUA are read only.
ie: {caps locked:true} but you can still run a script that will do what you
want - IF - you make sure the caps lock key is on BEFORE you run the script.
Play around with this.(Make sure there is at least one Finder window open
first, before running this script) Note that it includes a handler for
testing the current state of the caps lock key and if it is not active it
will prompt you to activate it. Hint: If prompted, activate the caps lock
key first, then hit return or enter to dismiss the dialog. One caveat. If
you move the mouse during the script run, it probably won't work
-- begin script --
on run
set capsLock to my capKeyCheck()
if capsLock is not true then
beep
display dialog "Please activate the caps lock key."
end if
tell application "Finder"
activate
set wB to bounds of window 1
set x to (item 1 of wB)
set y to (item 2 of wB)
my Click({x, y})
end tell
end run
on Click({x, y})
input state {pointer location:{x, y}, button down:true}
input state {keys down:"4", modifier keys:"CS", button down:true}
pause for 5
input state {button down:false}
end Click
on capKeyCheck()
set theState to input state
set theKeys to modifier keys of theState
if "A" is in theKeys then
return true
else
return false
end if
end capKeyCheck
-- end script --
Alexander,
If you have any questions about the script, feel free to email me off list
_bob.kalbaugh
>
>
> From: Alexander Schrieken <email@hidden>
>
> Subject: Screenshot of Window (using Akua Sweets)
>
>
>
> Hi all,
>
>
>
> I'm trying to make small -- tiny -- scripts for
>
> the key-combinations involved in taking screen-
>
> shots.