Jump to content

can i modify $x,$y coordinates to look -100,-100 ?


Recommended Posts

explanation of what im doing

im grabbing a 'name' from a notepad

going to IE and searching for it

Imagesearch looks for the color blue of the highlighted search result

there is a radio button to the left of that particular 'name' that I need to click

there are 50+ of the identical radio buttons on the page so I cant search for that

Link to comment
Share on other sites

well anyways I noticed that when searching for the name having the mouse move to the variable coordinate it highlighted the button so I was able to now search for that highlighted button . awesome

 

but for education purposes is there a way to change coordinates based on subtracting from the variable?

Link to comment
Share on other sites

  • 2 weeks later...

Please any help would be most appreciated!! I'm still having a little issue here. Here's my goal:

1) I want imagesearch to locate the word 'Notes'

              This word will move around every time I search for it so I cannot use static mouse coordinates for the next step.

 

2) After locating notes I want it to move the mouse right and highlight the text that's next to it (usually a few sentences)      <-----This is the part I need help with

Edited by Teckx
Link to comment
Share on other sites

@Teckx

Your script seems very mechanic, and I don't like mechanic things ( at least, not scripts ).

What you're trying to do is copy-paste a word that you search in a text file, go in IE, and click a (some) radio button(s) in a web-page...

Is this your goal?

:)

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

Just now, FrancescoDiMuro said:

@Teckx

Your script seems very mechanic, and I don't like mechanic things ( at least, not scripts ).

What you're trying to do is copy-paste a word that you search in a text file, go in IE, and click a (some) radio button(s) in a web-page...

Is this your goal?

:)

its part of a function I have going. The radio button is a differnt script I figured out- this one im referring to in this thread is the much more complicated one that will be an ongoing battle.

This is the Else portion where it would copy notes from a completed ticket and then submit the notes to the customer saying their request (notes) was completed.

 

I actually figured a way to just search for the Notes: (mousedown) then imagesearch for the end corner of the window (mouseup) copy paste and continue on

 

So I guess this is now for education purposes if its even possible to subtract coordinates from a variable

Link to comment
Share on other sites

@Teckx

3 minutes ago, Teckx said:

So I guess this is now for education purposes if its even possible to subtract coordinates from a variable

You would like to substract coordinates ( of what? Mouse? Window? ) from a variable?

If so, it should not be so difficult, but... Can you please explain step by step what your script should do?

I'm asking this to you in order to help you as much as I can :) 

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

4 minutes ago, FrancescoDiMuro said:

@Teckx

You would like to substract coordinates ( of what? Mouse? Window? ) from a variable?

If so, it should not be so difficult, but... Can you please explain step by step what your script should do?

I'm asking this to you in order to help you as much as I can :) 

 

I would like to subtract coordinates from the imagesearch MouseMove $x, $y coordinates

say for example the Image im searching for (Notes) is always 5 inches away on the left from what I want to highlight and copy

kind of confusing .

 

look at my post/replies for example. say I wanted to imagesearch my name Teckx. Then from there id want to subtract coordinates so the mouse would move to the right and copy the post number which will always be in the same spot.

Edited by Teckx
Link to comment
Share on other sites

@Teckx

It's very mechanic...

You could you a combination of PixelSearch(), which returns a 1-dimensional array containing the x and y of the pixel found, and from here, you could use MouseMove(), starting from the values returned by PixelSearch().

Why can't you use file read to read the content of a file, look for the word you are passing to the script, and then do all the MouseMove() you need?

You should make a step by step video in order to let us comprehend what you're trying to do... And why you are proceeding in this way... :) 

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

49 minutes ago, FrancescoDiMuro said:

@Teckx

It's very mechanic...

You could you a combination of PixelSearch(), which returns a 1-dimensional array containing the x and y of the pixel found, and from here, you could use MouseMove(), starting from the values returned by PixelSearch().

Why can't you use file read to read the content of a file, look for the word you are passing to the script, and then do all the MouseMove() you need?

You should make a step by step video in order to let us comprehend what you're trying to do... And why you are proceeding in this way... :) 

wish I could give you a video that would make things much easier but its classified

I haven't really tried pixelsearch much because all of the forms im using are mainly just black text on a white background.

Link to comment
Share on other sites

heres a sample if it helps at all.

 

Are you creating a New Group or Modifying an Existing Group?* :

Create a New Group

Enter the New Group Name* :

Test Group Capture this

Type of Group* :

Distribution

 

Link to comment
Share on other sites

so looking at that sample id want to copy Test Group Capture this

so ive been image searching the Group Name* :  and having it mousedown and move towards the border of the form with another imagesearch., is there a better way?

Link to comment
Share on other sites

11 minutes ago, Teckx said:

so looking at that sample id want to copy Test Group Capture this

so ive been image searching the Group Name* :  and having it mousedown and move towards the border of the form with another imagesearch., is there a better way?

@Teckx

I think you could use _IE_* functions, in order to retrieve some information that for sure would be helpful!

Did you already take a look at them? :)

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Link to comment
Share on other sites

Just now, FrancescoDiMuro said:

@Teckx

I think you could use _IE_* functions, in order to retrieve some information that for sure would be helpful!

Did you already take a look at them? :)

I have not. still a bit new at all this so I tend to stick to what im comfortable with and try to make it work. ill look those up

Link to comment
Share on other sites

On 7/25/2017 at 10:02 AM, FrancescoDiMuro said:

It's very mechanic...

You could you a combination of PixelSearch(), which returns a 1-dimensional array containing the x and y of the pixel found, and from here, you could use MouseMove(), starting from the values returned by PixelSearch().

Why can't you use file read to read the content of a file, look for the word you are passing to the script, and then do all the MouseMove() you need?

You should make a step by step video in order to let us comprehend what you're trying to do... And why you are proceeding in this way... :) 

 

sorry to bug you. was still thinking about this

 

three things

1: not sure if IE functions can do this but ive noticed the item i want is always on line 52 in the 'view source'  unsure if theres a way to pull that while removing all the html surrounding it

 

2: Could you point me in the right direction or expand on "why can't you use file read to read the content of a file, look for the word you are passing to the script, and then do all the MouseMove() you need?"

 

3: Same as above, could you point me to more info on "You could you a combination of PixelSearch(), which returns a 1-dimensional array containing the x and y of the pixel found, and from here, you could use MouseMove(), starting from the values returned by PixelSearch()."

instead of using pixelsearch however i would have to use imagesearch

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...