Discussion:
how to use pixelsearch coordinates
mihalski
2007-09-05 13:08:16 UTC
Permalink
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
valery_vi
2007-09-05 13:16:33 UTC
Permalink
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
Post by mihalski
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
Jim Mihalski
2007-09-05 14:33:12 UTC
Permalink
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.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: ***@yahoogroups.com [mailto:***@yahoogroups.com] On
Behalf Of valery_vi
Sent: Wednesday, September 05, 2007 9:17 AM
To: ***@yahoogroups.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
Post by mihalski
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]
valery_vi
2007-09-06 05:27:49 UTC
Permalink
Start Au3Info.exe and open Summary tab.
Post by Jim Mihalski
Post by mihalski
Control <<<<<
....
ControlClick Coords: x,y

It is coordinate mouse pointer relative to control window.

and
Post by Jim Mihalski
Post by mihalski
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
Post by Jim Mihalski
I might be thick, but it is not clear to me..
How about this to illustrate the coordinates.
http://6amplayers.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!
--------------------------------------------
_____
Behalf Of valery_vi
Sent: Wednesday, September 05, 2007 9:17 AM
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
Post by mihalski
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]
valery_vi
2007-09-06 07:14:38 UTC
Permalink
Now I'll show how it works for your counter picture

Your Counter Picture URL is

http://webstats.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.web.rcn.net/cgi-bin/Count.cgi", "")
$res = ControlClick ( "http://webstats.web.rcn.net/cgi-bin/Count.cgi",
"", 'Internet Explorer_Server1', "left", 1, 12, 16)
$hWndCtrl = ControlGetHandle
("http://webstats.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
Post by valery_vi
Start Au3Info.exe and open Summary tab.
Post by Jim Mihalski
Post by mihalski
Control <<<<<
....
ControlClick Coords: x,y
It is coordinate mouse pointer relative to control window.
and
Post by Jim Mihalski
Post by mihalski
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
Post by Jim Mihalski
I might be thick, but it is not clear to me..
How about this to illustrate the coordinates.
http://6amplayers.com
now what would the pixel search coordinates be for the "Visitors"
counter
Post by Jim Mihalski
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!
--------------------------------------------
_____
Behalf Of valery_vi
Sent: Wednesday, September 05, 2007 9:17 AM
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
ups.com,
Post by Jim Mihalski
Post by mihalski
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]
Aamir Bashir
2007-09-06 07:30:32 UTC
Permalink
Dear Sirs,

who ever is the moderator of this Group kindly Remove me form AutoItList

Best Regards

valery_vi <***@yahoo.co.nz> wrote:

Now I'll show how it works for your counter picture

Your Counter Picture URL is

http://webstats.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.web.rcn.net/cgi-bin/Count.cgi", "")
$res = ControlClick ( "http://webstats.web.rcn.net/cgi-bin/Count.cgi",
"", 'Internet Explorer_Server1', "left", 1, 12, 16)
$hWndCtrl = ControlGetHandle
("http://webstats.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
Post by valery_vi
Start Au3Info.exe and open Summary tab.
Post by Jim Mihalski
Post by mihalski
Control <<<<<
....
ControlClick Coords: x,y
It is coordinate mouse pointer relative to control window.
and
Post by Jim Mihalski
Post by mihalski
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
Post by Jim Mihalski
I might be thick, but it is not clear to me..
How about this to illustrate the coordinates.
http://6amplayers.com
now what would the pixel search coordinates be for the "Visitors"
counter
Post by Jim Mihalski
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!
--------------------------------------------
_____
Behalf Of valery_vi
Sent: Wednesday, September 05, 2007 9:17 AM
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
ups.com,
Post by Jim Mihalski
Post by mihalski
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]
Send instant messages to your online friends http://uk.messenger.yahoo.com

[Non-text portions of this message have been removed]
valery_vi
2007-09-06 08:21:42 UTC
Permalink
Post by Aamir Bashir
Remove me form AutoItList
Read this page, please:

