Sign in to follow this  
Followers 0
Asakor

Windows Scrolling or PixelFind

8 posts in this topic

#1 ·  Posted (edited)

Short and sweet. Basically is there a way to window scroll your window X amount of pixels up or down?

Without: Spacebar, Down/Up arrows.

Looking for a cmd line to move a window by how many pixels

Edited by Asakor

Share this post


Link to post
Share on other sites



Asakor,

Welcome to the AutoIt forum. :huh2:

Look at _GUIScrollBars_ScrollWindow in the Help file. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Thanks for the warm welcome, and fast response.

I am very new to coding, only getting by on what I have taught myself.

From what I undertand, is that the WindowsScrolling on AutoIt doesnot go by pixels only by objects

What I am trying to do is move a webpage up (scroll) an exact amount up, then continue my coding.

In the Help Tool, I am getting lost in advance coding I dont really understand. Anyway where you can break it down for me?

Thanks again for the fast response and continued efforts :huh2:

Share this post


Link to post
Share on other sites

Asakor,

WindowsScrolling on AutoIt doesnot go by pixels only by objects

True, but as far as I know it is a Windows limitation that only allows you to scroll GUIs in character height/width units - AutoIt uses the Windows API and so can do no more than Windows allows. :huh2:

Perhaps if you showed the code you have so far then we might be able to offer more relevant help. For example, if you are trying to automate controls on a webpage then there are other ways to do it than scrolling an exact number of pixels. ;)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Posted Image

Dim $Running

$Running = True
HotKeySet ("{F1}", "Stop")


While ($Running = True)
WinWaitActive("4walled - Google Chrome","")
MouseClick("left",63,339,1)
;Center of 1st Thumbnail
WinWaitActive("4walled","")
MouseClick("right",818,165,1)
MouseClick("left",864,294,1)
WinWaitActive("Save As","")
Send("{ENTER}")
WinWaitActive("4walled","")
Send("{CTRLDOWN}w{CTRLUP}")

WinWaitActive("4walled - Google Chrome","")
MouseClick("left",195,339,1)
;Center of 2nd Thumbnail
WinWaitActive("4walled","")
MouseClick("right",818,165,1)
MouseClick("left",864,294,1)
WinWaitActive("Save As","")
Send("{ENTER}")
WinWaitActive("4walled","")
Send("{CTRLDOWN}w{CTRLUP}")

WinWaitActive("4walled - Google Chrome","")
MouseClick("left",327,339,1)
;Center of 3rd Thumbnail
WinWaitActive("4walled","")
MouseClick("right",818,165,1)
MouseClick("left",864,294,1)
WinWaitActive("Save As","")
Send("{ENTER}")
WinWaitActive("4walled","")
Send("{CTRLDOWN}w{CTRLUP}")

WinWaitActive("4walled - Google Chrome","")
MouseClick("left",459,339,1)
;Center of 4th Thumbnail
WinWaitActive("4walled","")
MouseClick("right",818,165,1)
MouseClick("left",864,294,1)
WinWaitActive("Save As","")
Send("{ENTER}")
WinWaitActive("4walled","")
Send("{CTRLDOWN}w{CTRLUP}")

WinWaitActive("4walled - Google Chrome","")
MouseClick("left",591,339,1)
;Center of 5th Thumbnail
WinWaitActive("4walled","")
MouseClick("right",818,165,1)
MouseClick("left",864,294,1)
WinWaitActive("Save As","")
Send("{ENTER}")
WinWaitActive("4walled","")
Send("{CTRLDOWN}w{CTRLUP}")

WinWaitActive("4walled - Google Chrome","")
MouseClick("left",723,339,1)
;Center of 6th Thumbnail
WinWaitActive("4walled","")
MouseClick("right",818,165,1)
MouseClick("left",864,294,1)
WinWaitActive("Save As","")
Send("{ENTER}")
WinWaitActive("4walled","")
Send("{CTRLDOWN}w{CTRLUP}")

WinWaitActive("4walled - Google Chrome","")
MouseClick("left",855,339,1)
;Center of 7th Thumbnail
WinWaitActive("4walled","")
MouseClick("right",818,165,1)
MouseClick("left",864,294,1)
WinWaitActive("Save As","")
Send("{ENTER}")
WinWaitActive("4walled","")
Send("{CTRLDOWN}w{CTRLUP}")

WinWaitActive("4walled - Google Chrome","")
MouseClick("left",987,339,1)
;Center of 8th Thumbnail
WinWaitActive("4walled","")
MouseClick("right",818,165,1)
MouseClick("left",864,294,1)
WinWaitActive("Save As","")
Send("{ENTER}")
WinWaitActive("4walled","")
Send("{CTRLDOWN}w{CTRLUP}")

WinWaitActive("4walled - Google Chrome","")
MouseClick("left",1119,339,1)
;Center of 9th Thumbnail
WinWaitActive("4walled","")
MouseClick("right",818,165,1)
MouseClick("left",864,294,1)
WinWaitActive("Save As","")
Send("{ENTER}")
WinWaitActive("4walled","")
Send("{CTRLDOWN}w{CTRLUP}")

WinWaitActive("4walled - Google Chrome","")
MouseClick("left",1251,339,1)
;Center of 10th Thumbnail
WinWaitActive("4walled","")
MouseClick("right",818,165,1)
MouseClick("left",864,294,1)
WinWaitActive("Save As","")
Send("{ENTER}")
WinWaitActive("4walled","")
Send("{CTRLDOWN}w{CTRLUP}")

WinWaitActive("4walled - Google Chrome","")
MouseClick("left",1383,339,1)
;Center of 11th Thumbnail
WinWaitActive("4walled","")
MouseClick("right",818,165,1)
MouseClick("left",864,294,1)
WinWaitActive("Save As","")
Send("{ENTER}")
WinWaitActive("4walled","")
Send("{CTRLDOWN}w{CTRLUP}")

WinWaitActive("4walled - Google Chrome","")
MouseClick("left",1515,339,1)
;Center of 12th Thumbnail
WinWaitActive("4walled","")
MouseClick("right",818,165,1)
MouseClick("left",864,294,1)
WinWaitActive("Save As","")
Send("{ENTER}")
WinWaitActive("4walled","")
Send("{CTRLDOWN}w{CTRLUP}")
WEnd

Func Stop ()
    $Running = False
    EndFunc

What I am doing is opening a thumbnail (yellow Circle) to a image that I am saving. Closing the tab, and going to the next thumbnail to the right. Once I complete the line of links (images) I want to move the webpage up and then restart the progress. Did a lot of photoshop to find out that the center of the first thumbnail to the center of the next (below) is 74px.

Edited by Asakor

Share this post


Link to post
Share on other sites

Asakor,

Alas, we have libraries to automate IE and FireFox, but not Chrome. ;)

I can only suggest that you click on the "down" arrow and see how many pixels that moves you. Once you know how far you move, a bit of maths should enable you to hit the next row down fair and square.

Sorry I cannot be of more help - I will try harder next time. :huh2:

m23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Down arrow 40px, the page would run out of px before it would reach a point where I would have to reset the px offset itself. I have Firefox, if I were to change a few line of command would I be golden for the libraries?

Share this post


Link to post
Share on other sites

Asakor,

I do not use FireFox myself. You could search for the FF.au3 library and see what it offers as functions or start a new thread to attract FireFox users. I would suggest a title like "Selecting images in FireFox webpage" - that should draw the knowledgeable forum members. :huh2:

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0