+ Reply to Thread
Results 1 to 7 of 7

Relative screen coordinates. How to extract them from an Excel workbook?

  1. #1
    Registered User
    Join Date
    12-28-2018
    Location
    Batley
    MS-Off Ver
    Office 365 Win 10
    Posts
    21

    Relative screen coordinates. How to extract them from an Excel workbook?

    Hi there.. I have attached my workbook, but below is essentially what there is to see. What i am hoping to do perhaps with a standalone script is to strip away the sleeps and the commas and the zeros and then compute the difference between each two sets of values in turn. They are screen coordinates and I'm intending to use them in a macro. Wonder if someone could point me to how? I can manually find/replace and I can possibly create formulae on my spreadsheet, but since the excel page will always be in the same format it lends itself to some sort of scripting (of which i know zilch). Thank you !!

    Sleep, 32 INTENDED RESULT 0 1
    Click, 326, 351, 0 -1 0
    Sleep, 375 0 1
    Click, 326, 352, 0 -1 1
    Sleep, 15 -1 0
    Click, 325, 352, 0 and so on
    Sleep, 16
    Click, 325, 353, 0
    Sleep, 31
    Click, 324, 354, 0
    Sleep, 16
    Click, 323, 354, 0
    Sleep, 15
    Attached Files Attached Files

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Relative screen coordinates. How to extract them from an Excel workbook?

    Perhaps this will help.. At least I think this is what you mean from the description of the problem.
    Please Login or Register  to view this content.
    Open the attached and click the button to run the code.

    BSB
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-28-2018
    Location
    Batley
    MS-Off Ver
    Office 365 Win 10
    Posts
    21

    Re: Relative screen coordinates. How to extract them from an Excel workbook?

    Thanks BSB. That worked very well. Just the job thank you. Now I have to work out how to get those values into my macro !!

  4. #4
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,157

    Re: Relative screen coordinates. How to extract them from an Excel workbook?

    Quote Originally Posted by NackJich View Post
    ... strip away the sleeps and the commas and the zeros and then compute the difference between each two sets of values in turn ...
    ... try:
    Please Login or Register  to view this content.

  5. #5
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Relative screen coordinates. How to extract them from an Excel workbook?

    Quote Originally Posted by NackJich View Post
    Thanks BSB. That worked very well. Just the job thank you. Now I have to work out how to get those values into my macro !!
    Happy to help.

    What is the macro you have that these are to feed into?

    BSB

  6. #6
    Registered User
    Join Date
    12-28-2018
    Location
    Batley
    MS-Off Ver
    Office 365 Win 10
    Posts
    21

    Re: Relative screen coordinates. How to extract them from an Excel workbook?

    The current macro is a Autohotkey program that reads a txt file. I wanted to make the values relative rather than absolute which is why I am trying this in Excel. The AHK script will have to be modified of course. Is it possible to export those two columns to a .txt file? I'm sure there must be a better way. Thanks for your help.
    This is the AHK code:
    Please Login or Register  to view this content.
    Last edited by NackJich; 12-29-2018 at 06:56 AM.

  7. #7
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,157

    Re: Relative screen coordinates. How to extract them from an Excel workbook?

    1. Maybe at all load a text file to the memory and after processing (excel macro) copy it back to the "txt" file ?
    2. What about the last line of the coordinates, which are not calculated ?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. find coordinates of point clicked, relative to picture edges
    By adrianke77 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-02-2009, 01:52 AM
  2. Question about screen coordinates
    By timspier in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-01-2007, 08:52 PM
  3. Determine Cell screen coordinates
    By willem in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-08-2006, 10:40 AM
  4. [SOLVED] Determine Cell screen coordinates
    By willem in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-08-2006, 10:35 AM
  5. [SOLVED] Getting screen coordinates from Range
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-29-2006, 12:20 PM
  6. Replies: 4
    Last Post: 09-27-2005, 02:05 PM
  7. And once again: X and Y Screen Coordinates of a Range
    By marsou in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-23-2005, 07:05 AM
  8. [SOLVED] [SOLVED] X and Y Screen Coordinates of a Range !!!
    By RAFAAJ2000 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-21-2005, 08:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1