WiseGui() : Themed splash text UI

Post your working scripts, libraries and tools.
User avatar
josephthom12
Posts: 5
Joined: 21 May 2023, 18:55

Re: WiseGui() : Themed splash text UI

22 May 2023, 09:06

SKAN your WiseGui() code is fine. gregster yes. But the error messages indicate that I can't or don't understand exactly how to run any function made with V2. Or there's an issue with setup?
Using Windows 10. Installed AhkV1-V2. Notepad++ main editor (setup by jNizM GitHub) Lib file location for AhkV2 functions are stored into root directory. AhkV2 editor settings are set up to automatically default all scripts V2.

From the perspective of a non-programmer using AhkV1 is easy. Save the script with the proper extension and run. Use #include to access functions. Maybe the process is different with AhkV2? Do I need Visual Studio to run a .ahk2 or .ah2 file?
User avatar
SKAN
Posts: 1551
Joined: 29 Sep 2013, 16:58

Re: WiseGui() : Themed splash text UI

22 May 2023, 13:05

josephthom12 wrote:
22 May 2023, 09:06
SKAN your WiseGui() code is fine.
Thanks for the confirmation.

Can't really help you with installation process. I'm downloading and using .zip version,
patching exe with my own icons, using .ah2 extension and manually feeding registry entries.
BruceO
Posts: 12
Joined: 06 Sep 2019, 11:15

Re: WiseGui() : Themed splash text UI

24 May 2023, 07:12

I have noticed that in the MainText and SubText you are able to change the font size, type, and other options; But i see nothing about the font color being able to be changed. Can the fount color be changed in the FontMain or FontSub sections of MainText/SubText options?
User avatar
SKAN
Posts: 1551
Joined: 29 Sep 2013, 16:58

Re: WiseGui() : Themed splash text UI

24 May 2023, 08:42

BruceO wrote:
24 May 2023, 07:12
Can the fount color be changed in the FontMain or FontSub sections of MainText/SubText options?
Edit:
Text colors are enforced by theme.
Custom theme:
You may pass your own theme with 4 comma separated values and in this exact order: TextColor, WindowColor, BorderColor, [HICON]
BruceO
Posts: 12
Joined: 06 Sep 2019, 11:15

Re: WiseGui() : Themed splash text UI

24 May 2023, 10:39

One more ? can the theme's have an "OK" or "CANCEL" button included?
User avatar
SKAN
Posts: 1551
Joined: 29 Sep 2013, 16:58

Re: WiseGui() : Themed splash text UI

24 May 2023, 18:59

BruceO wrote:
24 May 2023, 10:39
have an "OK" or "CANCEL" button included?
That wouldn't suit a 'splash text' UI.
User avatar
boiler
Posts: 16978
Joined: 21 Dec 2014, 02:44

Re: WiseGui() : Themed splash text UI

25 May 2023, 03:32

josephthom12 wrote: Using Windows 10. Installed AhkV1-V2. Notepad++ main editor (setup by jNizM GitHub) Lib file location for AhkV2 functions are stored into root directory. AhkV2 editor settings are set up to automatically default all scripts V2.

Do I need Visual Studio to run a .ahk2 or .ah2 file?
Try running your scripts by opening them from File Explorer.

I don’t see how it’s possible that you had two #Include lines in your script since the error message shows lines starting at line 2, so there aren’t even two lines in the script prior to what you’ve shown. If you expect functions to be auto-included because they are in a library location, v2 doesn’t work that way.
User avatar
SKAN
Posts: 1551
Joined: 29 Sep 2013, 16:58

Re: WiseGui() : Themed splash text UI

25 May 2023, 09:49

cyruz wrote:
21 Jan 2023, 19:05
There is also a small glitch when the WiseGui gets destroyed. It happens even when using animations.
:shock:
@cyruz
Can you please elaborate?
BruceO
Posts: 12
Joined: 06 Sep 2019, 11:15

Re: WiseGui() : Themed splash text UI

29 May 2023, 12:49

Can Multiple SUBTEXT lines be used or is the function limited to one SUBTEXT line?
User avatar
SKAN
Posts: 1551
Joined: 29 Sep 2013, 16:58

Re: WiseGui() : Themed splash text UI

29 May 2023, 13:25

BruceO wrote:
29 May 2023, 12:49
Can Multiple SUBTEXT lines be used or is the function limited to one SUBTEXT line?
 

Please take time to look at the examples:
 
Example 1:
 
Image
 

Code: Select all

WiseGui( "Test"
       , "MainText:  Lorem ipsum"
       , "SubText:   Sed ut perspiciatis unde`nomnis iste natus error sit voluptatem"
       )
Junkyard0207
Posts: 2
Joined: 17 Aug 2023, 18:21

Re: WiseGui() : Themed splash text UI

03 Sep 2023, 10:19

Outstanding script! I was searching in hopes of finding something a bit better than the standard TrayTip function and found this which is 10000% better. Thank you so much :D
User avatar
fischgeek
Posts: 435
Joined: 29 Jan 2014, 21:39

Re: WiseGui() : Themed splash text UI

27 Mar 2024, 09:19

I really like this script. I'm trying to extend the functionality a little bit, but before I do I should preface that all my gui knowledge comes exclusively from v1. I'm just now jumping into v2 gui's. SKAN stated that the click to dismiss is not a callback. However, I think it can very easily be treated as such.

Code: Select all

WiseGui("JF Script", "Timer: 5000", "Close: Trigger", WiseGuiWasClicked, "MainText: JF Script", "SubText: Hello there.")
WiseGuiWasClicked(P*) ; Requires variadic params to deal with BoundFunc
{
	Switch( P[1] )                         ; Check first parameter if being called as Func
	{                                      ; Check final parameter if being called as BoundFunc
		Case  0 :                          ; No mouse click
		Case  1 : 						   ; Left clicked
			MsgBox("Hello World") ; <-- this works. - i.e. callback.
			return
		Case -1 : SoundBeep(), SoundBeep() ; Right clicked
	}
}
The specific issue I'm having is getting a handle on the WiseGui Gui. According to the docs Gui's are only retrieved with the Hwnd which is inaccessible because WG is not an instance. Is there another way to get a handle on WG's Hwnd so I can try and retrieve some information on it in my "not callback" callback?

Return to “Scripts and Functions (v2)”

Who is online

Users browsing this forum: No registered users and 48 guests