Sign in to follow this  
Followers 0
crapnonsense

Timer Countdown

8 posts in this topic

Hey, I have did some searches on this forum but I could find no starts for the script I want to make.

Basically I need some script that gets your computer time and then i need multi countdowns.

Times are (just for this example, so I know where to start)

Win: 09, 21, 33, 45, 57

Lose: 00, 12, 24, 36, 48

those are the minutes of every hour.

basically it should countdown until the next win and next lose so,

lets say its 8:19:39 PM it should say

Next Win: 1:21

Next Lose: 4:21

and it should count down until .. and that with those multi times.. I have no idea where to start

I hope someone can help me. Thanks in advance.

Share this post


Link to post
Share on other sites



Hey, I have did some searches on this forum but I could find no starts for the script I want to make.

Basically I need some script that gets your computer time and then i need multi countdowns.

Times are (just for this example, so I know where to start)

Win: 09, 21, 33, 45, 57

Lose: 00, 12, 24, 36, 48

those are the minutes of every hour.

basically it should countdown until the next win and next lose so,

lets say its 8:19:39 PM it should say

Next Win: 1:21

Next Lose: 4:21

and it should count down until .. and that with those multi times.. I have no idea where to start

I hope someone can help me. Thanks in advance.

Have a look at the Date.au3 udf. You can add or take from a time. So start with _Now or _NowCalc for the current time, _Date_Add will give the new time, and _Date_diff will tell you if you've reached that time. There are examples in the help.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

I still have no clue how to countdown till a time on your computer.

Could anyone give me a script that shows me how to do that? like just this would be fine:

09, 21, 33, 45, 57 (minutes)

That are the minutes can someone make me a quick example how to.. countdown till the next number(min)

Just to make things abit clear, imagine its 1PM. Then the next win is in 9 minutes.

Then when that one is won, I want it to continue counting (back to 12 minutes again) to 21..

I hope you understand. I really have no clue how to do it at all

Share this post


Link to post
Share on other sites

I still have no clue how to countdown till a time on your computer.

Could anyone give me a script that shows me how to do that? like just this would be fine:

09, 21, 33, 45, 57 (minutes)

That are the minutes can someone make me a quick example how to.. countdown till the next number(min)

Just to make things abit clear, imagine its 1PM. Then the next win is in 9 minutes.

Then when that one is won, I want it to continue counting (back to 12 minutes again) to 21..

I hope you understand. I really have no clue how to do it at all

Which part of the _Now function, or any of the others I mentioned, did you not understand?

Did you look at the help and try the examples?

Have you got anything you have tried which you can show us so we can see what the problem is?


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Countdown timer ?

For how long timer script is running :

$Timerinit=TimerInit();start timer

while 1
TrayTip("",TimerDiff($TimerInit),1,4)
Wend

Countdown :

$count=Input("enter time count","","30000")
$timerinit=TimerInit()

While 1
TrayTip("",$count-TimerDiff($timerinit),1,4)
If $count-TimerDiff($timerinit)<0 then exit
WEnd

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Countdown timer ?

For how long timer script is running :

$Timerinit=TimerInit();start timer

while 1
TrayTip("",TimerDiff($TimerInit),1,4)
Wend

Countdown :

$count=Input("enter time count","","30000")
$timerinit=TimerInit()

While 1
TrayTip("",$count-TimerDiff($timerinit),1,4)
If $count-TimerDiff($timerinit)<0 then exit
WEnd

Gret pieces. Can i ask you a question? I have script like that:

Global $Paused = 0, $g = 0
HotKeySet("{esc}", "Exite")



HotKeySet("{PAUSE}", "Pause")

Sleep(10000)
Clicker ()
;Sleep (210000)
;Clicker ()
#cs
Sleep (210000)
    MouseClick( "left",939,757, 1, 50) ; Market Button
Sleep(3000)
    MouseClick( "left",965,460, 1, 50) ;Right
Sleep(1000)
    MouseClick( "left",704,625, 1, 50) ;Blueberries
Sleep(1000)
Clicker ()

#ce



    
    




While 1
sleep (100) ; to keep CPU usage down
WEnd




Func Pause()
    If $Paused = 0 then
        $Paused = 1
    ElseIf $Paused = 1 then
        $Paused = 0
    Endif
    While $Paused = 1
        Sleep(1000)
        
    WEnd
EndFunc





Func Exite()
    exit 0
EndFunc

Func clicker()

Sleep(10)
    MouseClick( "left",167,404, 1, 50) ;1
Sleep(10)
    MouseClick( "left",192,421, 1, 50) ;2
Sleep(10)
    MouseClick( "left",211,430, 1, 50) ;3
Sleep(10)
    MouseClick( "left",241,443, 1, 50) ;4
Sleep(10)
    MouseClick( "left",264,457, 1, 50) ;5
Sleep(10)
    MouseClick( "left",287,465, 1, 50) ;6
