 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
geor
Joined: 16 Jun 2008 Posts: 45
|
Posted: Wed Jul 16, 2008 8:15 pm Post subject: SOLVED Auto-open app & paste screencap in 1 sequence |
|
|
I do alot of SnagIt regional screen captures during a day -
both images and text.
And it seems like I can do everything I need to do in humble Microsoft Paint -
small size/super-quick to open/text boxes/etc.
And such a minimalist interface that it just stays out of my way!
It's simpler & faster for my purposes than actually allowing the screencap
to open in Snagit & work on it there.
So, I thought I was reducing my exertion by making #V open Paint,
then a slight shift of the pinky for ^V to paste the screencap.
Now it occurs to me I could get it all done in 1 combo sequence,
but of course I haven't quite got it figured out yet - "Asks for Help"
I'd prefer to keep the SnagIt screencap event separate from the event of:
"Open the application & paste there, in 1 sequence."
This is because, when I finally decide on the clipboard manager I want to use,
I'll want to accumulate different captures on a multiple clipboard,
then selectively paste to my chosen app, perhaps at random - not in sequence.
Here's what I've tried so far:
| Code: |
#V::
Run C:\WINDOWS\system32\mspaint.exe, ,max
Send ^V
return |
| Code: |
clipboard = ; Start off empty to allow ClipWait to detect when the text has arrived.
Send ^c
ClipWait
#V::
Run C:\WINDOWS\system32\mspaint.exe, ,max
Send ^V
return |
I'd like to apply this same idea to text captures,
pasting it to Notepad or NoteTab Pro, etc. in 1 sequence.
My guess is that if this is written correctly,
then it still preserves the independence of the native Ctrl + C/V Copy/Paste functions, eh?
[ ps - as always, sorry for mangling code in this elegant app ! ]
.
Last edited by geor on Thu Jul 17, 2008 10:53 pm; edited 2 times in total |
|
| Back to top |
|
 |
BoBo² Guest
|
Posted: Thu Jul 17, 2008 1:21 pm Post subject: |
|
|
AFAIK you can use SnagIt from the command line to save the captured images directly into a file without any additional app, or even SnagIt itself needed to be open. But I might be wrong. Good luck.  |
|
| Back to top |
|
 |
geor
Joined: 16 Jun 2008 Posts: 45
|
Posted: Thu Jul 17, 2008 3:45 pm Post subject: |
|
|
@BoBo2 - Thanks for the idea, I'll look into that, & as I study TFM some more,
I'm sure I'll get some better ideas how to accomplish what I'm after  |
|
| Back to top |
|
 |
scottmattes
Joined: 21 May 2007 Posts: 61 Location: USA
|
Posted: Thu Jul 17, 2008 9:38 pm Post subject: this is what I did |
|
|
| Code: |
#p:: ; do screen print and paste it into paint
Send, {PRINTSCREEN}
Run mspaint
WinWait, untitled - Paint,
IfWinNotActive, untitled - Paint, , WinActivate, untitled - Paint,
WinWaitActive, untitled - Paint,
Send, {SHIFTDOWN}{INS}{SHIFTUP}{ENTER}
return
|
_________________ -------------
Scott Mattes |
|
| Back to top |
|
 |
geor
Joined: 16 Jun 2008 Posts: 45
|
Posted: Thu Jul 17, 2008 10:52 pm Post subject: |
|
|
@scottmattes - man this works beautifully w/ PrtSc,
and I'm grateful to have this tool now - Thx very much !
It's interesting as I play with it,
it will NOT paste just the Active screen/dialogue box if Alt+PrtSc is pressed.
So then, I thought to change the script by adding ! to the {PRINTSCREEN} function, & now it will do both - either/or :
1. Paste the entire screen if PrtScr is pressed,
even if a dialogue box is present on the screen --->
but does NOT have the focus !!
2. Paste just the Active screen/dialogue box if --->
the Active screen/dialogue box HAS focus, & Alt+PrtSc is pressed.
| Code: | #p:: ; do screen print and paste it into paint
Send, !{PRINTSCREEN}
Run mspaint
WinWait, untitled - Paint,
IfWinNotActive, untitled - Paint, , WinActivate, untitled - Paint,
WinWaitActive, untitled - Paint,
Send, {SHIFTDOWN}{INS}{SHIFTUP}{ENTER}
return |
..................................................
As I went to experiment with this some more,
I "discovered" that SnagIT can be set up
to automatically pass captures through to any program !
But I am learning alot by studying what you coded,
so Thank You very much again, my friend
Each day I get Great Helps here,
I look forward to knowing enough to return the energy !
. |
|
| Back to top |
|
 |
scottmattes
Joined: 21 May 2007 Posts: 61 Location: USA
|
Posted: Fri Jul 18, 2008 1:50 pm Post subject: |
|
|
I'm glad that I could be of service.
Based on your thoughts, I have changed my hotkey to the following (use #printscreen instead of #p, save/restore all clipboard contents, added hotkey #!printscreen)
| Code: |
;------------------------------------
; Screen Print, Win+printscreen
;------------------------------------
#printscreen:: ; do screen print and paste it into paint
clipboardall_save = %clipboardall%
Send, {PRINTSCREEN}
Run mspaint
WinWait, untitled - Paint,
IfWinNotActive, untitled - Paint, , WinActivate, untitled - Paint,
WinWaitActive, untitled - Paint,
Send, {SHIFTDOWN}{INS}{SHIFTUP}{ENTER}
clipboard = %clipboardall_save%
return
;------------------------------------
; Screen Print, Win+alt+printscreen
;------------------------------------
#!printscreen:: ; do screen print and paste it into paint
clipboardall_save = %clipboardall%
Send, !{PRINTSCREEN}
Run mspaint
WinWait, untitled - Paint,
IfWinNotActive, untitled - Paint, , WinActivate, untitled - Paint,
WinWaitActive, untitled - Paint,
Send, {SHIFTDOWN}{INS}{SHIFTUP}{ENTER}
clipboard = %clipboardall_save%
return
|
_________________ -------------
Scott Mattes |
|
| Back to top |
|
 |
tank
Joined: 21 Dec 2007 Posts: 678
|
|
| Back to top |
|
 |
geor
Joined: 16 Jun 2008 Posts: 45
|
Posted: Sat Jul 19, 2008 5:12 am Post subject: |
|
|
@scottmattes - thx again, will play w/ your new script later this weekend.
@tank - & thx for pointing out sean's approach,
likewise I'll spend some time with it too.
As far as re-labeling my posts "SOLVED",
if I'm jumping the gun then do let me know.
I saw that effect either here, or on MSFN, or both,
& I thought it was a great idea in principle,
'cause it could make each post a better learning tool.
I just wanted to indicate that I had, indeed,
received a satisfactory/workable answer(s) to the question(s) I asked.
It's very cool, metaphysical really ........
someone flings a question out into cyberspace,
& someone else whom the questioner most likely will never physically meet,
comes along & answers/solves the challenge/problem - Amazing
And regarding sean's & others' scripts here ......
I plan to study all of them as closely as I can, as soon as I can.
thx again ..... |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|