Sign in to follow this  
Followers 0
Lord_Terin

Random Process at a Random Time

4 posts in this topic

Hello Everyone,

I have a very unique project I am attempting to complete.

I have a bunch of safety images that I want to display at random points on the screen with random images, and last but not least and the hardest to accomplish............. at random times in the day.

I have the script almost completed bar for the random time.

Has anyone looked at a situation like this?

Would like any input

Cheers

Lord_Terin

***Never Trouble Trouble Until Trouble Troubles You***

Share this post


Link to post
Share on other sites



Hello Everyone,

I have a very unique project I am attempting to complete.

I have a bunch of safety images that I want to display at random points on the screen with random images, and last but not least and the hardest to accomplish............. at random times in the day.

I have the script almost completed bar for the random time.

Has anyone looked at a situation like this?

Would like any input

Cheers

Lord_Terin

***Never Trouble Trouble Until Trouble Troubles You***

Post what you have so far.


AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

Ugh... Code tags are a wonderful thing... Is this what your looking for? I tested it, it worked fine

Local $PicDirectory = @DocumentsCommonDir & '\My Pictures\Sample Pictures\'
Local $aRandomExe[5] = ['', $PicDirectory & 'Blue hills.jpg', $PicDirectory & 'Sunset.jpg', $PicDirectory & 'Water lilies.jpg', $PicDirectory & 'Winter.jpg']
Local $anRandomTimes[5] = ['', '01:23', '01:20', '01:22', '01:21']
$inRandomExe = Random(1, UBound($aRandomExe) - 1, 1)
$inRandomTime = Random(1, UBound($anRandomTimes) - 1, 1)
$aSplitTime = StringSplit($anRandomTimes[$inRandomTime], ':')

While 1
    Sleep(1000)
    If Int($aSplitTime[1]) = Int(@HOUR) And Int($aSplitTime[2]) = Int(@MIN) Then
        Run('MsPaint.exe ' & '"' & $aRandomExe[$inRandomExe] & '"')
        ExitLoop
    EndIf
WEnd


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

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