Re: how to use pixelsearch coordinates

"valery_vi" <[email protected]> Thu, 06 Sep 2007 13:47:06 -0000
Newsgroups gmane.comp.windows.autoit.user
Message-ID <[email protected]>
Lol. 

You want to type form. 
It is very easy...

Close your IE window. Check warning window from MS about security to
hide it in future. And start this one.

#include <IE.au3>
$IE = _IECreate()
$URL = "https://investment1s.ameritrade.com/cgi-bin/apps/LogIn"
_IENavigate ($IE, $URL)
Send("+{Tab 2}{Tab 2}")
Send("<Your account>{Tab}<password>{Tab}")

;Here you have to choose a start page
;Send("{Tab}")

;Here you will submit form
;Send("{Enter}")

Now you can replace

<Your account> and <password> to yours and start again.
Try to choose a start page 

;Send("{Down}{Tab}")

If Ok then uncomment the last line.

Note: func _IENavigate waits full load of IE page.

Valery



--- In [email protected], "Jim Mihalski" <speedi@...> wrote:
>
> Valery,
>  
> Thanks so much for your help, but I am just not getting it...
>  
> Here is the code section that isn't working:
> Run('"C:\Program Files\Internet Explorer\IEXPLORE.EXE"
> "https://investment1s.ameritrade.com/cgi-bin/apps/LogIn"'
> <https://investment1s.ameritrade.com/cgi-bin/apps/LogIn> , "",
@SW_MAXIMIZE)
> WinWaitActive("Log on to TD AMERITRADE")
> ;  loop searching a rectangular area for the green color in the
Logon button
> $i = 0
> While Not @error And $i < 1000
>  $coord = PixelSearch(383, 433, 438, 563, 954403, 60, 3)
>  $1 = $i + 1
> WEnd
>  
> I am trying to have the script wait until a green login button
appears on
> the screen so it can send the login....
>  
> Jim
> 
>   _____  
> 
> From: [email protected] [mailto:[email protected]] On
> Behalf Of valery_vi
> Sent: Thursday, September 06, 2007 3:15 AM
> To: [email protected]
> Subject: [AutoIt] Re: how to use pixelsearch coordinates
> 
> 
> 
> 
> Now I'll show how it works for your counter picture 
> 
> Your Counter Picture URL is 
> 
> http://webstats.
>
<http://webstats.web.rcn.net/cgi-bin/Count.cgi?df=speedijim&ft=0&tr=N&dd=C&m
> d=6> web.rcn.net/cgi-bin/Count.cgi?df=speedijim&ft=0&tr=N&dd=C&md=6
> 
> You have to open this link by IE application and after it's openning
> start this script - Show_My_Counter.au3:
> 
> Global $MaxX = 100
> Global $MaxY = 25
> Global $Pix[$MaxX][$MaxY]
> Global $X = 7, $Y = 15
> 
> ClearPix()
> 
> WinActivate( "http://webstats.
> <http://webstats.web.rcn.net/cgi-bin/Count.cgi>
> web.rcn.net/cgi-bin/Count.cgi", "")
> $res = ControlClick ( "http://webstats.
> <http://webstats.web.rcn.net/cgi-bin/Count.cgi>
> web.rcn.net/cgi-bin/Count.cgi",
> "", 'Internet Explorer_Server1', "left", 1, 12, 16)
> $hWndCtrl = ControlGetHandle
> ("http://webstats. <http://webstats.web.rcn.net/cgi-bin/Count.cgi>
> web.rcn.net/cgi-bin/Count.cgi", "", 'Internet
> Explorer_Server1')
> 
> WinActivate($hWndCtrl, "")
> if not WinActive ($hWndCtrl, "") then MsgBox(0,'','Can not Activate')
> 
> ;relative coords to the active window
> Opt('PixelCoordMode',0)
> 
> for $i = 0 to $MaxX-1
> for $j = 0 to $MaxY-1
> if not PixelGetColor ($X+$i, $Y+$j) then 
> $Pix[$i][$j] = '_'
> else
> $Pix[$i][$j] = '8'
> endif
> next
> next
> 
> ShowPix()
> exit
> 
> ;=================
> func ClearPix()
> for $i = 0 to $MaxX-1
> for $j = 0 to $MaxY-1
> $Pix[$i][$j] = ''
> next
> next
> endfunc
> 
> ;=================
> func ShowPix()
> $res = ''
> for $j = 0 to $MaxY-1
> for $i = 0 to $MaxX-1
> $res &= $Pix[$i][$j]
> next
> $res &= @CrLf
> next
> MsgBox(0, '', $res)
> endfunc
> 
> Check bugs. They can be by message wordwraping of this group.
> 
> This script present work with func PixelGetColor. 
> PixelSearch can be used in the same manner.
> 
> Valery
> 
> --- In AutoItList@yahoogro <mailto:AutoItList%40yahoogroups.com>
ups.com,
> "valery_vi" <shehrer1@> wrote:
> >
> > Start Au3Info.exe and open Summary tab. 
> > Summary tab has two line apart from others:
> > 
> > >>>> Control <<<<<
> > ....
> > ControlClick Coords: x,y
> > 
> > It is coordinate mouse pointer relative to control window.
> > 
> > and 
> > 
> > >>>> Mouse <<<<<
> > ....
> > Position: mx, my
> > 
> > It is coordinate mouse pointer relative to screen.
> > 
> > Thus, you can get relative and absolute coordinates of any controls
> > and mouse poiner. 
> > 
> > Your case is html page, so you can search pixel in Rectangle (mx, my,
> > mx+100, my+30) if you know mx, my values.
> > 
> > Valery
> > 
> > 
> > --- In AutoItList@yahoogro <mailto:AutoItList%40yahoogroups.com>
ups.com,
> "Jim Mihalski" <speedi@> wrote:
> > >
> > > I might be thick, but it is not clear to me..
> > > 
> > > How about this to illustrate the coordinates.
> > > 
> > > Go to my racquetball web page:
> > > http://6amplayers. <http://6amplayers.com> com
> > > 
> > > now what would the pixel search coordinates be for the "Visitors"
> > counter
> > > box on the lower right???
> > > 
> > > Thanks for your patience!
> > > 
> > > Best Regards! Jim A.K.A. "Speedi" Allentown, PA
> > > --------------------------------------------
> > > I am not as fast as I once was, but 
> > > I'm as fast as I'll ever be again!
> > > --------------------------------------------
> > > 
> > > 
> > > _____ 
> > > 
> > > From: AutoItList@yahoogro <mailto:AutoItList%40yahoogroups.com>
ups.com
> [mailto:AutoItList@yahoogro <mailto:AutoItList%40yahoogroups.com>
ups.com]
> On
> > > Behalf Of valery_vi
> > > Sent: Wednesday, September 05, 2007 9:17 AM
> > > To: AutoItList@yahoogro <mailto:AutoItList%40yahoogroups.com>
ups.com
> > > Subject: [AutoIt] Re: how to use pixelsearch coordinates
> > > 
> > > 
> > > 
> > > left coordinate of RECTANGLE!
> > > 
> > > The search is scanning this RECTANGLE (left, top, right, bottom)
> > > left-to-right, top-to-bottom and 
> > > returs first match is returned
> > > 
> > > --- In AutoItList@yahoogro <mailto:AutoItList%40yahoogroups.com>
> > ups.com,
> > > "mihalski" <speedi@> wrote:
> > > >
> > > > The help file for pixelsearch shows the parameters being:
> > > > 
> > > > left coordinate
> > > > top coordinate
> > > > right coordinate
> > > > bottom coordinate
> > > > 
> > > > are these coordinates the x and y coordinates??? just x or just y
> > > > 
> > > > It is confusing...
> > > > 
> > > > Thanks! Jim
> > > >
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > [Non-text portions of this message have been removed]
> > >
> >
> 
> 
> 
>  
> 
> 
> [Non-text portions of this message have been removed]
>