Ok, this is what I ended up with and so far and it seems to work like I want it to, no errors yet. Dispalys the first img 3 times every 5 min I think... then if the pc has been idle for 8 min or longer it displays the 2nd image randomly about the screen untill the mouse moves or the keyboard is touched.
Code:
#Persistent
SetTimer, Label, 100
Return
Label:
If A_TimeIdle > 500000
GoSub, loopy
If A_TimeIdle < 500000
Goto, normal
Return
loopy:
Loop
{
Random, var3, 22,1269
Random, var4, 14,777
FormatTime, var1,YYYYMMDDHH24MISS, yyyyMMdd
var1 = %var1%1700
var2 =
EnvSub, var1, %var2%, m
SplashImage, pic.jpg,,,txt %var1%, woot!,
WinMove, woot!,,%var3%,%var4%
If A_TimeIdle < 500000
Goto, normal
Sleep, 700
Random, var3, 22,1269
Random, var4, 14,777
WinMove, woot!,,%var3%,%var4%
If A_TimeIdle < 500000
Goto, normal
Sleep, 800
Random, var3, 22,1269
Random, var4, 14,777
WinMove, woot!,, %var3%,%var4%
If A_TimeIdle < 500000
Goto, normal
Sleep, 1500
SplashImage, Off
Sleep, 1000
If A_TimeIdle < 500000
Goto, normal
}
normal:
Loop
{
Random, var3, 39, 1410
Random, var4, 26, 857
FormatTime, var1,YYYYMMDDHH24MISS, yyyyMMdd
var1 = %var1%1700
var2 =
EnvSub, var1, %var2%, m
SplashImage, wow.bmp,,,Only %var1% min till gamez!, Timez to go!,
WinMove, Timez to go!,,%var3%,%Var4%
If A_TimeIdle > 500000
GoSub, loopy
Sleep, 700
Random, var3, 39, 1410
Random, var4, 26, 857
WinMove, Timez to go!,,%var3%,%Var4%
If A_TimeIdle > 500000
GoSub, loopy
Sleep, 800
Random, var3, 39, 1410
Random, var4, 26, 857
WinMove, Timez to go!,, %var3%,%Var4%
If A_TimeIdle > 500000
GoSub, loopy
Sleep, 1500
SplashImage, Off
Sleep, 300000
If A_TimeIdle > 500000
GoSub, loopy
}
If anyone sees where the code can be cleaned up or improved plz post!
Thanks!