Sleep(10)
    MouseClick( "left",315,475, 1, 50) ;7
Sleep(10)
    MouseClick( "left",335,490, 1, 50) ;8
Sleep(10)
    MouseClick( "left",369,503, 1, 50) ;9
Sleep(10)

    MouseClick( "left",393,514, 1, 50) ;10
Sleep(10)
    MouseClick( "left",414,520, 1, 50) ;11
Sleep(10)
    MouseClick( "left",441,535, 1, 50) ;12
Sleep(10)
    MouseClick( "left",471,548, 1, 50) ;13
Sleep(10)
    MouseClick( "left",488,558, 1, 50) ;14
Sleep(10)
    MouseClick( "left",518,572, 1, 50) ;15
Sleep(10)
    MouseClick( "left",540,582, 1, 50) ;16
Sleep(10)
    MouseClick( "left",562,595, 1, 50) ;17
Sleep(10)
    MouseClick( "left",596,611, 1, 50) ;18
Sleep(10)
    MouseClick( "left",616,618, 1, 50) ;19
Sleep(10)
    MouseClick( "left",639,629, 1, 50) ;20
Sleep(10)
    MouseClick( "left",661,619, 1, 50) ;21
Sleep(10)
    MouseClick( "left",638,607, 1, 50) ;22
Sleep(10)
    MouseClick( "left",614,589, 1, 50) ;23
Sleep(10)
    MouseClick( "left",592,584, 1, 50) ;24
Sleep(10)
    MouseClick( "left",570,569, 1, 50) ;25
Sleep(10)
    MouseClick( "left",537,553, 1, 50) ;26
Sleep(10)
    MouseClick( "left",513,545, 1, 50) ;27
Sleep(10)
    MouseClick( "left",483,535, 1, 50) ;28
Sleep(10)
    MouseClick( "left",467,523, 1, 50) ;29
Sleep(10)
    MouseClick( "left",440,507, 1, 50) ;30
Sleep(10)
    MouseClick( "left",421,498, 1, 50) ;31
Sleep(10)
    MouseClick( "left",394,486, 1, 50) ;32
Sleep(10)
    MouseClick( "left",363,476, 1, 50) ;33
Sleep(10)
    MouseClick( "left",342,462, 1, 50) ;34
Sleep(10)
    MouseClick( "left",316,447, 1, 50) ;35
Sleep(10)
    MouseClick( "left",292,437, 1, 50) ;36
Sleep(10)
    MouseClick( "left",269,422, 1, 50) ;37
Sleep(10)
    MouseClick( "left",241,417, 1, 50) ;38
Sleep(10)
    MouseClick( "left",217,405, 1, 50) ;39
Sleep(10)
    MouseClick( "left",194,390, 1, 50) ;40
Sleep(10)

    MouseClick( "left",217,380, 1, 50) ;41
Sleep(10)
    MouseClick( "left",239,388, 1, 50) ;42
Sleep(10)
    MouseClick( "left",262,405, 1, 50) ;43
Sleep(10)
    MouseClick( "left",284,416, 1, 50) ;44
Sleep(10)
    MouseClick( "left",314,425, 1, 50) ;45
Sleep(10)
    MouseClick( "left",345,440, 1, 50) ;46
Sleep(10)
    MouseClick( "left",362,450, 1, 50) ;47
Sleep(10)
    MouseClick( "left",391,462, 1, 50) ;48
Sleep(10)
    MouseClick( "left",411,472, 1, 50) ;49
Sleep(10)
    MouseClick( "left",440,487, 1, 50) ;50
Sleep(10)
    MouseClick( "left",464,503, 1, 50) ;51
Sleep(10)
    MouseClick( "left",493,509, 1, 50) ;52
Sleep(10)
    MouseClick( "left",517,522, 1, 50) ;53
Sleep(10)
    MouseClick( "left",542,533, 1, 50) ;54
Sleep(10)
    MouseClick( "left",567,548, 1, 50) ;55
Sleep(10)
    MouseClick( "left",589,559, 1, 50) ;56
Sleep(10)
    MouseClick( "left",619,575, 1, 50) ;57
Sleep(10)
    MouseClick( "left",641,586, 1, 50) ;58
Sleep(10)
    MouseClick( "left",660,598, 1, 50) ;59
Sleep(10)
    MouseClick( "left",696,606, 1, 50) ;60
Sleep(10)
    MouseClick( "left",721,592, 1, 50) ;61
Sleep(10)
    MouseClick( "left",690,582, 1, 50) ;62
Sleep(10)
    MouseClick( "left",669,568, 1, 50) ;63
Sleep(10)
    MouseClick( "left",643,557, 1, 50) ;64
Sleep(10)
    MouseClick( "left",621,545, 1, 50) ;65
Sleep(10)
    MouseClick( "left",593,534, 1, 50) ;66
Sleep(10)
    MouseClick( "left",566,522, 1, 50) ;67
