Jump to content
Raizeno

how to get current time minutes value

Recommended Posts

Raizeno

I have a script that I want to run every hour at minute 15 but I don't know how to get the minute value from the system .

Any help is appreciated thanks in advance.

Share this post


Link to post
Share on other sites
trancexx

If that doesn't work, try @MAX.

...But only if it wouldn't work.

Edited by trancexx
  • Like 1

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
Raizeno

 if @MIN = 15 Then
   MouseClickDrag("left",700,275,700,600,0)
   sleep(500)
   MouseClickDrag("left",700,275,700,600,0)
   sleep(500)
   MouseClickDrag("left",700,275,700,600,0)
   sleep(500)
   PixelSearch(930,230,1100,650,0x135e13,2)
   if @error then
   MouseClick("left",1000,500,1,0)
   EndIf

Endif

 

is there something wrong with the way I use it cause @‌MIN doesn't seem to work for me

Share this post


Link to post
Share on other sites
Jos

What are you trying to do and which part is not working? Put in a Consolewrite() or MsgBox() inside of the IF to see whether your test is working.

Jos

 


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Raizeno

AdlibRegister("Drag",10000)

Func Drag()
  
 if @MIN = 15 Then
  
   MouseClickDrag("left",700,275,700,600,0)
   sleep(500)
   MouseClickDrag("left",700,275,700,600,0)
   sleep(500)
   MouseClickDrag("left",700,275,700,600,0)
   sleep(500)
   PixelSearch(930,230,1100,650,0x135e13,2)
   if @error then
   MouseClick("left",1000,500,1,0)
   EndIf
EndIf
EndFunc

 

what I want it to do is drag a list to the top then search for a color if it doesn't find it I want to execute a click at those coordinates

I've put it in an AdlibRegister so it should check for time every 10 sec and at min 15 of every hour I want the script to start running .

Edited by Raizeno

Share this post


Link to post
Share on other sites
trancexx

Did you try the other thing?


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
Raizeno

I'm not in the mood for trolls right now trancexx

Share this post


Link to post
Share on other sites
trancexx

Don't be a jackass. I meant to put Consolewrite() or MsgBox() inside the If...Then.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
Jos

I'm not in the mood for trolls right now trancexx

Believe it was a very valid question...no?
Also hope that the posted script isn't the whole script as it will end right away.

 

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Raizeno

If that doesn't work, try @MAX.

...But only if it wouldn't work.

I thought she was talking about this my bad.

 

 

Share this post


Link to post
Share on other sites
Raizeno

i think i found the error in my code thank you for your input .

Share this post


Link to post
Share on other sites
Jos

I thought she was talking about this my bad.

well you thought wrong and need to lighten up as well. Just ignore stuff you think you don't like.
See my other comment I added while you posted this last post.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Raizeno

well you thought wrong and need to lighten up as well. Just ignore stuff you think you don't like.
See my other comment I added while you posted this last post.

Jos

no i have an infinite loop that keeps the adlibRegister going all the time so that the script won't end .

Share this post


Link to post
Share on other sites
TheDcoder

Try this code & paste the contents of your clipboard here:

AdlibRegister("Drag",10000)

Func Drag()

 if @MIN = 15 Then

    $sClipboard = "1." & MouseClickDrag("left",700,275,700,600,0)
    sleep(500)
    $sClipboard = "2. " & MouseClickDrag("left",700,275,700,600,0)
    sleep(500)
    $sClipboard = "3. " & MouseClickDrag("left",700,275,700,600,0)
    sleep(500)
    $sClipboard = "4. " & PixelSearch(930,230,1100,650,0x135e13,2)
    if @error then
    $sClipboard = "5. " & MouseClick("left",1000,500,1,0)
    EndIf
 EndIf
    ClipPut($sClipboard)
EndFunc

 


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

Share this post


Link to post
Share on other sites
Jos

sigh ... @TheDcoder, I am slowly growing tired of your over enthusiastic posting lately without first properly reading.
The OP clearly indicated that he found the issue and on top of that: The last provided script is simply wrong as the clipboard is overwritten each loop.

Please start to control yourself and simply refrain from posting when not needed. This should sound familiar as this is requested a couple of time lately and my patience is really running thin now!

Jos

 

  • Like 1

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
TheDcoder

@Jos Sorry Jos! I promise this won't happen an other time


AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Spoiler

My contributions to the AutoIt Community

Some messages & Apologizes:

If I hurt you, Please accept my apologies, I never (regardless of the situation) mean to hurt anybody!!!

Also, I am very busy with my project so I will appear in the last row of the online list, if you want to contact me: Email@TheDcoder.xyz

Or you can have a nice chat with me in freenode, I use the same nick on freenode too!

3fHNZJ.gif

PLEASE JOIN ##AutoIt AND HELP THE IRC AUTOIT COMMUNITY!

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

×