Jump to content
Raizeno

how to get current time minutes value

Recommended Posts

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

 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

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

 

Share this post


Link to post
Share on other sites

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

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

Share this post


Link to post
Share on other sites

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

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

Share this post


Link to post
Share on other sites

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

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

 


A cross-platform implementation of the AutoIt language

My contributions to the AutoIt Community ##AutoIt at freenode, real-time chat

3fHNZJ.gif

Spoiler

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

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


A cross-platform implementation of the AutoIt language

My contributions to the AutoIt Community ##AutoIt at freenode, real-time chat

3fHNZJ.gif

Spoiler

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

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

×
×
  • Create New...