Sleep(10)
    MouseClick( "left",537,508, 1, 50) ;68
Sleep(10)
    MouseClick( "left",519,497, 1, 50) ;69
Sleep(10)
    MouseClick( "left",489,481, 1, 50) ;70
Sleep(10)
    MouseClick( "left",470,478, 1, 50) ;71
Sleep(10)
    MouseClick( "left",446,463, 1, 50) ;72
Sleep(10)
    MouseClick( "left",413,449, 1, 50) ;73
Sleep(10)
    MouseClick( "left",393,436, 1, 50) ;74
Sleep(10)
    MouseClick( "left",368,425, 1, 50) ;75
Sleep(10)
    MouseClick( "left",340,410, 1, 50) ;76
Sleep(10)
    MouseClick( "left",317,398, 1, 50) ;77
Sleep(10)
    MouseClick( "left",283,387, 1, 50) ;78
Sleep(10)
    MouseClick( "left",267,378, 1, 50) ;79
Sleep(10)
    MouseClick( "left",246,371, 1, 50) ;80
Sleep(10)
    MouseClick( "left",269,359, 1, 50) ;81
Sleep(10)
    MouseClick( "left",288,366, 1, 50) ;82
Sleep(10)
    MouseClick( "left",316,385, 1, 50) ;83
Sleep(10)
    MouseClick( "left",342,396, 1, 50) ;84
Sleep(10)
    MouseClick( "left",367,402, 1, 50) ;85
Sleep(10)
    MouseClick( "left",388,410, 1, 50) ;86
Sleep(10)
    MouseClick( "left",419,430, 1, 50) ;87
Sleep(10)
    MouseClick( "left",433,438, 1, 50) ;88
Sleep(10)
    MouseClick( "left",468,454, 1, 50) ;89
Sleep(10)
    MouseClick( "left",499,468, 1, 50) ;90
Sleep(10)
    MouseClick( "left",515,474, 1, 50) ;91
Sleep(10)
    MouseClick( "left",533,489, 1, 50) ;92
Sleep(10)
    MouseClick( "left",557,500, 1, 50) ;93
Sleep(10)
    MouseClick( "left",583,512, 1, 50) ;94
Sleep(10)
    MouseClick( "left",620,521, 1, 50) ;95
Sleep(10)
    MouseClick( "left",638,534, 1, 50) ;96
Sleep(10)
    MouseClick( "left",670,549, 1, 50) ;97
Sleep(10)
    MouseClick( "left",688,555, 1, 50) ;98
Sleep(10)
    MouseClick( "left",715,572, 1, 50) ;99
Sleep(10)
    MouseClick( "left",736,581, 1, 50) ;100
Sleep(10)
    MouseClick( "left",767,574, 1, 50) ;101
Sleep(10)
    MouseClick( "left",735,559, 1, 50) ;102
Sleep(10)
    MouseClick( "left",716,543, 1, 50) ;103
Sleep(10)
    MouseClick( "left",694,537, 1, 50) ;104
Sleep(10)
    MouseClick( "left",669,519, 1, 50) ;105
Sleep(10)
    MouseClick( "left",647,510, 1, 50) ;106
Sleep(10)
    MouseClick( "left",615,502, 1, 50) ;107
Sleep(10)
    MouseClick( "left",592,487, 1, 50) ;108
Sleep(10)
    MouseClick( "left",569,472, 1, 50) ;109
Sleep(10)
    MouseClick( "left",545,464, 1, 50) ;110
Sleep(10)
    MouseClick( "left",517,452, 1, 50) ;111
Sleep(10)
    MouseClick( "left",496,438, 1, 50) ;112
Sleep(10)
    MouseClick( "left",471,425, 1, 50) ;113
Sleep(10)
    MouseClick( "left",446,412, 1, 50) ;114
Sleep(10)
    MouseClick( "left",420,403, 1, 50) ;115
Sleep(10)
    MouseClick( "left",394,392, 1, 50) ;116
Sleep(10)
    MouseClick( "left",366,382, 1, 50) ;117
Sleep(10)
    MouseClick( "left",345,363, 1, 50) ;118
Sleep(10)
    MouseClick( "left",313,357, 1, 50) ;119
Sleep(10)
    MouseClick( "left",294,343, 1, 50) ;120
Sleep(10)
    MouseClick( "left",320,329, 1, 50) ;121
Sleep(10)
    MouseClick( "left",343,346, 1, 50) ;122
Sleep(10)
    MouseClick( "left",367,356, 1, 50) ;123
Sleep(10)
    MouseClick( "left",389,369, 1, 50) ;124
Sleep(10)
    MouseClick( "left",419,384, 1, 50) ;125
Sleep(10)
    MouseClick( "left",436,389, 1, 50) ;126
Sleep(10)
    MouseClick( "left",464,403, 1, 50) ;127
Sleep(10)
    MouseClick( "left",492,413, 1, 50) ;128
