11-19-2007, 04:36 PM
Hi,
I have included my code below....and at present it has worked for me.... But has taken an awful lot of trial and error to do the basic things, so i have written comments where i am stuck and in need of some advice.
These comments are in blue
This loops through 5 product codes in Excel which are:
4201
4382
4402
4416
4435
getting 3 images for each product from the suppliers website.
int i ;;declare variable i
i=1
rep
I have used various Controls to try and get what i want e.g. find window control, Find Html element, but don't understand what all the boxes in the dialog represent, and can't find documentation supporting it fully.
So most of this code has been produced by the 'Recorder'
int w1=win("" "Shell_TrayWnd")
lef 588 15 w1
int w2=act(win("Microsoft Excel - Book1" "XLMAIN"))
'Cc
'D
wait 2
lef 977 19 w1
How do i get it to always go to the same webpage, no matter what the last page was that was being viewed??
It appears that it looks for the whole window title, which changes with each product that is displayed, as the product appears in the title
int w3=act(win("Dropship Sex Toys UK - wholesale adult toys - trade sex toys - penthouse - doc johnson - hustle - Windows Internet Explorer pro" "IEFrame"))
err web "http://www.1on1dropship.co.uk/default.asp" 0x1; err
wait 0 I
How do identify and select this element (its the link which takes you to the home page on the website, (a logo with 1on1dropship.co.uk written on it)). I tried using the html element finder, and despite it flashing (to show it's the correct element), something i'm doing is not correct ???
lef 346 230 w3
wait 0 I
lef 889 174 w3
'Cv
'Y
wait 0 I
int w11=act(win("Dropship Sex Toys UK - wholesale adult toys - trade sex toys - penthouse - doc johnson - hustle - Windows Internet Explorer pro" "IEFrame"))
Here i am trying to right click on the image to open the Save box, and could not find a simple way of saving the file down... Any offerings as to what i should do, and how to work around the dialog box ??? (again i use co-orinates which i know are not ideal!)
rig 557 632 w11
wait 1
key s
goto beginning of line and type in file path:
act win("Save Picture" "#32770")
'H "F:\My Documents\My Pictures\Thumbs"
'(255)\Y
What does the (255) mean here ?
Click Thumbnail image to view the next detail
Here i am using co-ordinates, rather than identifying the element, to click on the image so that i can see the next level of product detail.
Here if i use the identify HTML element, it will be specific to the product, and i don't know how to change that for the next product in the loop ???
int w18=act(win("Dropship Sex Toys UK - wholesale adult toys - trade sex toys - penthouse - doc johnson - hustle - Windows Internet Explorer pro" "IEFrame"))
lef 556 613 w18
wait 0 I
Then save next image down
rig 573 623 w18
wait 1
key s
goto beginning of line and type in file path:
act win("Save Picture" "#32770")
'H "F:\My Documents\My Pictures\Detail"
'(255)\Y
Click image to view the FULL size image
Here I'm trying to view the Large jpg image..and the best way i could work it was to open it in a full window as a new 'open link' command, from the right clcik menu on the image.
BUT, i have randomly selected co-ordinates to find the area where the image should appear !!
I then have to click BACKSPACE to get back to the the previous view, else at the beginning of the code (on the next loop), the IE window is not the same title as the one when i click backspace... i know this is all easy steps, once familiar with the language a bit more.
int w19=act(win("Dropship Sex Toys UK - wholesale adult toys - trade sex toys - penthouse - doc johnson - hustle - Windows Internet Explorer pro" "IEFrame"))
rig 586 622 w19
wait 1
key o
wait 2
goto beginning of line and type in file path:
int w99=win("Internet Explorer" "IEFrame")
rig 299 397 w99
's
'H "F:\My Documents\My Pictures\Large"
'(255)\Y
wait 0 I
'B
i+1
if i>4
out "i is > 4"
break ;;exit the loop
out i
I have included my code below....and at present it has worked for me.... But has taken an awful lot of trial and error to do the basic things, so i have written comments where i am stuck and in need of some advice.
These comments are in blue
This loops through 5 product codes in Excel which are:
4201
4382
4402
4416
4435
getting 3 images for each product from the suppliers website.
int i ;;declare variable i
i=1
rep
I have used various Controls to try and get what i want e.g. find window control, Find Html element, but don't understand what all the boxes in the dialog represent, and can't find documentation supporting it fully.
So most of this code has been produced by the 'Recorder'
int w1=win("" "Shell_TrayWnd")
lef 588 15 w1
int w2=act(win("Microsoft Excel - Book1" "XLMAIN"))
'Cc
'D
wait 2
lef 977 19 w1
How do i get it to always go to the same webpage, no matter what the last page was that was being viewed??
It appears that it looks for the whole window title, which changes with each product that is displayed, as the product appears in the title
int w3=act(win("Dropship Sex Toys UK - wholesale adult toys - trade sex toys - penthouse - doc johnson - hustle - Windows Internet Explorer pro" "IEFrame"))
err web "http://www.1on1dropship.co.uk/default.asp" 0x1; err
wait 0 I
How do identify and select this element (its the link which takes you to the home page on the website, (a logo with 1on1dropship.co.uk written on it)). I tried using the html element finder, and despite it flashing (to show it's the correct element), something i'm doing is not correct ???
lef 346 230 w3
wait 0 I
lef 889 174 w3
'Cv
'Y
wait 0 I
int w11=act(win("Dropship Sex Toys UK - wholesale adult toys - trade sex toys - penthouse - doc johnson - hustle - Windows Internet Explorer pro" "IEFrame"))
Here i am trying to right click on the image to open the Save box, and could not find a simple way of saving the file down... Any offerings as to what i should do, and how to work around the dialog box ??? (again i use co-orinates which i know are not ideal!)
rig 557 632 w11
wait 1
key s
goto beginning of line and type in file path:
act win("Save Picture" "#32770")
'H "F:\My Documents\My Pictures\Thumbs"
'(255)\Y
What does the (255) mean here ?
Click Thumbnail image to view the next detail
Here i am using co-ordinates, rather than identifying the element, to click on the image so that i can see the next level of product detail.
Here if i use the identify HTML element, it will be specific to the product, and i don't know how to change that for the next product in the loop ???
int w18=act(win("Dropship Sex Toys UK - wholesale adult toys - trade sex toys - penthouse - doc johnson - hustle - Windows Internet Explorer pro" "IEFrame"))
lef 556 613 w18
wait 0 I
Then save next image down
rig 573 623 w18
wait 1
key s
goto beginning of line and type in file path:
act win("Save Picture" "#32770")
'H "F:\My Documents\My Pictures\Detail"
'(255)\Y
Click image to view the FULL size image
Here I'm trying to view the Large jpg image..and the best way i could work it was to open it in a full window as a new 'open link' command, from the right clcik menu on the image.
BUT, i have randomly selected co-ordinates to find the area where the image should appear !!
I then have to click BACKSPACE to get back to the the previous view, else at the beginning of the code (on the next loop), the IE window is not the same title as the one when i click backspace... i know this is all easy steps, once familiar with the language a bit more.
int w19=act(win("Dropship Sex Toys UK - wholesale adult toys - trade sex toys - penthouse - doc johnson - hustle - Windows Internet Explorer pro" "IEFrame"))
rig 586 622 w19
wait 1
key o
wait 2
goto beginning of line and type in file path:
int w99=win("Internet Explorer" "IEFrame")
rig 299 397 w99
's
'H "F:\My Documents\My Pictures\Large"
'(255)\Y
wait 0 I
'B
i+1
if i>4
out "i is > 4"
break ;;exit the loop
out i