Search found 116 matches
- 27 Dec 2022, 06:27
- Forum: Scripts and Functions (v1)
- Topic: Screen clipping
- Replies: 307
- Views: 137983
Re: Screen clipping
I added to this function as mentioned in previous post. I also tried to swap the width and height of the second monitor but it doesn't work as well. dip_BitmapFromScreen(Screen=0, Raster="") { if (Screen = 0) { Sysget, x, 76 Sysget, y, 77 Sysget, w, 78 Sysget, h, 79 } else if (SubStr(Screen, 1, 5) =...
- 27 Dec 2022, 05:48
- Forum: Scripts and Functions (v1)
- Topic: Screen clipping
- Replies: 307
- Views: 137983
Re: Screen clipping
Added to the code above cases if second monitor is on the left, top or bottom of the first one. Unfortunately, I couldn't make it work. Do you mean the first If with "the code above"? This is my monitors' layout. My second monitor is rotated 90 degree so I tried swapping its width and height as wel...
- 27 Dec 2022, 02:35
- Forum: Ask for Help (v1)
- Topic: Web browser stops loading for a site
- Replies: 12
- Views: 844
Re: Web browser stops loading for a site
The getrect gives me this error. I don't understand why setrect doesn't move the window to the desired position (as obtained from Window Spy). image.png This does not move the window to the middle of the screen (not any coordinate is correct). w := 509 h := 728 x := A_ScreenWidth/2 ; y := A_ScreenHe...
- 27 Dec 2022, 00:32
- Forum: Ask for Help (v1)
- Topic: Is there any command line to open an existing image with Snip & Sketch?
- Replies: 16
- Views: 1084
Re: Is there any command line to open an existing image with Snip & Sketch?
I successfully added to the screen clip program. Thank everyone for the help. I don't understand all the code now but I'll try when I get better at this. Didn't know if this function was possible. It is working nice at least for now.
- 26 Dec 2022, 22:30
- Forum: Ask for Help (v1)
- Topic: Is there any command line to open an existing image with Snip & Sketch?
- Replies: 16
- Views: 1084
Re: Is there any command line to open an existing image with Snip & Sketch?
Sorry, you're right. I forgot that it opened an existing image instead of one from clipboard. let me try to modify it to my screen clip. EDIT: I added this one on the top to open image from clipboard and it works very nice except that I need to manually create an image named "clip.png" first myself....
- 26 Dec 2022, 22:18
- Forum: Scripts and Functions (v1)
- Topic: Screen clipping
- Replies: 307
- Views: 137983
Re: Screen clipping
My second monitor is on the left of the first one. How should I modify that?Note: This is supposed to work only if the second monitor is aligned to the right of first one!
- 26 Dec 2022, 22:16
- Forum: Ask for Help (v1)
- Topic: Is there any command line to open an existing image with Snip & Sketch?
- Replies: 16
- Views: 1084
Re: Is there any command line to open an existing image with Snip & Sketch?
Somehow I always get the asynciInfo status error.
- 26 Dec 2022, 10:05
- Forum: Ask for Help (v1)
- Topic: Is there any command line to open an existing image with Snip & Sketch?
- Replies: 16
- Views: 1084
- 26 Dec 2022, 09:04
- Forum: Scripts and Functions (v1)
- Topic: Screen clipping
- Replies: 307
- Views: 137983
Re: Screen clipping
I got it from this by rommmcek . x*=round(x*secondMonWidth/firstMonWidth), y*=round(y*secondMonHight/firstMonHight) Use the regular assignment operator := instead. Do you mean something like this? firstMonWidth := 3480 firstMonHight := 2160 secondMonWidth:= 1920 secondMonHight:= 1080 x*=round(x*firs...
- 26 Dec 2022, 08:25
- Forum: Ask for Help (v1)
- Topic: Is there any command line to open an existing image with Snip & Sketch?
- Replies: 16
- Views: 1084
Re: Is there any command line to open an existing image with Snip & Sketch?
You can look here how to call StorageFileAsync := Windows.Storage.StorageFile.GetFileFromPathAsync(imagepath) https://www.autohotkey.com/boards/viewtopic.php?style=19&t=97450 CreateClass("Windows.Storage.StorageFile", IStorageFileStatics := "{5984C710-DAF2-43C8-8BB4-A4D3EACFD03F}", StorageFileStati...
- 26 Dec 2022, 08:08
- Forum: Scripts and Functions (v1)
- Topic: Screen clipping
- Replies: 307
- Views: 137983
Re: Screen clipping
I just tried to set the second monitor scale to 150% (from 100% initially) and it works. So the problem is due to different scaling between the first and second monitors. One thing I don't understand is that if I remove DPIScale it doesn't work for second monitor with scale of 100%.
- 26 Dec 2022, 07:38
- Forum: Scripts and Functions (v1)
- Topic: Screen clipping
- Replies: 307
- Views: 137983
Re: Screen clipping
I added this line but now the capture regions become all black.
Code: Select all
x*=round(x*1920/3840), y*=round(y*1080/2160) ; <<<<<< This is the line added
- 23 Dec 2022, 19:32
- Forum: Scripts and Functions (v1)
- Topic: Screen clipping
- Replies: 307
- Views: 137983
Re: Screen clipping
I don't have that PC here so I can't check it now but if I select a region in the middle of the second monitor, it would capture the region in the bottom instead.Off how much and in which direction?
So it is offset vertically quite large.
- 23 Dec 2022, 18:20
- Forum: Scripts and Functions (v1)
- Topic: Screen clipping
- Replies: 307
- Views: 137983
Re: Screen clipping
Thanks, this is my monitors' information: First monitor: 4K UHD 3840 x 2160 with zoom scale of 150%. Second monitor: 1920 x 1080(FHD) ScreenRotate 90-degree Pivot mode with no scale. The program works fine on the first monitor but the rectangle offset is off on the second monitor. I'll try your solu...
- 22 Dec 2022, 07:49
- Forum: Ask for Help (v1)
- Topic: Is there any command line to open an existing image with Snip & Sketch?
- Replies: 16
- Views: 1084
Re: Is there any command line to open an existing image with Snip & Sketch?
As I'm going to use this for screen clipping which was written long time ago so I don't think that I can convert that to v2.
- 22 Dec 2022, 07:31
- Forum: Ask for Help (v1)
- Topic: Is there any command line to open an existing image with Snip & Sketch?
- Replies: 16
- Views: 1084
Re: Is there any command line to open an existing image with Snip & Sketch?
Thanks, would there is an easy way to make it work for AHK v1?
- 22 Dec 2022, 05:41
- Forum: Ask for Help (v1)
- Topic: Is there any command line to open an existing image with Snip & Sketch?
- Replies: 16
- Views: 1084
Re: Is there any command line to open an existing image with Snip & Sketch?
There is one small problem is that sometimes it opens image to edit when it is not ready.
I guess it's because Gdip_SaveBitmapToFile(pBitmap, image) hasn't finished yet.
How can I solve this?
Adding Sleep 0.2 seems to work but I wonder what is the best way to solve this.
I guess it's because Gdip_SaveBitmapToFile(pBitmap, image) hasn't finished yet.
How can I solve this?
Adding Sleep 0.2 seems to work but I wonder what is the best way to solve this.
- 22 Dec 2022, 04:33
- Forum: Ask for Help (v1)
- Topic: Is there any command line to open an existing image with Snip & Sketch?
- Replies: 16
- Views: 1084
Re: Is there any command line to open an existing image with Snip & Sketch?
Thanks, this alone works very nice.
I'll try if I can adapt it to the screen clipping.
EDIT: I just copied it to the screen clipping and it works great.
I'll try if I can adapt it to the screen clipping.
EDIT: I just copied it to the screen clipping and it works great.
- 22 Dec 2022, 02:28
- Forum: Scripts and Functions (v1)
- Topic: Screen clipping
- Replies: 307
- Views: 137983
Re: Screen clipping
@Tank: Sounds like you have different resolution on second monitor or probably vertical orientation (portrait). Solution would be to scale the coordinates for capturing, adding x*=round(x*secondMonWidth/firstMonWidth), y*=round(y*secondMonHight/firstMonHight) before penultimate block/paragraph of t...
- 22 Dec 2022, 01:15
- Forum: Ask for Help (v1)
- Topic: Is there any command line to open an existing image with Snip & Sketch?
- Replies: 16
- Views: 1084
Is there any command line to open an existing image with Snip & Sketch?
Is there any command line to open an existing image with Snip & Sketch? Or better if you could open Snip & Sketch and paste an image from clipboard to Snip & Sketch. For the context: I'm using the screen clip and I want to open it with Snip & Sketch instead of Paint. https://www.autohotkey.com/board...