Sleep(10)
    MouseClick( "left",513,425, 1, 50) ;129
Sleep(10)
    MouseClick( "left",546,442, 1, 50) ;130
Sleep(10)
    MouseClick( "left",573,454, 1, 50) ;131
Sleep(10)
    MouseClick( "left",592,465, 1, 50) ;132
Sleep(10)
    MouseClick( "left",612,472, 1, 50) ;133
Sleep(10)
    MouseClick( "left",636,487, 1, 50) ;134
Sleep(10)
    MouseClick( "left",660,501, 1, 50) ;135
Sleep(10)
    MouseClick( "left",695,511, 1, 50) ;136
Sleep(10)
    MouseClick( "left",713,521, 1, 50) ;137
Sleep(10)
    MouseClick( "left",740,534, 1, 50) ;138
Sleep(10)
    MouseClick( "left",768,548, 1, 50) ;139
Sleep(10)
    MouseClick( "left",790,558, 1, 50) ;140
Sleep(10)
    MouseClick( "left",807,550, 1, 50) ;141
Sleep(10)
    MouseClick( "left",785,532, 1, 50) ;142
Sleep(10)
    MouseClick( "left",770,522, 1, 50) ;143
Sleep(10)
    MouseClick( "left",744,505, 1, 50) ;144
Sleep(10)
    MouseClick( "left",724,495, 1, 50) ;145
Sleep(10)
    MouseClick( "left",698,487, 1, 50) ;146
Sleep(10)
    MouseClick( "left",668,475, 1, 50) ;147
Sleep(10)
    MouseClick( "left",643,460, 1, 50) ;148
Sleep(10)
    MouseClick( "left",623,451, 1, 50) ;149
Sleep(10)
    MouseClick( "left",590,437, 1, 50) ;150
Sleep(10)
    MouseClick( "left",568,425, 1, 50) ;151
Sleep(10)
    MouseClick( "left",546,413, 1, 50) ;152
Sleep(10)
    MouseClick( "left",513,400, 1, 50) ;153
Sleep(10)
    MouseClick( "left",488,390, 1, 50) ;154
Sleep(10)
    MouseClick( "left",467,376, 1, 50) ;155
Sleep(10)
    MouseClick( "left",437,364, 1, 50) ;156
Sleep(10)
    MouseClick( "left",423,354, 1, 50) ;157
Sleep(10)
    MouseClick( "left",395,345, 1, 50) ;158
Sleep(10)
    MouseClick( "left",371,329, 1, 50) ;159
Sleep(10)
    MouseClick( "left",353,317, 1, 50) ;160
Sleep(10)
    MouseClick( "left",362,308, 1, 50) ;161
Sleep(10)
    MouseClick( "left",396,317, 1, 50) ;162
Sleep(10)
    MouseClick( "left",422,330, 1, 50) ;163
Sleep(10)
    MouseClick( "left",440,341, 1, 50) ;164
Sleep(10)
    MouseClick( "left",466,349, 1, 50) ;165
Sleep(10)
    MouseClick( "left",493,367, 1, 50) ;166
Sleep(10)
    MouseClick( "left",509,383, 1, 50) ;167
Sleep(10)
    MouseClick( "left",547,394, 1, 50) ;168
Sleep(10)
    MouseClick( "left",565,403, 1, 50) ;169
Sleep(10)
    MouseClick( "left",587,410, 1, 50) ;170
Sleep(10)
    MouseClick( "left",613,429, 1, 50) ;171
Sleep(10)
    MouseClick( "left",647,441, 1, 50) ;172
Sleep(10)
    MouseClick( "left",667,453, 1, 50) ;173
Sleep(10)
    MouseClick( "left",688,465, 1, 50) ;174
Sleep(10)
    MouseClick( "left",711,475, 1, 50) ;175
Sleep(10)
    MouseClick( "left",736,483, 1, 50) ;176
Sleep(10)
    MouseClick( "left",763,498, 1, 50) ;177
Sleep(10)
    MouseClick( "left",784,508, 1, 50) ;178
Sleep(10)
    MouseClick( "left",811,522, 1, 50) ;179
Sleep(10)
    MouseClick( "left",837,538, 1, 50) ;180
Sleep(10)
    MouseClick( "left",869,525, 1, 50) ;181
Sleep(10)
    MouseClick( "left",842,508, 1, 50) ;182
Sleep(10)
    MouseClick( "left",816,498, 1, 50) ;183
Sleep(10)
    MouseClick( "left",797,483, 1, 50) ;184
Sleep(10)
    MouseClick( "left",771,473, 1, 50) ;185
Sleep(10)
    MouseClick( "left",734,457, 1, 50) ;186
Sleep(10)
    MouseClick( "left",725,456, 1, 50) ;187
Sleep(10)
    MouseClick( "left",694,438, 1, 50) ;188
Sleep(10)
    MouseClick( "left",673,430, 1, 50) ;189
