Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Text or Background Color Change

$
0
0
Here is a script we currently use.   Mgmt is now wanting the text and/or background to change color instead of the Font changing size.

Is there a way to do this?

#include <Date.au3>
#include <File.au3>
#include "array.au3"
#include "String.au3"
#include <Sound.au3>
#include <Constants.au3>

Opt("TrayMenuMode", 1) ; Default tray menu items (Script Paused/Exit) will not be shown.
Opt("WinTitleMatchMode", 1) ;1=start
;HotKeySet("^z", "Terminate"); Press Ctrl z to terminate script
[indent=1]
While 9 = 9
Sleep(2000) ;answered during ringing...wait 6 seconds?
SplashTextOn("Talk Timer", "0 Secs", 80, 40, 1050, 9, -1, "Arial", 9, 400)
$BeginTime = TimerInit()
$CountTo = 600 ;stop at 10 minutes
$SecondsLapsed = 0
$message = ""
While $SecondsLapsed < $CountTo
$TimeDifference = TimerDiff($BeginTime)
$SecondsLapsed = Round($TimeDifference / 1000, 0)

If $SecondsLapsed >= 180 And $SecondsLapsed < 240 Then ;up to 3 minutes
SplashTextOn("Talk Timer", "", 120, 40, 1050, 9, -1, "Arial", 9, 500)
$message = "3 Minutes..."
ElseIf $SecondsLapsed >= 240 And $SecondsLapsed < 300 Then ;at 4 minutes
$message = "Over 4 Minutes..."
SplashTextOn("Talk Timer", "", 150, 40, 1050, 9, -1, "Arial", 10, 500)
ElseIf $SecondsLapsed >= 300 And $SecondsLapsed < 360 Then ;at 5 minutes
$message = "Over 5 Minutes..."
SplashTextOn("Talk Timer", "", 150, 40, 1050, 9, -1, "Arial", 11, 600)
ElseIf $SecondsLapsed >= 360 And $SecondsLapsed < 420 Then ;at 6 minutes
$message = "Over 6 Minutes..."
SplashTextOn("Talk Timer", "", 170, 40, 1050, 9, -1, "Arial", 12, 700)
ElseIf $SecondsLapsed >= 420 And $SecondsLapsed < 480 Then ;at 7 minutes
$message = "Over 7 Minutes now..."
SplashTextOn("Talk Timer", "", 190, 40, 1050, 9, -1, "Arial", 12, 800)
ElseIf $SecondsLapsed >= 480 And $SecondsLapsed < 540 Then
$message = "Call is over 8 Minutes!"
SplashTextOn("Talk Timer", "", 210, 40, 1050, 9, -1, "Arial", 12, 800)
ElseIf $SecondsLapsed > 540 Then
$message = "Over 9 Minutes Now!"
SplashTextOn("Talk Timer", "", 220, 40, 1050, 9, -1, "Arial", 14, 800)
EndIf
If $SecondsLapsed <= 180 Then
ControlSetText("Talk Timer", "", "Static1", $message & $SecondsLapsed & " Secs")
Else
ControlSetText("Talk Timer", "", "Static1", $message)
EndIf
Sleep(1000)
WEnd
WEnd

[/indent]

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>