Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Capturing Image & Time
#1
Code:
Copy      Help
if(scan("resource:<Macro1>image:h1B7A5E0B" win() 0 16 250))
        CaptureImageOnScreen 655 340 85 35
My code works fine on my personal laptop but when I move to my destop the image captured is not on point. How can I change the code so that when the image is found. The exact coordinates of the image then capture the image?

Code:
Copy      Help
GetLocalTime &st
    s.format("%02i:%02i:%02i" st.wHour st.wMinute st.wSecond)
Is it possible for quick macros to change string into integer so I can 2 time and see which time is earlier and which is later?
#2
Macro Macro2739
Code:
Copy      Help
RECT r
if(scan("resource:<Macro1>image:h1B7A5E0B" win() r 16|128 250))
,CaptureImageOnScreen r.left r.top r.right-r.left r.bottom-r.top

Use functions of class DateTime. It can get time, parse time string etc.
Macro Macro2740
Code:
Copy      Help
DateTime t1.FromComputerTime
DateTime t2.FromStr("2016-04-06 16:30:15")
if(t2>t1) out "t2 is later"
else out "t2 is earlier"
#3
Thank you so much


Forum Jump:


Users browsing this thread: 1 Guest(s)