Sleep(10)
    MouseClick( "left",650,413, 1, 50) ;190
Sleep(10)
    MouseClick( "left",617,396, 1, 50) ;191
Sleep(10)
    MouseClick( "left",601,390, 1, 50) ;192
Sleep(10)
    MouseClick( "left",563,376, 1, 50) ;193
Sleep(10)
    MouseClick( "left",543,364, 1, 50) ;194
Sleep(10)
    MouseClick( "left",516,351, 1, 50) ;195
Sleep(10)
    MouseClick( "left",487,340, 1, 50) ;196
Sleep(10)
    MouseClick( "left",470,330, 1, 50) ;197
Sleep(10)
    MouseClick( "left",451,317, 1, 50) ;198
Sleep(10)
    MouseClick( "left",426,309, 1, 50) ;199
Sleep(10)
    MouseClick( "left",399,295, 1, 50) ;200
Sleep(10)
    MouseClick( "left",413,283, 1, 50) ;201
Sleep(10)
    MouseClick( "left",448,293, 1, 50) ;202
Sleep(10)
    MouseClick( "left",474,304, 1, 50) ;203
Sleep(10)
    MouseClick( "left",498,321, 1, 50) ;204
Sleep(10)
    MouseClick( "left",517,332, 1, 50) ;205
Sleep(10)
    MouseClick( "left",538,342, 1, 50) ;206
Sleep(10)
    MouseClick( "left",560,357, 1, 50) ;207
Sleep(10)
    MouseClick( "left",581,371, 1, 50) ;208
Sleep(10)
    MouseClick( "left",607,381, 1, 50) ;209
Sleep(10)
    MouseClick( "left",648,395, 1, 50) ;210
Sleep(10)
    MouseClick( "left",657,403, 1, 50) ;211
Sleep(10)
    MouseClick( "left",691,412, 1, 50) ;212
Sleep(10)
    MouseClick( "left",716,425, 1, 50) ;213
Sleep(10)
    MouseClick( "left",746,441, 1, 50) ;214
Sleep(10)
    MouseClick( "left",765,450, 1, 50) ;215
Sleep(10)
    MouseClick( "left",787,463, 1, 50) ;216
Sleep(10)
    MouseClick( "left",813,474, 1, 50) ;217
Sleep(10)
    MouseClick( "left",835,485, 1, 50) ;218
Sleep(10)
    MouseClick( "left",864,500, 1, 50) ;219
Sleep(10)
    MouseClick( "left",888,510, 1, 50) ;220
Sleep(10)
    MouseClick( "left",919,498, 1, 50) ;221
Sleep(10)
    MouseClick( "left",887,481, 1, 50) ;222
Sleep(10)
    MouseClick( "left",871,471, 1, 50) ;223
Sleep(10)
    MouseClick( "left",844,458, 1, 50) ;224
Sleep(10)
    MouseClick( "left",818,449, 1, 50) ;225
Sleep(10)
    MouseClick( "left",795,439, 1, 50) ;226
Sleep(10)
    MouseClick( "left",775,430, 1, 50) ;227
Sleep(10)
    MouseClick( "left",752,418, 1, 50) ;228
Sleep(10)
    MouseClick( "left",727,405, 1, 50) ;229
Sleep(10)
    MouseClick( "left",690,387, 1, 50) ;230
Sleep(10)
    MouseClick( "left",669,376, 1, 50) ;231
Sleep(10)
    MouseClick( "left",645,365, 1, 50) ;232
Sleep(10)
    MouseClick( "left",618,354, 1, 50) ;233
Sleep(10)
    MouseClick( "left",591,345, 1, 50) ;234
Sleep(10)
    MouseClick( "left",570,330, 1, 50) ;235
Sleep(10)
    MouseClick( "left",548,314, 1, 50) ;236
Sleep(10)
    MouseClick( "left",547,318, 1, 50) ;237
Sleep(10)
    MouseClick( "left",523,309, 1, 50) ;238
Sleep(10)
    MouseClick( "left",489,297, 1, 50) ;239
Sleep(10)
    MouseClick( "left",476,284, 1, 50) ;240
Sleep(10)
    MouseClick( "left",447,271, 1, 50) ;241
Sleep(10)
    MouseClick( "left",470,261, 1, 50) ;242
Sleep(10)
    MouseClick( "left",495,276, 1, 50) ;243
Sleep(10)
    MouseClick( "left",522,289, 1, 50) ;244
Sleep(10)
    MouseClick( "left",542,299, 1, 50) ;245
Sleep(10)
    MouseClick( "left",562,306, 1, 50) ;246
Sleep(10)
    MouseClick( "left",597,322, 1, 50) ;247
Sleep(10)
    MouseClick( "left",619,330, 1, 50) ;248
Sleep(10)
    MouseClick( "left",638,346, 1, 50) ;249
Sleep(10)
    MouseClick( "left",661,360, 1, 50) ;250
