Suggestion: A return_offset value 9 that returns the width and height of the image.
Whilst not actually an offset, I think an exception could be made and it wouldn't be out of place. Also, since the top-left position (return_offset=0) and the bottom-right position (return_offset=4) can be returned, it's an easy calculation of the return values of return_offset 4 minus the return values of return_offset 0.
Return image size in FindImagePos function
Moderators: Dorian (MJT support), JRL
- Dorian (MJT support)
- Automation Wizard
- Posts: 1380
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Return image size in FindImagePos function
That's a very good point!
I'll pass this on to Dev
Yes, we have a Custom Scripting Service. Message me or go here
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Return image size in FindImagePos function
I'm confused. Width and height is always the width and height of the needle image. Which you already know.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Return image size in FindImagePos function
Yes, but the script doesn't...I know you can get the size, programmatically, using an image object on a dialog, but that's a bit convoluted, don't you think? Given that a significant part of MS concerns images, it's odd that it doesn't have a size function, or does it?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Return image size in FindImagePos function
But the needle image is not dynamic. It's created at design time. It's not created at runtime. It's a known quantity. We create all kinds of variables and initialise them at design time. Why not create variables for width and height in the same way. Am I missing something?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: Return image size in FindImagePos function
BTW - I'm not against the idea of a new function which returns the dimensions - and maybe other properties - of an image file. Something like:
GetImageDimensions>filename,height,width
But doesn't make sense to me to make this part of FindImagePos which uses a known needle anyway.
GetImageDimensions>filename,height,width
But doesn't make sense to me to make this part of FindImagePos which uses a known needle anyway.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Return image size in FindImagePos function
..that'll do nicely...