http://help.yahoo.com/l/us/yahoo/groups/original/members/manage/manage-19.html
Post by Aamir Bashir
Dear Sirs,
who ever is the moderator of this Group kindly Remove me form AutoItList
Best Regards
Now I'll show how it works for your counter picture
Your Counter Picture URL is
http://webstats.web.rcn.net/cgi-bin/Count.cgi?df=speedijim&ft=0&tr=N&dd=C&md=6
Post by Aamir Bashir
You have to open this link by IE application and after it's openning
Global $MaxX = 100
Global $MaxY = 25
Global $Pix[$MaxX][$MaxY]
Global $X = 7, $Y = 15
ClearPix()
WinActivate( "http://webstats.web.rcn.net/cgi-bin/Count.cgi", "")
$res = ControlClick ( "http://webstats.web.rcn.net/cgi-bin/Count.cgi",
"", 'Internet Explorer_Server1', "left", 1, 12, 16)
$hWndCtrl = ControlGetHandle
("http://webstats.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
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
Post by valery_vi
Start Au3Info.exe and open Summary tab.
Post by Jim Mihalski
Post by mihalski
Control <<<<<
....
ControlClick Coords: x,y
It is coordinate mouse pointer relative to control window.
and
Post by Jim Mihalski
Post by mihalski
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
Post by Jim Mihalski
I might be thick, but it is not clear to me..
How about this to illustrate the coordinates.
http://6amplayers.com
now what would the pixel search coordinates be for the "Visitors"
counter
Post by Jim Mihalski
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!
--------------------------------------------
_____
Behalf Of valery_vi
Sent: Wednesday, September 05, 2007 9:17 AM
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
ups.com,
Post by Jim Mihalski
Post by mihalski
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]
Send instant messages to your online friends
http://uk.messenger.yahoo.com
Post by Aamir Bashir
[Non-text portions of this message have been removed]
Jim Mihalski
2007-09-06 12:29:22 UTC
Permalink
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: ***@yahoogroups.com [mailto:***@yahoogroups.com] On
Behalf Of valery_vi
Sent: Thursday, September 06, 2007 3:15 AM
To: ***@yahoogroups.com
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
Post by valery_vi
Start Au3Info.exe and open Summary tab.
Post by Jim Mihalski
Post by mihalski
Control <<<<<
....
ControlClick Coords: x,y
It is coordinate mouse pointer relative to control window.
and
Post by Jim Mihalski
Post by mihalski
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
Post by Jim Mihalski
I might be thick, but it is not clear to me..
How about this to illustrate the coordinates.
http://6amplayers. <http://6amplayers.com> com
now what would the pixel search coordinates be for the "Visitors"
counter
Post by Jim Mihalski
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!
--------------------------------------------
_____
[mailto:***@yahoogro <mailto:AutoItList%40yahoogroups.com> ups.com]
On
Post by valery_vi
Post by Jim Mihalski
Behalf Of valery_vi
Sent: Wednesday, September 05, 2007 9:17 AM
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
ups.com,
Post by Jim Mihalski
Post by mihalski
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]
valery_vi
2007-09-06 13:47:06 UTC
Permalink
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
Post by Jim Mihalski
Valery,
Thanks so much for your help, but I am just not getting it...
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)
Post by Jim Mihalski
WinWaitActive("Log on to TD AMERITRADE")
; loop searching a rectangular area for the green color in the Logon button
$i = 0
$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
Post by Jim Mihalski
the screen so it can send the login....
Jim
_____
Behalf Of valery_vi
Sent: Thursday, September 06, 2007 3:15 AM
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
Post by Jim Mihalski
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
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
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
Post by valery_vi
Start Au3Info.exe and open Summary tab.
Post by Jim Mihalski
Post by mihalski
Control <<<<<
....
ControlClick Coords: x,y
It is coordinate mouse pointer relative to control window.
and
Post by Jim Mihalski
Post by mihalski
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
Post by Jim Mihalski
I might be thick, but it is not clear to me..
How about this to illustrate the coordinates.
http://6amplayers. <http://6amplayers.com> com
now what would the pixel search coordinates be for the "Visitors"
counter
Post by Jim Mihalski
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!
--------------------------------------------
_____
On
Post by valery_vi
Post by Jim Mihalski
Behalf Of valery_vi
Sent: Wednesday, September 05, 2007 9:17 AM
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
ups.com,
Post by Jim Mihalski
Post by mihalski
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]
Jim Mihalski
2007-09-06 15:03:16 UTC
Permalink
My largest thanks!!!! Works great!