Sleep(10)
    MouseClick( "left",686,369, 1, 50) ;251
Sleep(10)
    MouseClick( "left",714,379, 1, 50) ;252
Sleep(10)
    MouseClick( "left",735,391, 1, 50) ;253
Sleep(10)
    MouseClick( "left",759,403, 1, 50) ;254
Sleep(10)
    MouseClick( "left",791,418, 1, 50) ;255
Sleep(10)
    MouseClick( "left",821,425, 1, 50) ;256
Sleep(10)
    MouseClick( "left",845,438, 1, 50) ;257
Sleep(10)
    MouseClick( "left",873,451, 1, 50) ;258
Sleep(10)
    MouseClick( "left",889,462, 1, 50) ;259
Sleep(10)
    MouseClick( "left",911,476, 1, 50) ;260
Sleep(10)
    MouseClick( "left",938,487, 1, 50) ;261
Sleep(10)
    MouseClick( "left",961,473, 1, 50) ;262
Sleep(10)
    MouseClick( "left",938,459, 1, 50) ;263
Sleep(10)
    MouseClick( "left",922,446, 1, 50) ;264
Sleep(10)
    MouseClick( "left",895,439, 1, 50) ;265
Sleep(10)
    MouseClick( "left",868,426, 1, 50) ;266
Sleep(10)
    MouseClick( "left",846,408, 1, 50) ;267
Sleep(10)
    MouseClick( "left",852,417, 1, 50) ;268
Sleep(10)
    MouseClick( "left",822,401, 1, 50) ;269
Sleep(10)
    MouseClick( "left",791,390, 1, 50) ;270
Sleep(10)
    MouseClick( "left",765,377, 1, 50) ;271
Sleep(10)
    MouseClick( "left",746,366, 1, 50) ;272
Sleep(10)
    MouseClick( "left",719,353, 1, 50) ;273
Sleep(10)
    MouseClick( "left",688,342, 1, 50) ;274
Sleep(10)
    MouseClick( "left",667,328, 1, 50) ;275
Sleep(10)
    MouseClick( "left",642,315, 1, 50) ;276
Sleep(10)
    MouseClick( "left",619,313, 1, 50) ;277
Sleep(10)
    MouseClick( "left",588,293, 1, 50) ;278
Sleep(10)
    MouseClick( "left",570,282, 1, 50) ;279
Sleep(10)
    MouseClick( "left",548,268, 1, 50) ;280
Sleep(10)
    MouseClick( "left",519,259, 1, 50) ;281
Sleep(10)
    MouseClick( "left",493,247, 1, 50) ;282
Sleep(10)
    MouseClick( "left",526,239, 1, 50) ;283
Sleep(10)
    MouseClick( "left",544,247, 1, 50) ;284
Sleep(10)
    MouseClick( "left",581,264, 1, 50) ;285
Sleep(10)
    MouseClick( "left",596,276, 1, 50) ;286
Sleep(10)
    MouseClick( "left",613,283, 1, 50) ;287
Sleep(10)
    MouseClick( "left",642,295, 1, 50) ;288
Sleep(10)
    MouseClick( "left",670,313, 1, 50) ;289
Sleep(10)
    MouseClick( "left",688,318, 1, 50) ;290
Sleep(10)
    MouseClick( "left",708,336, 1, 50) ;291
Sleep(10)
    MouseClick( "left",746,347, 1, 50) ;292
Sleep(10)
    MouseClick( "left",765,356, 1, 50) ;293
Sleep(10)
    MouseClick( "left",787,364, 1, 50) ;294
Sleep(10)
    MouseClick( "left",814,376, 1, 50) ;295
Sleep(10)
    MouseClick( "left",838,388, 1, 50) ;296
Sleep(10)
    MouseClick( "left",871,403, 1, 50) ;297
Sleep(10)
    MouseClick( "left",890,414, 1, 50) ;298
Sleep(10)
    MouseClick( "left",916,428, 1, 50) ;299
Sleep(10)
    MouseClick( "left",938,434, 1, 50) ;300
Sleep(10)
    MouseClick( "left",973,454, 1, 50) ;301
Sleep(10)
    MouseClick( "left",988,462, 1, 50) ;302
Sleep(10)
    MouseClick( "left",1012,450, 1, 50) ;303
Sleep(10)
    MouseClick( "left",981,433, 1, 50) ;304
Sleep(10)
    MouseClick( "left",988,439, 1, 50) ;305
Sleep(10)
    MouseClick( "left",971,428, 1, 50) ;306
Sleep(10)
    MouseClick( "left",947,416, 1, 50) ;307
Sleep(10)
    MouseClick( "left",920,407, 1, 50) ;308
Sleep(10)
    MouseClick( "left",897,390, 1, 50) ;309
Sleep(10)
    MouseClick( "left",874,381, 1, 50) ;310
