darklordreturns Posted May 16, 2010 Share Posted May 16, 2010 Hi I am new to auto it.I already taken many screen shots of specific region a browser i.e. Picture1(454,452,530,466) , Picture2 (69,868,126,882), Picture3 (256,868,316,882).with Pixel Search when script identify the picture is that possible to set numeric value to pictures to perform math operation? if possibleI want to give Picture1 numeric value 8picture2 numeric value 4picture3 numeric value 1math operation is like this picture1 numeric value + picture2 numeric value +picture3 numeric value i.e. (8+4+1)=13now i want to perform certain action if total numeric value of 3 pictures lees than 9 and greater than 11 i.e (9,10,11) then perform a action. if the total numeric value less than 9 and greater than 11 i.e.(5,6,7,8,12,13,14) then perform another action.Is that possible?Image link of the browser.http://www.mediafire.com/imageview.php?quickkey=w1yylydumvy&thumb=4 Link to comment Share on other sites More sharing options...
GEOSoft Posted May 16, 2010 Share Posted May 16, 2010 $Picture1_value = 8 $picture2_value = 4 $picture3_value = 1 $iTotal = $Picture1_value + $picture2_value + $picture3_value Switch $iTotal Case 9, 10, 11 _Function1() Case Else _Function2() EndSwitch George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
darklordreturns Posted May 16, 2010 Author Share Posted May 16, 2010 Thank you so it can be done. Link to comment Share on other sites More sharing options...
GEOSoft Posted May 16, 2010 Share Posted May 16, 2010 It's only a math function, so yes it can be done, with the Switch statement working on the math result George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
junkew Posted May 17, 2010 Share Posted May 17, 2010 (edited) To me it looks like a browser so search for firefox in this forum ff.au3 if i am right http://www.autoitscript.com/forum/index.php?showtopic=95595&hl=firefox&st=0 Then you have direct access to the html itself. Use internet explorer to get to EBAY then with the browser objects you definitively will have access to the hmtl content Other way is to search for MSAA which is also capable of recognizing some of the html controls and getting the text directly The hard way is with http://www.autoitscript.com/forum/index.php?showtopic=66545 1. First store 10 pictures of 0-9 with grey background 2. Then store 10 pictures of 0-9 with white background 3. Then store all other characters you want to recognize (so lets assume another six) Algorithm then to implement Capture region 1 to region.bmp for each picture in all 26 pictures x=findbmp(region.bmp,picture) if x = true then we have a match else next end if next for Capture region 2 to region.bmp for each picture in all 26 pictures x=findbmp(region.bmp,picture) if x = true then we have a match else next end if next for Capture region 3 to region.bmp for each picture in all 26 pictures x=findbmp(region.bmp,picture) if x = true then we have a match else next end if next for Edited May 17, 2010 by junkew FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
darklordreturns Posted May 18, 2010 Author Share Posted May 18, 2010 thanks junkew. now i know what to do. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now