
Brickoneer
Active Members-
Posts
87 -
Joined
-
Last visited
Everything posted by Brickoneer
-
InetGet times out after 60 seconds
Brickoneer replied to Brickoneer's topic in AutoIt General Help and Support
Sorry for the delay in testing this out. Switching to the "inetgetinfo loop" method, gives me back an @error of 13, and an @extended 12152. Unfortunately, no amount of searching revealed what these numbers represented. Obviously they're going to be something having to do with a timeout... which is what I'm trying to resolve. Any help would be appreciated! -
As the topic states, I have an InetGet call to a long-ish running script on a website. Unfortunately, the script will sometimes take longer than one minute to complete, and the autoit InetGet function apparently times out. (I'm assuming it is a timeout since it happens after almost exactly 60 seconds) Is there any way to change this timeout to a larger value or remove it altogether? (There was no mention of a timeout in the docs or in my searches, so maybe I'm missing something... I know the long-running web page is not timing out, as I can see it is still running on my server.) Any help would be appreciated. Thanks!
-
It looks like you are trying to search for an image/bitmap on the screen... there is already a thread on this same page with the identical problem, so I'll just quote my reply here as well.
-
Search in the "Example Scripts" section of the forum. There have been several UDF libraries with this kind of functionality (searching for images/bitmaps on the screen) Some are faster than others, others have more features... (like transparency or color variation support)... it depends on what you're trying to do. Hope that helps!
-
I have added the changes you suggested and it still does not manage to stop it when the link leads to something that does not actually exist. (The actual navigate event is fired by the user clicking on the embedded IE, not from the _IEnavigate function) For example, if you run my example in post #4 and click on the "here" link in the embedded browser, the link does not actually exist and so it returns before my _ieaction can fire. Thanks for your help, Brick
-
Thanks for your input! Thats an incredibly simple solution I missed. It works beautifully for regular navigation as I can stop navigation before it actually finds and loads the page... unfortunately it does not work with home-brewed html. The links are not actual complete website urls (see example below) and are thus returned almost immediately...before _IEaction can stop it. I've prepared a little example below to show it not working... commenting out the line that pastes the home-brewed html in there and it mostly works... otherwise it does not. #include <GUIConstants.au3> #include <GUIConstantsEx.au3> #include <IE.au3> #include <WindowsConstants.au3> _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () GUICreate("Embedded Web control Test", 640, 580, _ (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360) $GUI_Button_Back = GUICtrlCreateButton("Back", 10, 420, 100, 30) $GUI_Button_Forward = GUICtrlCreateButton("Forward", 120, 420, 100, 30) $GUI_Button_Home = GUICtrlCreateButton("Home", 230, 420, 100, 30) $GUI_Button_Stop = GUICtrlCreateButton("Stop", 340, 420, 100, 30) GUISetState() _IENavigate ($oIE, "http://www.autoitscript.com") _IEDocWriteHTML($oIE,'<html><body><a href="index.php?showtopic=80001">click here</a></body></html>') $oEvt = ObjEvent($oIE,"IEEvent_","DWebBrowserEvents2") While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $GUI_Button_Home _IENavigate ($oIE, "http://www.autoitscript.com") Case $msg = $GUI_Button_Back _IEAction ($oIE, "back") Case $msg = $GUI_Button_Forward _IEAction ($oIE, "forward") Case $msg = $GUI_Button_Stop _IEAction ($oIE, "stop") EndSelect WEnd GUIDelete() Exit Func IEEvent_BeforeNavigate2($notsurewhatthisis,$url,$TargetFrameName,$PostData,$Headers,$Cancel) _IEAction($oIE,"stop") ConsoleWrite($url&@CR) EndFunc It seems as though objevent does not allow me to intercept events but only be notified when they are sent. If I were intercepting, placing a sleep command in the handling function would actually cause the navigation to stop until I returned it... and it would also allow me to set the $cancel parameter. Is there a way to intercept the event messages instead? thanks for your help. Brick
-
I did some more reading and found an old thread from '05 that confirmed that the event cancel cannot be passed byref, so thats out. Can you guys think of possible workarounds? The content of the embedded IE will probably be home-brewed html pasted in there with _IEdocwritehtml... I'm not sure if that will help or not. Thanks for your help! Brick
-
Here's the idea: I have a embedded IE object that I want to use as a menu. I want to be able to capture the link clicks from this embedded IE so I can process them via autoit and manipulate my GUI accordingly. I got the event capturing working.... (see example below) #include<ie.au3> $oIE = _IECreate("www.google.com") $oEvt = ObjEvent($oIE,"IEEvent_","DWebBrowserEvents2") while 1 sleep(10) wend Func IEEvent_BeforeNavigate2($notsurewhatthisis,$url,$TargetFrameName,$PostData,$Headers, $Cancel) ;;;;; consolewrite($url&@CR) EndFunc ... but now I'm stuck. I can capture the event, but how can I then cancel the navigation so my embedded IE doesn't change? I see the "$cancel" variable passed in the event, but it cannot be passed byref, so I cannot internally cancel the navigation. Any ideas? Thanks, Brick
-
it is quite possible to do what you want... there are several methods for finding "pictures" on the screen. (One that I wrote myself... although its probably not the best out there) Try searching around for it. As for your looping problem, you'd simply want to try something like this: while 1 ;main command $timer_start = timerinit() do ; look for pic sleep(10) until timerdiff($timer_start) > 20000 ; It will look for your pic for 20 seconds (20,000 ms) and then start your main command again. wend
-
VIEWING GENERATED SOURCE OF A WEBPAGE
Brickoneer replied to sumitalllwin's topic in AutoIt General Help and Support
One way would be to write create your own form 'source', put it into the browser (see _IEBodyWriteHTML) and submit your own form. -
This has recently started with Avast! Antivirus as well. I've used it forever without any problem, then a few weeks ago I couldn't compile without it screaming about virii. I get around it by not using UPX compression... it at least doesn't complain now. Brick
-
What I meant by "cut down" was that your cursor in the image was over 935,___ and you limited it to 900. This is restricting your search field farther than what you had in the image. You'd want to expand it to 950 if you wanted to have a add a little fudge-ing room. That may not be the problem... but I'm not sure what is...?
-
pixelsearch should be in the following format: PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] ) Your second example looked correct, although you chopped a bit off of the right and bottom by rounding down instead of up. Also, if that exact pixel color is not present it won't find it. You need to add the shade-variation parameter to give it a bit of tolerance.
-
IE.au3 performance issues
Brickoneer replied to Brickoneer's topic in AutoIt General Help and Support
Ok, here's what I've found. The part that is the actual slowdown is _IEBodyReadText... particularly the line: Return $o_object.document.body.innerText (of course that is basically the entire function right there... but that is the slowdown.) By monitoring the machine, as soon as it goes to the _IEBodyReadText function the IE process hits a constant 99% CPU load, and memory for the IE browser hits 60,000 k. Now it is semi-reliably reading the text in about 8.5 seconds. If I can get it to "break" again I guess I'll be back. Brick [edit] It failed again. I finished typing out this post, clicked over to the IE my script was trying to read and it was frozen, not responding, and locked at 99% CPU. I gave it a few minutes to see if it would recover and it never did. I'm really not sure what the problem is... maybe I should try and do it at a lower level like the HTTP UDF. (I even failed miserably at that... I managed to get the first 2-7 bytes of the webpage html and thats it.) [edit 2] I was wrong. It did manage to pull out. The _IEBodyReadText function took just over 10 minutes to read about 30-40,000 lines of text. -
There are a few things you could do depending on what the situation is... 1) Use the built in formatting functions. Unfortunately there isn't always everything you need. 2) create a Rich Text box... there are a few UDFs floating around you can find. 3) If you want something parsed like IE, you need to use the IE engine. (I mean that you can't have it rendered like a browser would and not using a browser. I've use an _iecreateembedded in several of my programs... I can just alter the html as need be and voila, I get all the formatting I could ever want.)
-
Hey guys, I've been using IE.au3 for just about everything, but for my most recent project I'm having a bit of trouble. My script needs to read the text from a massive (i.e. 40-50 thousand lines of text) webpage. It either reads the entire page in less than 5 seconds, or locks the entire machine up. (It sometimes makes it out of the crash after a few minutes... sometimes not) All I'm using is the basic _IEBodyReadText($oIE)... nothing fancy. Is there something I can do to have it "play" with big webpages "nicer"? Thanks! Brickoneer
-
First of all, I'd like to say thank you to all of you who've worked on this amazing UDF. I've been using this for a while to compile large amounts of collected data into a nice excel sheet that I can view, sort and edit... it works like a dream. Unfortunately, with excessive amounts data it slows down drastically. (several thousand rows by 4-5 columns can take a few minutes to enter into excel.) Can anyone think of a way to enter large amounts of data into excel quickly? (I used the array-to-sheet function as all my data is already in an array... would it be faster to simply use a for loop and a write-cell function?) I thought about parsing it all as a giant string and using Excel's built in Text to Columns feature... but that seemed a bit crude. I figured I'd ask you guys to see if there was a more elegant solution, first. Thanks for your time!
-
There was no source code in the copy I just downloaded.
-
Amazing. I love it. It seems a bit buggy and a tad slow, but overall it is a GREAT start. Is there any way to make the thing where it "pushes" all the windows out of the way optional? From what I've seen the widgets/gadgets only display when the desktop is being viewed... that might be a good feature to emulate. (even if its optional) Or you could even emulate a mac by having the gadget bar appear when the mouse is less than X pixels from the right side of the screen... or have everything be extremely transparent until you move your mouse over it? That way you don't lose monitor "real estate". It doesn't seem to remember what gadgets I have in my settings. If I select 3 of them, then 2, on a restart it brings back all 3. I select a new 3rd one and it restarts with 4 gadgets. Why does the whole thing refresh when you click on the gadget bar? From what I can tell clicking doesn't "do" anything, so why refresh the gadgets? The background color only worked on the first launch... the second launch it was the default "gui-background" color and stayed that way even when I tried to change it. It started working again. :-/ Maybe you could have a little splash loading box for the time when the app is busy. Playing with the settings it had some lengthy pauses where I was left wondering "Is it doing something?" Maybe clicking the "save" button closes the settings gui and displays a little splash "loading..." message in the center of the screen while the sidebar rebuilds? The same goes for the initial startup. That reminds me... the initial startup launched a blank bar and I have to restart the gadgets for them to display. Also, the clock leaves images of itself behind when you drag it. And if the appbar is opaque then you can "see-through" the clock while dragging it. The slideshow doesn't drag correctly. It drags the outline and when the next pic is put in, then it updates the pic location. I'll take a peak at all the includes and such, but is there an easy way to develop our own autoit gadgets? If so, I'll use this a LOT. Those are my first impressions. You have a GREAT tool here with a ton of potential. After the kinks get worked out, I'll almost definitely use this 24/7. Hope that helps! Brick [edit] Sorry for continually adding more... I just keep noticing things as I play with it. If I have time I'll play around with it myself to try and save you some work. This is an amazing tool.
-
Finding a picture/bmp/sprite on the screen
Brickoneer replied to Brickoneer's topic in AutoIt Example Scripts
Thanks! I had fun making it.Any additions/modifications are welcome. -
Hiya. My goal was to make a decently-fast function to find a picture on the screen. (Sprite, bmp, whatever.) The example below runs about 28 milliseconds. If you refine your search more it can be under 20. Searching the entire screen took about 160 milliseconds. (Many things factor into the speed... including the size of the pic, size of the search field, tolerance, and popularity of the first color.) I kept it for my own personal use for a few months, but finally decided to share it. I'm not that great of a programmer, so what I've done is the quickest, sleaziest possible method that I could come up with. WARNING: I KNOW VERY LITTLE ABOUT UDF MAKING... THIS IS JUST A SNIPPET TAKEN FROM MY CODE. ITS PROBABLY FULL OF BUGS AND LEAKS. I DIDN'T MAKE IT USER-FRIENDLY... I ASSUMED THE USER WOULD KNOW HOW TO USE IT. ... just so you guys know. Here is a basic description: It takes in an array of each pixel color (in hex) and finds that on the screen. ;=============================================================================== ; Description: _PixelSearchPic ; Parameter(s): $picture - A 2 dimensional array of the hex colors in your "picture" ; $transparent - The HEX color used as a 'pallate' color. (i.e. the specified color becomes transparent... it skips that color.) ; $ishade - Optional: 0-255 value of the tolerance for the search. WARNING: This magnifies the search time exponentially... use sparingly. ; $xTop - Optional: The x-coord of the top-left corner of the search filed. Default is 0. ; $yTop - Optional: The y-coord of the top-left corner of the search filed. Default is 0. ; $xBottom - Optional: The x-coord of the bottom-right corner of the search filed. Default is @DesktopWidth. ; $yBottom - Optional: The y-coord of the bottom-right corner of the search filed. Default is @DesktopHeight. ; Requirement: ??-Don't know-?? ; Return Value(s): Success: Returns a 2 dimensional array - the x and y coordinates of the upper-left corner of the found picture. ; (For example: If the picture is found starting on pixel 123,124 it will return 123,124 in a 2dim array.) ; Failure: Returns 0 ; Sets @ERROR to: 1 - Picture not found on screen ; 2 - "Picture" passed to function is not array ; 3 - Failed to find beginning pixel in array ; ; Author(s): Many. Compiler of code is Brickoneer... several snippets taken from various others. ;===============================================================================oÝ÷ Ù8Z·§(§&§v¬µæ§w·ö·¬zÒ!j·¡×è¦j¬ºË¢Æ¯z·¬¢êÜzÃh¦§¶)ì*ix-ëæ槩ÞÅæ§v·v)දz¼Åç.¶*'êÞƪº'${¦¦W¢Ú-殶¥¨jwkº{aÂ-Â)eµëaz«¨·z®¢Ø§¶ºÚ"¶Z ¡©Ýën®{ayÊ(اj׬jëh×6#include<pixelsearchpic.au3> Sleep(2000) ;time to let you click over to the autoit homepage. findpic() Func findpic() $now = TimerInit() Local $picture[7][15] $picture[0][0] = 0xCECCCD $picture[0][1] = 0x181818 $picture[0][2] = 0x181818 $picture[0][3] = 0x1F1F1F $picture[0][4] = 0x212121 $picture[0][5] = 0xE6E6E6 $picture[0][6] = 0xE5E5E5 $picture[0][7] = 0xE4E4E4 $picture[0][8] = 0xE4E4E4 $picture[0][9] = 0xE3E3E3 $picture[0][10] = 0x080808 $picture[0][11] = 0x171717 $picture[0][12] = 0x202020 $picture[0][13] = 0x2C2C2C $picture[0][14] = 0xC4C4C4 $picture[1][0] = 0xB1AFB0 $picture[1][1] = 0x1F1F21 $picture[1][2] = 0x4A4A4A $picture[1][3] = 0x606060 $picture[1][4] = 0x626262 $picture[1][5] = 0xE6E6E6 $picture[1][6] = 0xE5E5E5 $picture[1][7] = 0xE4E4E4 $picture[1][8] = 0xE4E4E4 $picture[1][9] = 0xE3E3E3 $picture[1][10] = 0x191919 $picture[1][11] = 0x484848 $picture[1][12] = 0x616161 $picture[1][13] = 0x606060 $picture[1][14] = 0xB8B8B8 $picture[2][0] = 0xB1B0AE $picture[2][1] = 0x2D2F2E $picture[2][2] = 0x868686 $picture[2][3] = 0xE8E8E8 $picture[2][4] = 0xE7E7E7 $picture[2][5] = 0xE7E7E7 $picture[2][6] = 0x8E8E8E $picture[2][7] = 0x505050 $picture[2][8] = 0xE4E4E4 $picture[2][9] = 0xE3E3E3 $picture[2][10] = 0xE2E2E2 $picture[2][11] = 0xE2E2E2 $picture[2][12] = 0x858585 $picture[2][13] = 0x747474 $picture[2][14] = 0xBFBFBF $picture[3][0] = 0xB2B1AF $picture[3][1] = 0x303231 $picture[3][2] = 0x848484 $picture[3][3] = 0xE9E9E9 $picture[3][4] = 0xE7E7E7 $picture[3][5] = 0xDADADA $picture[3][6] = 0x242424 $picture[3][7] = 0x323232 $picture[3][8] = 0xAEAEAE $picture[3][9] = 0xE4E4E4 $picture[3][10] = 0xE2E2E2 $picture[3][11] = 0xE1E1E1 $picture[3][12] = 0x5F5F5F $picture[3][13] = 0x5D5D5D $picture[3][14] = 0xBFBFBF $picture[4][0] = 0xB2B2B2 $picture[4][1] = 0x303133 $picture[4][2] = 0x737373 $picture[4][3] = 0xA0A0A0 $picture[4][4] = 0x868686 $picture[4][5] = 0x494949 $picture[4][6] = 0x2D2D2D $picture[4][7] = 0x696969 $picture[4][8] = 0x6A6A6A $picture[4][9] = 0x8E8E8E $picture[4][10] = 0x7E7E7E $picture[4][11] = 0x797979 $picture[4][12] = 0x3B3B3B $picture[4][13] = 0x575757 $picture[4][14] = 0xBEBEBE $picture[5][0] = 0xB1B1B1 $picture[5][1] = 0x323232 $picture[5][2] = 0x656565 $picture[5][3] = 0x696969 $picture[5][4] = 0x4C4C4C $picture[5][5] = 0x454545 $picture[5][6] = 0xA5A5A5 $picture[5][7] = 0xC5C5C5 $picture[5][8] = 0x656565 $picture[5][9] = 0x5C5C5C $picture[5][10] = 0x4A4A4A $picture[5][11] = 0x404040 $picture[5][12] = 0x4C4C4C $picture[5][13] = 0x696969 $picture[5][14] = 0xC0C0C0 $picture[6][0] = 0xE9E9E9 $picture[6][1] = 0x949494 $picture[6][2] = 0xA1A1A1 $picture[6][3] = 0xA9A9A9 $picture[6][4] = 0xA6A6A6 $picture[6][5] = 0xB4B4B4 $picture[6][6] = 0xE5E5E5 $picture[6][7] = 0xE5E5E5 $picture[6][8] = 0xBBBBBB $picture[6][9] = 0x9D9D9D $picture[6][10] = 0xA2A2A2 $picture[6][11] = 0xA1A1A1 $picture[6][12] = 0xA2A2A2 $picture[6][13] = 0xACACAC $picture[6][14] = 0xDEDEDE ;Search for the pic in a general region where the pic is expected to be. $beginpixel = _PixelSearchPic($picture, 0x00FF00, 0, 120, 100, 350, 215) If @error <> 0 Then ConsoleWrite("Not found in usual spot on 1024x768 screen... searching entire screen..."&@CR) ; It didn't find in the usual spot, search whole screen. $beginpixel = _PixelSearchPic($picture, 0x00FF00, 0) If @error <> 0 Then ConsoleWrite("Not found."&@CR) SetError(1) Return 0 EndIf EndIf $picture = 0 ;No need to be using up extra memory. ConsoleWrite("Time taken: "&TimerDiff($now) &" Milliseconds."& @CR) ConsoleWrite("Found on: "&$beginpixel[0]&" , "&$beginpixel[1] & @CR) Return 1 EndFunc ;==>findpicoÝ÷ Ø̶צ¦Û+zÛ«çZ«Þ¨¡ý¼)eÇ¢wlIæ«r§Ø^z{bëç§j÷«jjÝ{Òh¥+rÝ°Üæ¬x-ëhêÚÇ¢ÊÞjǬ¶§yç^vئyìi¢w§¶&¥+(mççî l¢Ø^¦nªâ·*¶»-rh®+"+µ©íjÌTázj+z)ºV«¶»-rh®Ø^²Z0z¸Â)e®éÓçâ®Ë¢Z+ç²Úy«,¥ªìy«)¢Ë"nWêÞ²×hmæ¥)¶×«êÞËay§-¹©¡×yú+{«çm+"±ë,z{bjYriÊzÉâ¦"¯z}ý¶»§{hj|©®åzk.²)àÖî¶Ø^è¬jÊËaz,²&â+r¡ùò椱©Ýnè,jwl¹ÈSI1ÄH L0CSjëh×6#include-once ;=============================================================================== ; Description: _PixelSearchPic ; Parameter(s): $picture - A 2 dimensional array of the hex colors in your "picture" ; $transparent - The HEX color used as a 'pallate' color. (i.e. the specified color becomes transparent... it skips that color.) ; $ishade - Optional: 0-255 value of the tolerance for the search. WARNING: This magnifies the search time exponentially... use sparingly. ; $xTop - Optional: The x-coord of the top-left corner of the search filed. Default is 0. ; $yTop - Optional: The y-coord of the top-left corner of the search filed. Default is 0. ; $xBottom - Optional: The x-coord of the bottom-right corner of the search filed. Default is @DesktopWidth. ; $yBottom - Optional: The y-coord of the bottom-right corner of the search filed. Default is @DesktopHeight. ; Requirement: ??-Don't know-?? ; Return Value(s): Success: Returns a 2 dimensional array - the x and y coordinates of the upper-left corner of the found picture. ; (For example: If the picture is found starting on pixel 123,124 it will return 123,124 in a 2dim array.) ; Faliure: Returns 0 ; Sets @ERROR to: 1 - Picture not found on screen ; 2 - "Picture" passed to function is not array ; 3 - Failed to find beginning pixel in array ; ; Author(s): Many. Compiler of code is Brickoneer... several snippets taken from various others. ;=============================================================================== Func _PixelSearchPic($picture, $transparent, $ishade = 0, $xTop = 0, $yTop = 0, $xBottom = @DesktopWidth, $yBottom = @DesktopHeight) $trans = $transparent $shade = $ishade Dim $beginpixel[3] $failed = 0 If IsArray($picture) = 0 Then SetError(2) Return 0 EndIf $xbound = UBound($picture, 1) - 1 $ybound = UBound($picture, 2) - 1 For $a = 0 To $xbound For $b = 0 To $ybound If $picture[$a][$b] <> $trans Then $beginpixel[0] = $picture[$a][$b] $beginpixel[1] = $a $beginpixel[2] = $b $foundbeginpixel = 1 ExitLoop (2) EndIf Next Next If $foundbeginpixel = 0 Then SetError(3) Return 0 EndIf $startingpixels = _PixelSearchEx($xTop, $yTop, $xBottom, $yBottom, $beginpixel[0], $ishade) For $pixel = 1 To UBound($startingpixels, 1) - 1 $failed = 0 $xpos = $startingpixels[$pixel][0] - $beginpixel[1] $ypos = $startingpixels[$pixel][1] - $beginpixel[2] $y = 0 $x = 0 For $xtest = $xpos To $xpos + $xbound For $ytest = $ypos To $ypos + $ybound $pixelcolor = PixelGetColor($xtest, $ytest) $mapcolor = $picture[$x][$y] If $pixelcolor <> $mapcolor Then $test = TestTrans($pixelcolor, $mapcolor, $ishade) If $test = 0 Then $nextpixel = 0 ElseIf $test = 1 Then $nextpixel = 1 Else MsgBox(0, "FATAL!", "FATAL ERROR!") Exit EndIf Else $nextpixel = 1 EndIf If $nextpixel = 0 And $picture[$x][$y] <> $trans Then $failed = 1 ExitLoop (2) EndIf $y += 1 Next $y = 0 $x += 1 Next $x = 0 If $failed = 0 Then Dim $returnpixel[2] $returnpixel[0] = $xpos $returnpixel[1] = $ypos Return $returnpixel EndIf Next SetError(1) Return 0 EndFunc ;==>PixelSearchPic Func _PixelSearchEx($xTop, $yTop, $xBottom, $yBottom, $nColor, $ishade = 0, $iStep = 1) Local $aPix, $aCoords, $nYAdd, $iAdd For $xCC = $xTop To $xBottom $nYAdd = 0 While $nYAdd <= $yBottom $aPix = PixelSearch($xCC, $yTop + $nYAdd, $xCC, $yBottom, $nColor, $ishade, $iStep) If Not IsArray($aPix) Then ExitLoop If Not IsArray($aCoords) Then Local $aCoords[1][2] $nYAdd += ($aPix[1] - $yTop) + 1 $iAdd += 1 ReDim $aCoords[$iAdd + 1][2] $aCoords[$iAdd][0] = $aPix[0] $aCoords[$iAdd][1] = $aPix[1] WEnd Next If IsArray($aCoords) Then Return $aCoords Return SetError(1, 0, 0) EndFunc ;==>_PixelSearchEx Func TestTrans($RBG, $pixel, $shade = 0) ; color on screen, color that is saved, shade differnece... 0-255 $mask = BitAND($RBG, 0xff0000) $mask = BitShift($mask, 16) $pix = BitAND($pixel, 0xff0000) $pix = BitShift($pix, 16) $difference = Abs($mask - $pix) If $difference > $shade Then Return 0 EndIf $mask = BitAND($RBG, 0x00ff00) $mask = BitShift($mask, 8) $pix = BitAND($pixel, 0x00ff00) $pix = BitShift($pix, 8) $difference = Abs($mask - $pix) If $difference > $shade Then Return 0 EndIf $mask = BitAND($RBG, 0x0000ff) $pix = BitAND($pixel, 0x0000ff) $difference = Abs($mask - $pix) If $difference > $shade Then Return 0 EndIf Return 1 EndFunc ;==>TestTrans I'm no expert, but I'll try and help out here with any issues that may arise. I'm not sure how much time I can devote to further development though... we'll see. Hope this can help at least one person before all the experts come in and show me up in 3 minutes flat. Hope it helps! Brick pixelsearchpic.au3
-
Start when a site is visited
Brickoneer replied to Malater's topic in AutoIt General Help and Support
well, you can monitor the URL of an IE browser with dale's IE.au3.... there are probably some other clever ways of poking into the browser history. I just thought of something else... if you control the website, you can ask the browser to cache some of the data. Then your program can regularly search the cache for your web site's image or whatever. Its just a brainstorming idea... I'm too tired to think it through right now. -
screen scraping from listviews
Brickoneer replied to Brickoneer's topic in AutoIt General Help and Support
Ah, thanks guys! I haven't gotten the latest version of autoit yet, I'm still using 3.2.8, so I didn't have the GuiListView. I didn't name the application because it isn't a publicly used application. No point. Thanks again! Brick -
I want to make an app that automates another app... but most of the data in the base application is represented in a listview. How can I "get into" the listview to 'read' its data? The wininfo tool gets me the control ID of the listview, but thats as far as I got. I've never had to deal with listviews before. Ugh. Anyway, thanks for your help! Brick [edit] I should say that I DID look for this topic discussed already, but nothing caught my eye. Sorry if this is a repeat!
-
Embedded IE object... get <title>?
Brickoneer replied to RobertKipling's topic in AutoIt General Help and Support
IEPropertyGet should still be able to get the title even if it is embedded.