I see that I need to read about the new commands and functions.... and I
will do that...

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: ***@yahoogroups.com [mailto:***@yahoogroups.com] On
Behalf Of valery_vi
Sent: Thursday, September 06, 2007 9:47 AM
To: ***@yahoogroups.com
Subject: [AutoIt] Re: how to use pixelsearch coordinates



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://investment1
<https://investment1s.ameritrade.com/cgi-bin/apps/LogIn>
s.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
Post by Jim Mihalski
Valery,
Thanks so much for your help, but I am just not getting it...
Run('"C:\Program Files\Internet Explorer\IEXPLORE.EXE"
"https://investment1
<https://investment1s.ameritrade.com/cgi-bin/apps/LogIn>
s.ameritrade.com/cgi-bin/apps/LogIn"'
Post by Jim Mihalski
<https://investment1
<https://investment1s.ameritrade.com/cgi-bin/apps/LogIn>
s.ameritrade.com/cgi-bin/apps/LogIn> , "",
@SW_MAXIMIZE)
Post by Jim Mihalski
WinWaitActive("Log on to TD AMERITRADE")
; loop searching a rectangular area for the green color in the
Logon button
Post by Jim Mihalski
$i = 0
$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
Post by Jim Mihalski
the screen so it can send the login....
Jim
_____
[mailto:***@yahoogro <mailto:AutoItList%40yahoogroups.com> ups.com]
On
Post by Jim Mihalski
Behalf Of valery_vi
Sent: Thursday, September 06, 2007 3:15 AM
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.
<http://webstats.web.rcn.net/cgi-bin/Count.cgi?df=speedijim&ft=0&tr=N&dd=C&m
Post by Jim Mihalski
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
Global $MaxX = 100
Global $MaxY = 25
Global $Pix[$MaxX][$MaxY]
Global $X = 7, $Y = 15
ClearPix()
WinActivate( "http://webstats.
<http://webstats. <http://webstats.web.rcn.net/cgi-bin/Count.cgi>
web.rcn.net/cgi-bin/Count.cgi>
Post by Jim Mihalski
web.rcn.net/cgi-bin/Count.cgi", "")
$res = ControlClick ( "http://webstats.
<http://webstats. <http://webstats.web.rcn.net/cgi-bin/Count.cgi>
web.rcn.net/cgi-bin/Count.cgi>
Post by Jim Mihalski
web.rcn.net/cgi-bin/Count.cgi",
"", 'Internet Explorer_Server1', "left", 1, 12, 16)
$hWndCtrl = ControlGetHandle
("http://webstats. <http://webstats.
<http://webstats.web.rcn.net/cgi-bin/Count.cgi>
web.rcn.net/cgi-bin/Count.cgi>
Post by Jim Mihalski
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
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
Post by valery_vi
Start Au3Info.exe and open Summary tab.
Post by Jim Mihalski
Post by mihalski
Control <<<<<
....
ControlClick Coords: x,y
It is coordinate mouse pointer relative to control window.
and
Post by Jim Mihalski
Post by mihalski
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
Post by Jim Mihalski
I might be thick, but it is not clear to me..
How about this to illustrate the coordinates.
http://6amplayers. <http://6amplayers. <http://6amplayers.com> com>
com
Post by Jim Mihalski
Post by valery_vi
Post by Jim Mihalski
now what would the pixel search coordinates be for the "Visitors"
counter
Post by Jim Mihalski
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!
--------------------------------------------
_____
On
Post by valery_vi
Post by Jim Mihalski
Behalf Of valery_vi
Sent: Wednesday, September 05, 2007 9:17 AM
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
ups.com,
Post by Jim Mihalski
Post by mihalski
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]
[Non-text portions of this message have been removed]
Jim Mihalski
2007-09-06 15:45:26 UTC
Permalink
I'm sorry for one more question.

Running from scite it works great.

When I compile it and run the .exe file, I get "autoit error" Line -1:
Error parsing function call

When I click OK on the error message, it seems to run normally...

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: ***@yahoogroups.com [mailto:***@yahoogroups.com] On
Behalf Of valery_vi
Sent: Thursday, September 06, 2007 9:47 AM
To: ***@yahoogroups.com
Subject: [AutoIt] Re: how to use pixelsearch coordinates



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://investment1
<https://investment1s.ameritrade.com/cgi-bin/apps/LogIn>
s.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
Post by Jim Mihalski
Valery,
Thanks so much for your help, but I am just not getting it...
Run('"C:\Program Files\Internet Explorer\IEXPLORE.EXE"
"https://investment1
<https://investment1s.ameritrade.com/cgi-bin/apps/LogIn>
s.ameritrade.com/cgi-bin/apps/LogIn"'
Post by Jim Mihalski
<https://investment1
<https://investment1s.ameritrade.com/cgi-bin/apps/LogIn>
s.ameritrade.com/cgi-bin/apps/LogIn> , "",
@SW_MAXIMIZE)
Post by Jim Mihalski
WinWaitActive("Log on to TD AMERITRADE")
; loop searching a rectangular area for the green color in the
Logon button
Post by Jim Mihalski
$i = 0
$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
Post by Jim Mihalski
the screen so it can send the login....
Jim
_____
[mailto:***@yahoogro <mailto:AutoItList%40yahoogroups.com> ups.com]
On
Post by Jim Mihalski
Behalf Of valery_vi
Sent: Thursday, September 06, 2007 3:15 AM
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.
<http://webstats.web.rcn.net/cgi-bin/Count.cgi?df=speedijim&ft=0&tr=N&dd=C&m
Post by Jim Mihalski
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
Global $MaxX = 100
Global $MaxY = 25
Global $Pix[$MaxX][$MaxY]
Global $X = 7, $Y = 15
ClearPix()
WinActivate( "http://webstats.
<http://webstats. <http://webstats.web.rcn.net/cgi-bin/Count.cgi>
web.rcn.net/cgi-bin/Count.cgi>
Post by Jim Mihalski
web.rcn.net/cgi-bin/Count.cgi", "")
$res = ControlClick ( "http://webstats.
<http://webstats. <http://webstats.web.rcn.net/cgi-bin/Count.cgi>
web.rcn.net/cgi-bin/Count.cgi>
Post by Jim Mihalski
web.rcn.net/cgi-bin/Count.cgi",
"", 'Internet Explorer_Server1', "left", 1, 12, 16)
$hWndCtrl = ControlGetHandle
("http://webstats. <http://webstats.
<http://webstats.web.rcn.net/cgi-bin/Count.cgi>
web.rcn.net/cgi-bin/Count.cgi>
Post by Jim Mihalski
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
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
Post by valery_vi
Start Au3Info.exe and open Summary tab.
Post by Jim Mihalski
Post by mihalski
Control <<<<<
....
ControlClick Coords: x,y
It is coordinate mouse pointer relative to control window.
and
Post by Jim Mihalski
Post by mihalski
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
Post by Jim Mihalski
I might be thick, but it is not clear to me..
How about this to illustrate the coordinates.
http://6amplayers. <http://6amplayers. <http://6amplayers.com> com>
com
Post by Jim Mihalski
Post by valery_vi
Post by Jim Mihalski
now what would the pixel search coordinates be for the "Visitors"
counter
Post by Jim Mihalski
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!
--------------------------------------------
_____
On
Post by valery_vi
Post by Jim Mihalski
Behalf Of valery_vi
Sent: Wednesday, September 05, 2007 9:17 AM
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
ups.com,
Post by Jim Mihalski
Post by mihalski
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]
[Non-text portions of this message have been removed]
valery_vi
2007-09-07 04:21:11 UTC
Permalink
I suppose that it's line

#include <IE.au3>

File IE.au3 should be placed in folder ..\Include before compilation.

Or you can replace it to

#include "IE.au3"

Then file IE.au3 should be placed in folder @ScriptDir (current
directory of your script) before compilation.

I've compiled this script by Scite and it works fine, though.

Valery
Post by Jim Mihalski
I'm sorry for one more question.
Running from scite it works great.
Error parsing function call
When I click OK on the error message, it seems to run normally...
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!
--------------------------------------------
_____
Behalf Of valery_vi
Sent: Thursday, September 06, 2007 9:47 AM
Subject: [AutoIt] Re: how to use pixelsearch coordinates
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://investment1
<https://investment1s.ameritrade.com/cgi-bin/apps/LogIn>
s.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
Post by Jim Mihalski
Valery,
Thanks so much for your help, but I am just not getting it...
Run('"C:\Program Files\Internet Explorer\IEXPLORE.EXE"
"https://investment1
<https://investment1s.ameritrade.com/cgi-bin/apps/LogIn>
s.ameritrade.com/cgi-bin/apps/LogIn"'
Post by Jim Mihalski
<https://investment1
<https://investment1s.ameritrade.com/cgi-bin/apps/LogIn>
s.ameritrade.com/cgi-bin/apps/LogIn> , "",
@SW_MAXIMIZE)
Post by Jim Mihalski
WinWaitActive("Log on to TD AMERITRADE")
; loop searching a rectangular area for the green color in the
Logon button
Post by Jim Mihalski
$i = 0
$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
Post by Jim Mihalski
the screen so it can send the login....
Jim
_____
On
Post by Jim Mihalski
Behalf Of valery_vi
Sent: Thursday, September 06, 2007 3:15 AM
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.
<http://webstats.web.rcn.net/cgi-bin/Count.cgi?df=speedijim&ft=0&tr=N&dd=C&m
Post by Jim Mihalski
Post by Jim Mihalski
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
Global $MaxX = 100
Global $MaxY = 25
Global $Pix[$MaxX][$MaxY]
Global $X = 7, $Y = 15
ClearPix()
WinActivate( "http://webstats.
<http://webstats. <http://webstats.web.rcn.net/cgi-bin/Count.cgi>
web.rcn.net/cgi-bin/Count.cgi>
Post by Jim Mihalski
web.rcn.net/cgi-bin/Count.cgi", "")
$res = ControlClick ( "http://webstats.
<http://webstats. <http://webstats.web.rcn.net/cgi-bin/Count.cgi>
web.rcn.net/cgi-bin/Count.cgi>
Post by Jim Mihalski
web.rcn.net/cgi-bin/Count.cgi",
"", 'Internet Explorer_Server1', "left", 1, 12, 16)
$hWndCtrl = ControlGetHandle
("http://webstats. <http://webstats.
<http://webstats.web.rcn.net/cgi-bin/Count.cgi>
web.rcn.net/cgi-bin/Count.cgi>
Post by Jim Mihalski
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
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
ups.com,
Post by Jim Mihalski
Post by valery_vi
Start Au3Info.exe and open Summary tab.
Post by Jim Mihalski
Post by mihalski
Control <<<<<
....
ControlClick Coords: x,y
It is coordinate mouse pointer relative to control window.
and
Post by Jim Mihalski
Post by mihalski
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
ups.com,
Post by Jim Mihalski
Post by valery_vi
Post by Jim Mihalski
I might be thick, but it is not clear to me..
How about this to illustrate the coordinates.
http://6amplayers. <http://6amplayers. <http://6amplayers.com> com>
com
Post by Jim Mihalski
Post by valery_vi
Post by Jim Mihalski
now what would the pixel search coordinates be for the "Visitors"
counter
Post by Jim Mihalski
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!
--------------------------------------------
_____
ups.com
ups.com]
Post by Jim Mihalski
On
Post by valery_vi
Post by Jim Mihalski
Behalf Of valery_vi
Sent: Wednesday, September 05, 2007 9:17 AM
ups.com
Post by Jim Mihalski
Post by valery_vi
Post by Jim Mihalski
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
ups.com,
Post by Jim Mihalski
Post by mihalski
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]
[Non-text portions of this message have been removed]
valery_vi
2007-09-07 04:44:04 UTC
Permalink
Jim,

BTW. Since you are biker, I want to add links to Russian biker
meeting's album. It was near my current location (June 2007).

http://www.bikerov.net/photo/thumbnails.php?album=78
http://www.bikerov.net/photo/thumbnails.php?album=78&page=2

Valery
Post by valery_vi
I suppose that it's line
#include <IE.au3>
File IE.au3 should be placed in folder ..\Include before compilation.
Or you can replace it to
#include "IE.au3"
directory of your script) before compilation.
I've compiled this script by Scite and it works fine, though.
Valery
Post by Jim Mihalski
I'm sorry for one more question.
Running from scite it works great.
When I compile it and run the .exe file, I get "autoit error"
Error parsing function call
When I click OK on the error message, it seems to run normally...
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!
--------------------------------------------
_____
Behalf Of valery_vi
Sent: Thursday, September 06, 2007 9:47 AM
Subject: [AutoIt] Re: how to use pixelsearch coordinates
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://investment1
<https://investment1s.ameritrade.com/cgi-bin/apps/LogIn>
s.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
ups.com,
Post by Jim Mihalski
Post by Jim Mihalski
Valery,
Thanks so much for your help, but I am just not getting it...
Run('"C:\Program Files\Internet Explorer\IEXPLORE.EXE"
"https://investment1
<https://investment1s.ameritrade.com/cgi-bin/apps/LogIn>
s.ameritrade.com/cgi-bin/apps/LogIn"'
Post by Jim Mihalski
<https://investment1
<https://investment1s.ameritrade.com/cgi-bin/apps/LogIn>
s.ameritrade.com/cgi-bin/apps/LogIn> , "",
@SW_MAXIMIZE)
Post by Jim Mihalski
WinWaitActive("Log on to TD AMERITRADE")
; loop searching a rectangular area for the green color in the
Logon button
Post by Jim Mihalski
$i = 0
$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
Post by Jim Mihalski
the screen so it can send the login....
Jim
_____
ups.com
ups.com]
Post by Jim Mihalski
On
Post by Jim Mihalski
Behalf Of valery_vi
Sent: Thursday, September 06, 2007 3:15 AM
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.
<http://webstats.web.rcn.net/cgi-bin/Count.cgi?df=speedijim&ft=0&tr=N&dd=C&m
Post by valery_vi
Post by Jim Mihalski
Post by Jim Mihalski
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
Global $MaxX = 100
Global $MaxY = 25
Global $Pix[$MaxX][$MaxY]
Global $X = 7, $Y = 15
ClearPix()
WinActivate( "http://webstats.
<http://webstats. <http://webstats.web.rcn.net/cgi-bin/Count.cgi>
web.rcn.net/cgi-bin/Count.cgi>
Post by Jim Mihalski
web.rcn.net/cgi-bin/Count.cgi", "")
$res = ControlClick ( "http://webstats.
<http://webstats. <http://webstats.web.rcn.net/cgi-bin/Count.cgi>
web.rcn.net/cgi-bin/Count.cgi>
Post by Jim Mihalski
web.rcn.net/cgi-bin/Count.cgi",
"", 'Internet Explorer_Server1', "left", 1, 12, 16)
$hWndCtrl = ControlGetHandle
("http://webstats. <http://webstats.
<http://webstats.web.rcn.net/cgi-bin/Count.cgi>
web.rcn.net/cgi-bin/Count.cgi>
Post by Jim Mihalski
web.rcn.net/cgi-bin/Count.cgi", "", 'Internet
Explorer_Server1')
WinActivate($hWndCtrl, "")
if not WinActive ($hWndCtrl, "") then MsgBox(0,'','Can not
Activate')
Post by valery_vi
Post by Jim Mihalski
Post by Jim Mihalski
;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
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
ups.com,
Post by Jim Mihalski
Post by valery_vi
Start Au3Info.exe and open Summary tab.
Post by Jim Mihalski
Post by mihalski
Control <<<<<
....
ControlClick Coords: x,y
It is coordinate mouse pointer relative to control window.
and
Post by Jim Mihalski
Post by mihalski
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,
Post by Jim Mihalski
Post by Jim Mihalski
Post by valery_vi
mx+100, my+30) if you know mx, my values.
Valery
ups.com,
Post by Jim Mihalski
Post by valery_vi
Post by Jim Mihalski
I might be thick, but it is not clear to me..
How about this to illustrate the coordinates.
http://6amplayers. <http://6amplayers. <http://6amplayers.com>
com>
Post by Jim Mihalski
com
Post by Jim Mihalski
Post by valery_vi
Post by Jim Mihalski
now what would the pixel search coordinates be for the
"Visitors"
Post by valery_vi
Post by Jim Mihalski
Post by Jim Mihalski
Post by valery_vi
counter
Post by Jim Mihalski
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!
--------------------------------------------
_____
ups.com
ups.com]
Post by Jim Mihalski
On
Post by valery_vi
Post by Jim Mihalski
Behalf Of valery_vi
Sent: Wednesday, September 05, 2007 9:17 AM
ups.com
Post by Jim Mihalski
Post by valery_vi
Post by Jim Mihalski
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
ups.com,
Post by Jim Mihalski
Post by mihalski
left coordinate
top coordinate
right coordinate
bottom coordinate
are these coordinates the x and y coordinates??? just x or
just y
Post by Jim Mihalski
Post by Jim Mihalski
Post by valery_vi
Post by Jim Mihalski
Post by mihalski
It is confusing...
Thanks! Jim
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
Jim Mihalski
2007-09-07 09:27:05 UTC
Permalink
those are wild and crazy bikes they have!!!

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: ***@yahoogroups.com [mailto:***@yahoogroups.com] On
Behalf Of valery_vi
Sent: Friday, September 07, 2007 12:44 AM
To: ***@yahoogroups.com
Subject: [AutoIt] Re: how to use pixelsearch coordinates



Jim,

BTW. Since you are biker, I want to add links to Russian biker
meeting's album. It was near my current location (June 2007).

http://www.bikerov. <http://www.bikerov.net/photo/thumbnails.php?album=78>
net/photo/thumbnails.php?album=78
http://www.bikerov.
<http://www.bikerov.net/photo/thumbnails.php?album=78&page=2>
net/photo/thumbnails.php?album=78&page=2

Valery
Post by valery_vi
I suppose that it's line
#include <IE.au3>
File IE.au3 should be placed in folder ..\Include before compilation.
Or you can replace it to
#include "IE.au3"
directory of your script) before compilation.
I've compiled this script by Scite and it works fine, though.
Valery
Post by Jim Mihalski
I'm sorry for one more question.
Running from scite it works great.
When I compile it and run the .exe file, I get "autoit error"
Error parsing function call
When I click OK on the error message, it seems to run normally...
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!
--------------------------------------------
_____
[mailto:***@yahoogro <mailto:AutoItList%40yahoogroups.com> ups.com]
On
Post by valery_vi
Post by Jim Mihalski
Behalf Of valery_vi
Sent: Thursday, September 06, 2007 9:47 AM
Subject: [AutoIt] Re: how to use pixelsearch coordinates
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://investment1
<https://investment1
<https://investment1s.ameritrade.com/cgi-bin/apps/LogIn>
s.ameritrade.com/cgi-bin/apps/LogIn>
Post by valery_vi
Post by Jim Mihalski
s.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
ups.com,
Post by Jim Mihalski
Post by Jim Mihalski
Valery,
Thanks so much for your help, but I am just not getting it...
Run('"C:\Program Files\Internet Explorer\IEXPLORE.EXE"
"https://investment1
<https://investment1
<https://investment1s.ameritrade.com/cgi-bin/apps/LogIn>
s.ameritrade.com/cgi-bin/apps/LogIn>
Post by valery_vi
Post by Jim Mihalski
s.ameritrade.com/cgi-bin/apps/LogIn"'
Post by Jim Mihalski
<https://investment1
<https://investment1
<https://investment1s.ameritrade.com/cgi-bin/apps/LogIn>
s.ameritrade.com/cgi-bin/apps/LogIn>
Post by valery_vi
Post by Jim Mihalski
s.ameritrade.com/cgi-bin/apps/LogIn> , "",
@SW_MAXIMIZE)
Post by Jim Mihalski
WinWaitActive("Log on to TD AMERITRADE")
; loop searching a rectangular area for the green color in the
Logon button
Post by Jim Mihalski
$i = 0
$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
Post by Jim Mihalski
the screen so it can send the login....
Jim
_____
ups.com
ups.com]
Post by Jim Mihalski
On
Post by Jim Mihalski
Behalf Of valery_vi
Sent: Thursday, September 06, 2007 3:15 AM
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.
<http://webstats.
<http://webstats.web.rcn.net/cgi-bin/Count.cgi?df=speedijim&ft=0&tr=N&dd=C&m
Post by valery_vi
web.rcn.net/cgi-bin/Count.cgi?df=speedijim&ft=0&tr=N&dd=C&m
Post by Jim Mihalski
Post by Jim Mihalski
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
Global $MaxX = 100
Global $MaxY = 25
Global $Pix[$MaxX][$MaxY]
Global $X = 7, $Y = 15
ClearPix()
WinActivate( "http://webstats.
<http://webstats. <http://webstats.
<http://webstats.web.rcn.net/cgi-bin/Count.cgi>
web.rcn.net/cgi-bin/Count.cgi>
Post by valery_vi
Post by Jim Mihalski
web.rcn.net/cgi-bin/Count.cgi>
Post by Jim Mihalski
web.rcn.net/cgi-bin/Count.cgi", "")
$res = ControlClick ( "http://webstats.
<http://webstats. <http://webstats.
<http://webstats.web.rcn.net/cgi-bin/Count.cgi>
web.rcn.net/cgi-bin/Count.cgi>
Post by valery_vi
Post by Jim Mihalski
web.rcn.net/cgi-bin/Count.cgi>
Post by Jim Mihalski
web.rcn.net/cgi-bin/Count.cgi",
"", 'Internet Explorer_Server1', "left", 1, 12, 16)
$hWndCtrl = ControlGetHandle
("http://webstats. <http://webstats.
<http://webstats. <http://webstats.web.rcn.net/cgi-bin/Count.cgi>
web.rcn.net/cgi-bin/Count.cgi>
Post by valery_vi
Post by Jim Mihalski
web.rcn.net/cgi-bin/Count.cgi>
Post by Jim Mihalski
web.rcn.net/cgi-bin/Count.cgi", "", 'Internet
Explorer_Server1')
WinActivate($hWndCtrl, "")
if not WinActive ($hWndCtrl, "") then MsgBox(0,'','Can not
Activate')
Post by valery_vi
Post by Jim Mihalski
Post by Jim Mihalski
;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
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
ups.com,
Post by Jim Mihalski
Post by valery_vi
Start Au3Info.exe and open Summary tab.
Post by Jim Mihalski
Post by mihalski
Control <<<<<
....
ControlClick Coords: x,y
It is coordinate mouse pointer relative to control window.
and
Post by Jim Mihalski
Post by mihalski
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,
Post by Jim Mihalski
Post by Jim Mihalski
Post by valery_vi
mx+100, my+30) if you know mx, my values.
Valery
ups.com,
Post by Jim Mihalski
Post by valery_vi
Post by Jim Mihalski
I might be thick, but it is not clear to me..
How about this to illustrate the coordinates.
http://6amplayers. <http://6amplayers. <http://6amplayers.
<http://6amplayers.com> com>
Post by valery_vi
com>
Post by Jim Mihalski
com
Post by Jim Mihalski
Post by valery_vi
Post by Jim Mihalski
now what would the pixel search coordinates be for the
"Visitors"
Post by valery_vi
Post by Jim Mihalski
Post by Jim Mihalski
Post by valery_vi
counter
Post by Jim Mihalski
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!
--------------------------------------------
_____
ups.com
ups.com]
Post by Jim Mihalski
On
Post by valery_vi
Post by Jim Mihalski
Behalf Of valery_vi
Sent: Wednesday, September 05, 2007 9:17 AM
ups.com
Post by Jim Mihalski
Post by valery_vi
Post by Jim Mihalski
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
ups.com,
Post by Jim Mihalski
Post by mihalski
left coordinate
top coordinate
right coordinate
bottom coordinate
are these coordinates the x and y coordinates??? just x or
just y
Post by Jim Mihalski
Post by Jim Mihalski
Post by valery_vi
Post by Jim Mihalski
Post by mihalski
It is confusing...
Thanks! Jim
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]

Petr Dyntar
2007-09-05 13:25:22 UTC
Permalink
Hi Jim,
it does not works like x and y
imagine square,5x5


OOOOO
OOOOO
OOOOO
OOOOO
OOOOO

now, left 1 top 1 right 1 bottom 1 will be like

OOOOO
OXXXO
OXXXO
OXXXO
OOOOO

where X is the scanned area:)

got it? it is searching within the square
Petr


-----Original Message-----
From: ***@yahoogroups.com [mailto:***@yahoogroups.com]On Behalf Of mihalski
Sent: Wednesday, September 05, 2007 3:08 PM
To: ***@yahoogroups.com
Subject: [Disarmed] [AutoIt] how to use pixelsearch coordinates



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]
Loading...