Share your favorite FastKeys commands
-
Jim Jaffe
- Posts: 12
- Joined: May 25th, ’20, 13:55
Post
by Jim Jaffe » Jan 3rd, ’24, 13:33
Need help in fixing my command "Window Screen to Paint.net". It is based on the standart command "Window Screen to Paint" with little modification:
Code: Select all
clipsave=%clipboard%
Send, !{PRINTSCREEN}
ClipWait 1
Run, C:\Program Files\paint.net\PaintDotNet.exe
WinWaitActive ahk_exe paintdotnet.exe
Send, ^!v ;Ctrl Alt V
ClipWait 1
clipboard=%clipsave%
When using "Window Screen to Paint.net" command I constantly get "Clipboard doesn't contain an image" message on opening Paint.net for the first time. But when Paint.net is already opened, the command works fine.
-
Tom
- Posts: 849
- Joined: Nov 24th, ’15, 23:39
Post
by Tom » Jan 5th, ’24, 17:50
-
Jim Jaffe
- Posts: 12
- Joined: May 25th, ’20, 13:55
Post
by Jim Jaffe » Jan 6th, ’24, 08:28
I'm sure it's the problem of clipboard handling by the code, because code without
clipsave function works as intended:
Code: Select all
Send, !{PRINTSCREEN}
ClipWait 1
Run, C:\Program Files\paint.net\PaintDotNet.exe
WinWaitActive ahk_exe paintdotnet.exe
Send, ^!v ;Ctrl Alt V
-
Tom
- Posts: 849
- Joined: Nov 24th, ’15, 23:39
Post
by Tom » Jan 6th, ’24, 14:48
-
Jim Jaffe
- Posts: 12
- Joined: May 25th, ’20, 13:55
Post
by Jim Jaffe » Jan 6th, ’24, 19:27
Saving clipboard with clipboardall has no effect.
This is especially odd, because MS Paint works well with default command.
-
Tom
- Posts: 849
- Joined: Nov 24th, ’15, 23:39
Post
by Tom » Jan 6th, ’24, 22:13
Hm, then you can use your script you posted and works. The only difference is that it doesn’t switch back to the original clipboard value after pasting.