Jump to content

Recommended Posts

Posted (edited)

Hello,

you can use multiple whileloops

Spoiler
#include <Color.au3>

Local $RGB[] = [ 255, 0 , 0]
Local $SleepTime = 10

$hGUI = GUICreate("test", 100, 100)
GUISetBkColor(_ColorSetRGB($RGB), $hGUI)
GUISetState(@SW_SHOW)

For $i = 1 To 10
    While $RGB[1] < 255
        $RGB[1] += 1
        GUISetBkColor(_ColorSetRGB($RGB), $hGUI)
        Sleep($SleepTime)
    WEnd

    While $RGB[0] > 0
        $RGB[0] -= 1
        GUISetBkColor(_ColorSetRGB($RGB), $hGUI)
        Sleep($SleepTime)
    WEnd

    While $RGB[2] < 255
        $RGB[2] += 1
        GUISetBkColor(_ColorSetRGB($RGB), $hGUI)
        Sleep($SleepTime)
    WEnd

    While $RGB[1] > 0
        $RGB[1] -= 1
        GUISetBkColor(_ColorSetRGB($RGB), $hGUI)
        Sleep($SleepTime)
    WEnd

    While $RGB[0] < 255
        $RGB[0] += 1
        GUISetBkColor(_ColorSetRGB($RGB), $hGUI)
        Sleep($SleepTime)
    WEnd

    While $RGB[2] > 0
        $RGB[2] -= 1
        GUISetBkColor(_ColorSetRGB($RGB), $hGUI)
        Sleep($SleepTime)
    WEnd
Next

 

 

Edited by bernd670

greetings
bernd


I hacked 127.0.0.1 -> pcfred6.gif

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