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?
WiseGui() : Themed splash text UI
- josephthom12
- Posts: 5
- Joined: 21 May 2023, 18:55
Re: WiseGui() : Themed splash text UI
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.
Re: WiseGui() : Themed splash text UI
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?
Re: WiseGui() : Themed splash text UI
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]
Re: WiseGui() : Themed splash text UI
One more ? can the theme's have an "OK" or "CANCEL" button included?
Re: WiseGui() : Themed splash text UI
Try running your scripts by opening them from File Explorer.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?
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.
Re: WiseGui() : Themed splash text UI
Can Multiple SUBTEXT lines be used or is the function limited to one SUBTEXT line?
Re: WiseGui() : Themed splash text UI
Please take time to look at the examples:
Example 1:
Code: Select all
WiseGui( "Test" , "MainText: Lorem ipsum" , "SubText: Sed ut perspiciatis unde`nomnis iste natus error sit voluptatem" )
-
- Posts: 2
- Joined: 17 Aug 2023, 18:21
Re: WiseGui() : Themed splash text UI
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
Re: WiseGui() : Themed splash text UI
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.
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?
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
}
}
Return to “Scripts and Functions (v2)”
Who is online
Users browsing this forum: No registered users and 68 guests