Sleep(10)
    MouseClick( "left",841,364, 1, 50) ;311
Sleep(10)
    MouseClick( "left",821,354, 1, 50) ;312
Sleep(10)
    MouseClick( "left",793,340, 1, 50) ;313
Sleep(10)
    MouseClick( "left",772,331, 1, 50) ;314
Sleep(10)
    MouseClick( "left",739,318, 1, 50) ;315
Sleep(10)
    MouseClick( "left",713,306, 1, 50) ;316
Sleep(10)
    MouseClick( "left",686,298, 1, 50) ;317
Sleep(10)
    MouseClick( "left",664,282, 1, 50) ;318
Sleep(10)
    MouseClick( "left",637,271, 1, 50) ;319
Sleep(10)
    MouseClick( "left",611,261, 1, 50) ;320
Sleep(10)
    MouseClick( "left",592,247, 1, 50) ;321
Sleep(10)
    MouseClick( "left",560,233, 1, 50) ;322
Sleep(10)
    MouseClick( "left",550,221, 1, 50) ;323
Sleep(10)
    MouseClick( "left",574,209, 1, 50) ;324

Sleep(10)
    MouseClick( "left",599,221, 1, 50) ;325
Sleep(10)
    MouseClick( "left",629,235, 1, 50) ;326
Sleep(10)
    MouseClick( "left",642,254, 1, 50) ;327
Sleep(10)
    MouseClick( "left",665,262, 1, 50) ;328
Sleep(10)
    MouseClick( "left",691,274, 1, 50) ;329
Sleep(10)
    MouseClick( "left",711,288, 1, 50) ;330
Sleep(10)
    MouseClick( "left",747,299, 1, 50) ;331
Sleep(10)
    MouseClick( "left",764,308, 1, 50) ;332
Sleep(10)
    MouseClick( "left",788,317, 1, 50) ;333
Sleep(10)
    MouseClick( "left",806,330, 1, 50) ;334
Sleep(10)
    MouseClick( "left",836,347, 1, 50) ;335
Sleep(10)
    MouseClick( "left",865,356, 1, 50) ;336
Sleep(10)
    MouseClick( "left",881,365, 1, 50) ;337
Sleep(10)
    MouseClick( "left",915,378, 1, 50) ;338
Sleep(10)
    MouseClick( "left",937,386, 1, 50) ;339
Sleep(10)
    MouseClick( "left",962,399, 1, 50) ;340
Sleep(10)
    MouseClick( "left",990,414, 1, 50) ;341
Sleep(10)
    MouseClick( "left",1013,425, 1, 50) ;342
Sleep(10)
    MouseClick( "left",1036,439, 1, 50) ;343
Sleep(10)
    MouseClick( "left",1063,423, 1, 50) ;344
Sleep(10)
    MouseClick( "left",1041,416, 1, 50) ;345
Sleep(10)
    MouseClick( "left",1019,406, 1, 50) ;346
Sleep(10)
    MouseClick( "left",997,393, 1, 50) ;347
Sleep(10)
    MouseClick( "left",970,376, 1, 50) ;348
Sleep(10)
    MouseClick( "left",946,362, 1, 50) ;349
Sleep(10)
    MouseClick( "left",924,359, 1, 50) ;350
Sleep(10)
    MouseClick( "left",894,345, 1, 50) ;351
Sleep(10)
    MouseClick( "left",871,330, 1, 50) ;352
Sleep(10)
    MouseClick( "left",846,316, 1, 50) ;353
Sleep(10)
    MouseClick( "left",813,304, 1, 50) ;354
Sleep(10)
    MouseClick( "left",791,291, 1, 50) ;355
Sleep(10)
    MouseClick( "left",766,282, 1, 50) ;356
Sleep(10)
    MouseClick( "left",745,270, 1, 50) ;357
Sleep(10)
    MouseClick( "left",709,256, 1, 50) ;358
Sleep(10)
    MouseClick( "left",695,250, 1, 50) ;359
Sleep(10)
    MouseClick( "left",662,236, 1, 50) ;360
Sleep(10)
    MouseClick( "left",643,225, 1, 50) ;361
Sleep(10)
    MouseClick( "left",617,210, 1, 50) ;362
Sleep(10)
    MouseClick( "left",603,198, 1, 50) ;363
Sleep(10)
    MouseClick( "left",624,194, 1, 50) ;364
Sleep(10)
    MouseClick( "left",639,198, 1, 50) ;365
Sleep(10)
    MouseClick( "left",677,212, 1, 50) ;366
Sleep(10)
    MouseClick( "left",696,226, 1, 50) ;367
Sleep(10)
    MouseClick( "left",725,237, 1, 50) ;368
Sleep(10)
    MouseClick( "left",750,250, 1, 50) ;369
Sleep(10)
    MouseClick( "left",771,263, 1, 50) ;370
Sleep(10)
    MouseClick( "left",793,275, 1, 50) ;371
