Problem with PictureObj.Stretch(Width, Height)
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2010
10:41 PM
03-25-2010
10:41 PM
Problem with PictureObj.Stretch(Width, Height)
HI,
I want use this picture methods "stretch" PictureObj.Stretch(Width, Height) in TestComplete5 with VBscript like this:
Set ObrazokObj = Sys.Desktop.Picture
ObrazokObj.Stretch(800,800)
ObrazokObj.SaveToFile("D:\plocha.png")
But I cant run the script, because I got this error:
Syntax error
At "
ObrazokObj.Stretch(800,800)
O"
error 100:Syntax error while processing ",".
I don't understand why, can you pls write me how Can I change this methods of picture ? or other oportunity how to reduce size of image ? (I dont want use PictureObj.size)
I want use this picture methods "stretch" PictureObj.Stretch(Width, Height) in TestComplete5 with VBscript like this:
Set ObrazokObj = Sys.Desktop.Picture
ObrazokObj.Stretch(800,800)
ObrazokObj.SaveToFile("D:\plocha.png")
But I cant run the script, because I got this error:
Syntax error
At "
ObrazokObj.Stretch(800,800)
O"
error 100:Syntax error while processing ",".
I don't understand why, can you pls write me how Can I change this methods of picture ? or other oportunity how to reduce size of image ? (I dont want use PictureObj.size)
3 REPLIES 3
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-25-2010
11:46 PM
03-25-2010
11:46 PM
Change your code to the following:
I'm no VB expert but IIRC, if you're calling a method on an object, you need to preface the line with "Call". The above works fine.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Set ObrazokObj = Sys.Desktop.Picture
Call ObrazokObj.Stretch(800, 800)
Call ObrazokObj.SaveToFile("D:\plocha.png")
I'm no VB expert but IIRC, if you're calling a method on an object, you need to preface the line with "Call". The above works fine.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2010
12:37 AM
03-26-2010
12:37 AM
Hi Matus,
As Robert said, you need to call the Stretch method by using the Call statement. However, you can also call the method in the following way:
I recommend that you read the MSDN 'Call Statement' article for more information.
--
Dmitry Nikolaev
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Dmitry Nikolaev
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2010
06:41 PM
03-29-2010
06:41 PM
Thank you very much,
I don't see this mistake and 2 my frineds too 😄 other point of view everytime help.
I don't see this mistake and 2 my frineds too 😄 other point of view everytime help.
