Jump to content
Sign in to follow this  
TheCats

SplashTextOn Background/Text colors?

Recommended Posts

TheCats

How do I set the Background and Text colors for an "SplashTextOn"?

My current code:

GUICreate("ST19XL", 225, 225, -1, -1, $WS_SYSMENU)

; Colors

GUISetBkColor(0xF8F8F8) ;Background BOX Color

GUICtrlSetDefBkColor(0xF8F8F8) ; Background Text Color

GUICtrlSetDefColor(0x0000FF) ; Forground text color

.

.

.

SplashTextOn("WinActivate", $win_name & " - Not Present" & @LF & @LF & "Will continue in 3 seconds", 170, 75, -1, -1, 33, "", 10)

Sleep(3000)

SplashOff()

I/m Okay with on the GUI Colors, but want the Splash to be RED or bright - the Gray just does not grab/alert the users..

Edited by TheCats

Share this post


Link to post
Share on other sites
TheCats

Download "_SplashTextWithGraphic.au3" and tried to your the code, but get this error, plus others

Code:

#include "_SplashTextWithGraphic.au3"

$graphic = "\bigben.jpg"

$text = @crlf & "This is my test text with a graphic"

$var = _SplashTextWithGraphicOn("SplashText With Graphic",$text,500,400,-1,-1,$graphic,120,5,0,0,32,"",48)

If $var > 0 then ConsoleWrite("_SplashTextWithGraphicOn() had error " & $var & @crlf)

Sleep (5000)

_SplashTextWithGraphicOFF()

Error:

C:\Program Files\AutoIt3\Include\_SplashTextWithGraphic.au3(142,91) : WARNING: $WS_POPUP: possibly used before declaration.

$Splash_Gui_Main = GuiCreate($vWinTitle,$iWidth,$iHeight,$iXPos,$iYPos, BitOr ($WS_POPUP,

Share this post


Link to post
Share on other sites
martin

Download "_SplashTextWithGraphic.au3" and tried to your the code, but get this error, plus others

Have another look at the thread TheCats, I have added an updated version and added the option to set the text colour. (here)


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
TheCats

Martin,

Got it - no errors. This is getting close, I will try to add a backgroud color parameter???

Great Code......

Thanks

TheCats

Share this post


Link to post
Share on other sites
TheCats

Got it to hard set background color putting, just after line 164:

GUICtrlSetBkColor($edit,0xF8F8F8) ; Background Text Color

Got the background color, but lost the Image..

Share this post


Link to post
Share on other sites
martin

Got it to hard set background color putting, just after line 164:

GUICtrlSetBkColor($edit,0xF8F8F8) ; Background Text Color

Got the background color, but lost the Image..

Instead of doing that add this line after the splash_Gui_Main is created

GUISetBkColor(0xffff00) ; Background Color

If you only want the text background to be coloured then replace

GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

with

GUICtrlSetBkColor(-1, 0xF8F8F8)


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.