Sleep(10)
    MouseClick( "left",815,285, 1, 50) ;372
Sleep(10)
    MouseClick( "left",847,298, 1, 50) ;373
Sleep(10)
    MouseClick( "left",863,309, 1, 50) ;374
Sleep(10)
    MouseClick( "left",889,321, 1, 50) ;375
Sleep(10)
    MouseClick( "left",911,329, 1, 50) ;376
Sleep(10)
    MouseClick( "left",932,342, 1, 50) ;377
Sleep(10)
    MouseClick( "left",973,359, 1, 50) ;378
Sleep(10)
    MouseClick( "left",993,367, 1, 50) ;379
Sleep(10)
    MouseClick( "left",1009,380, 1, 50) ;380
Sleep(10)
    MouseClick( "left",1044,390, 1, 50) ;381
Sleep(10)
    MouseClick( "left",1063,400, 1, 50) ;382
Sleep(10)
    MouseClick( "left",1086,416, 1, 50) ;383
Sleep(10)
    MouseClick( "left",1106,403, 1, 50) ;384
Sleep(10)
    MouseClick( "left",1081,390, 1, 50) ;385
Sleep(10)
    MouseClick( "left",1062,380, 1, 50) ;386
Sleep(10)
    MouseClick( "left",1046,369, 1, 50) ;387
Sleep(10)
    MouseClick( "left",1010,352, 1, 50) ;388
Sleep(10)
    MouseClick( "left",993,337, 1, 50) ;389
Sleep(10)
    MouseClick( "left",972,326, 1, 50) ;390
Sleep(10)
    MouseClick( "left",942,313, 1, 50) ;391
Sleep(10)
    MouseClick( "left",921,308, 1, 50) ;392
Sleep(10)
    MouseClick( "left",895,296, 1, 50) ;393
Sleep(10)
    MouseClick( "left",866,283, 1, 50) ;394
Sleep(10)
    MouseClick( "left",839,269, 1, 50) ;395
Sleep(10)
    MouseClick( "left",812,257, 1, 50) ;396
Sleep(10)
    MouseClick( "left",787,246, 1, 50) ;397
Sleep(10)
    MouseClick( "left",770,237, 1, 50) ;398
Sleep(10)
    MouseClick( "left",740,223, 1, 50) ;399
Sleep(10)
    MouseClick( "left",716,210, 1, 50) ;400
Sleep(10)
    MouseClick( "left",686,196, 1, 50) ;401
Sleep(10)
    MouseClick( "left",667,183, 1, 50) ;402
Sleep(10)
    MouseClick( "left",642,174, 1, 50) ;403
EndFunc

It just clicks farmville on my own monitor and move the mouse around. I want to implement the timer to show on my desktop for how long the script is running. Where do i put it so the seconds are counting like a clock? Some thing like that:

$Timerinit=TimerInit();start timer

while 1
ToolTip(Round(Round(TimerDiff($TimerInit))/1000), 1100, 100)
Sleep(1000)
Wend

Thanks for answering.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

@dumbledor

Way to hijack a thread...

@crapnonsense

What do you want the script to do at these times? just notify you?

This script isn't quite working but it is close and give you something to start with.

#Include <Date.au3>

$a=0
While 1

MsgBox(0,"Timer","Time was reached",3)
If $a=0 Then
    $b=9
ElseIf $a=1 Then
    $b=3
    EndIf

$new=_DateAdd("n",$b,_NowCalc())

Select
Case $a=0
    $a=1
Case $a=1
    $a=0
EndSelect

$new2=StringTrimLeft($new,10)


MsgBox(0,"Now",_NowTime(5)&", "&$new2,5)

Do
    Sleep(10)
    Until _NowTime(5)=$new2

WEnd
Edited by kaotkbliss

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Can you use generic time intervals to drive your events? Or do you need to use a hardcoded table of actual times (like 6:32pm)? Do you have just the two events, that alternate at equal spaced intervals? You may or may not need to maintain multiple timers. This is an example that uses a single timer and a flag to toggle two different events at equal intervals...

Global $EventType; False = lose, True = win
Global $EventName[2] = ["LOSE", "WIN"]
Global $Interval = 10000 ; milliseconds
$Timerinit = TimerInit();start timer

While 1
    $Time = TimerDiff($TimerInit)
    Tooltip("Seconds until next " & $EventName[$EventType] & ": " & Round(($interval - $Time)/1000), 80, 80)
    If $Time > $Interval Then
        $Timerinit = TimerInit();reset timer
        Call($EventName[$EventType])
        $EventType = Not $EventType
    Else
        Sleep(50)
    EndIf
Wend
Exit
;-------------------------------------------------------------------------------

Func Lose()
    MsgBox(1,"","Lose :(", 1)
EndFunc

Func Win()
    MsgBox(1,"","WIN!!!", 1)
EndFunc
Edited by Spiff59

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
Sign in to follow this  
Followers 0