Jump to content

Recommended Posts

Posted

How does the @MIN command work, i would like to have it active something at say 5:00 pm and not have to Sleep until then...i want it to be at exactly 5:00.

I would also like to have script that gets the MousePos (x,y) and can utilize it in mousemoves and mouse clicks...am I a just too noob at this to understand it?

:iamstupid:

  • Administrators
Posted

This script will wait for 5pm (@hour = 17). It will check the time every 5 seconds so that there is no CPU load.

While @HOUR <> 17
  Sleep(5000)
WEnd

MsgBox(0, "", "It is 5pm!")


 

Posted

Thank you, but can other things be ran in the script While the While is running....

;this will all be ran right? (1)

While @HOUR <> 17

Sleep(5000)

WEnd

;what about here (2)

MsgBox(0, "", "It is 5pm!")

;or here (3)

*which of those will be able to run, while its waiting to be 5pm?*

  • Developers
Posted

Thank you, but can other things be ran in the script While the While is running....

You can call a function like:

While @HOUR <> 17
   Sleep(50)
   test()
WEnd
MsgBox(0, "", "It is 5pm!")


func test()
; do some repeatative stuff while waiting
endfunc

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted (edited)

you can do anything you wish, as well as set up the adlib ( check this function every X miliseconds.)

ex:

AdlibEnable ("_time1")

; bunch of code
; some loops
; other code
while 1
sleep(10)
wend 

func _time1()
if @HOUR = 17 and @MIN=00 then
MsgBox(0, "", "It is 5pm!")
endif 
endfunc
Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

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...