[Function] SplashText

Post your working scripts, libraries and tools
iPhilip
Posts: 273
Joined: 02 Oct 2013, 12:21

[Function] SplashText

08 May 2018, 17:43

Hi folks,

I would like to share with you a function that I use to splash text on the screen. The function SplashText uses an unnamed/unnumbered GUI window to show a text control. The goal was to create a simple but customizable function to replace SplashTextOn/SplashTextOff, especially given that those commands are no longer available in AutoHotkey v2 [link].

Here is the function:

Code: [Select all] [Expand] [Download] (SplashText.ahk)GeSHi © Codebox Plus

Here is a self-contained example:

Code: [Select all] [Expand] [Download] (SplashText Example v1.1.ahk)GeSHi © Codebox Plus


AHK v2 version

I hope you find it useful.

- iPhilip
Windows 7 Pro (64 bit) - AutoHotkey v1.1+ (Unicode 32-bit)
User avatar
kczx3
Posts: 543
Joined: 06 Oct 2015, 21:39

Re: [Function] SplashText

08 May 2018, 19:27

Why are the first two parameters passed ByRef?
iPhilip
Posts: 273
Joined: 02 Oct 2013, 12:21

Re: [Function] SplashText

08 May 2018, 19:37

kczx3 wrote:Why are the first two parameters passed ByRef?

From the ByRef documentation page:
When passing large strings to a function, ByRef enhances performance and conserves memory by avoiding the need to make a copy of the string.
Windows 7 Pro (64 bit) - AutoHotkey v1.1+ (Unicode 32-bit)
burque505
Posts: 388
Joined: 22 Jan 2017, 19:37

Re: [Function] SplashText

08 May 2018, 20:15

Thank you for sharing this, iPhilip, it will certainly come in handy.
The code is really well documented, by the way.
Regards,
burque505
ozzii
Posts: 303
Joined: 30 Oct 2013, 06:04

Re: [Function] SplashText

09 May 2018, 03:51

This can be useful and like said burque505 well documented.
Helgef
Posts: 2901
Joined: 17 Jul 2016, 01:02
Contact:

Re: [Function] SplashText

12 May 2018, 03:41

Very nice, v2 version works well, 2.0-a096-2ad11cb. Maybe intentional, but DefaultOptions has no show key.

Thanks for sharing, cheers.
iPhilip
Posts: 273
Joined: 02 Oct 2013, 12:21

Re: [Function] SplashText

12 May 2018, 15:23

burque505 wrote:Thank you for sharing this, iPhilip, it will certainly come in handy.
The code is really well documented, by the way.
Regards,
burque505
You are welcome, burque505. I hope the effort I put into the documentation will make it easier for people to use.

ozzii wrote:This can be useful and like said burque505 well documented.
Glad you like it, ozzii. :)

Helgef wrote:Very nice, v2 version works well, 2.0-a096-2ad11cb. Maybe intentional, but DefaultOptions has no show key.

Thanks for sharing, cheers.
Thank you, Helgef. Glad you were able to test the v2 version. Yes, I intentionally left out the Show and BackColor keys from the definition of DefaultOptions so as to use the default settings for the placement and color of the GUI window. I would encourage people to modify DefaultOptions to suit their preferences.
Windows 7 Pro (64 bit) - AutoHotkey v1.1+ (Unicode 32-bit)
guest2

Re: [Function] SplashText

13 May 2018, 10:13

I wanted to change back color, but cannot instructions in Help manual that pertains to thus Function and parameters. You did not give an example. Perhaps AHK is only for those that already know how?
iPhilip
Posts: 273
Joined: 02 Oct 2013, 12:21

Re: [Function] SplashText

13 May 2018, 16:08

guest2 wrote:I wanted to change back color, but cannot instructions in Help manual that pertains to thus Function and parameters. You did not give an example. Perhaps AHK is only for those that already know how?
Thank you for trying out the function. I put this link in the function documentation so that you could see what's needed to change the background color but the issue might have to do with arrays so here's a self-contained example for you to try that specifies every option:

Code: [Select all] [Expand] [Download] (Untitled.ahk)GeSHi © Codebox Plus

Let me know how this works out for you.
Windows 7 Pro (64 bit) - AutoHotkey v1.1+ (Unicode 32-bit)
guest2

Re: [Function] SplashText

13 May 2018, 17:34

wrt "Let me know how this works out for you."

It works absolutely wonderful and what a perfect and complete response. You have made me (maybe others a great fan). Thank you.
iPhilip
Posts: 273
Joined: 02 Oct 2013, 12:21

Re: [Function] SplashText

13 May 2018, 18:01

You are welcome. :)
Windows 7 Pro (64 bit) - AutoHotkey v1.1+ (Unicode 32-bit)

Return to “Scripts and Functions”

Who is online

Users browsing this forum: arcticir, kunkel321 and 10 guests