Help - Search - Members - Calendar
Full Version: My little Code crashes
AC Tools Everything Macro > AC Tool Macros > Macro Development
bernd1982
CODE
Constants
Time = 0
End

Procedure DoSomething
FormatDateTime Time = {now}, h:n:s
if $Time > 21:40:00
Keys 500 //enter a number
else
Call DoSomething // Time is not entered so call proc. again
End
End

Call DoSomething


Its my first script, i am sorry for this noob fault tongue.gif
Maybe has someone an idea whats wrong with my code?
Ipa
Recursion bug.

CODE
Constants
  Time = 0
End

While 1 = 1

  FormatDateTime Time = {now}, h:n:s
  if $Time > 21:40:00
    Keys 500 //enter a number
  End
  Delay 10  // yield at least a little CPU to other processes
End
Bear
CODE
Procedure DoSomething when {hour} = 21 and {Minute} > 39
    Keys 500 //enter a number
    STOP
End
While 1 = 1
  Delay 50
  ProcessMessages
End
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.