i think if the html has something referring back to the ahk script, for instance, onclick="ahk.buttonclicked(event, something)", can more unveil the usefulness of neutron.
[Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids (now for v2!)
-
- Posts: 143
- Joined: 25 Dec 2020, 12:26
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids
Thank you for this!
Is there by chance a way to set the height automatically depending on the contents of the html file - up to the GUI option MaxSize?
Is there by chance a way to set the height automatically depending on the contents of the html file - up to the GUI option MaxSize?
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids
Well on page load you could get the body size, then use ahk to scale the window....
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
-
- Posts: 2
- Joined: 14 Aug 2022, 08:03
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids
I wonder if someday I could make it possible to create a sub-par version of the Discord desktop version or maybe a YouTube application.
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids
Many have already, but using electron/node.js and other web-based frameworks.ragegraylin wrote: ↑16 Sep 2022, 06:56I wonder if someday I could make it possible to create a sub-par version of the Discord desktop version or maybe a YouTube application.
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x16GB Kingston FURY Beast - DDR4 3200 MHz | [About Me] | [About the AHK Foundation] | [Courses on AutoHotkey]
[ASPDM - StdLib Distribution] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library]
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids
memberlist.php?mode=viewprofile&u=64445geek
thanks g33kdude
basically used your foundation for all my vr game mods. helped elevate my weekend-warrior coding.
(I doubt anyone wants them but for reference https://github.com/samfisherirl/Geo3D_Manager https://github.com/samfisherirl/Artum-VR_Screen_Cap-Gui )
https://github.com/samfisherirl
? /Easy-Auto-GUI-for-AHK-v2 ? /Useful-AHK-v2-Libraries-and-Classes : /Pulovers-Macro-Creator-for-AHKv2 :
? /Easy-Auto-GUI-for-AHK-v2 ? /Useful-AHK-v2-Libraries-and-Classes : /Pulovers-Macro-Creator-for-AHKv2 :
-
- Posts: 104
- Joined: 07 Aug 2015, 15:53
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids
I tried this.SundayProgrammer wrote: ↑12 Aug 2022, 13:02i think if the html has something referring back to the ahk script, for instance, onclick="ahk.buttonclicked(event, something)", can more unveil the usefulness of neutron.
- Modified neutron.ahk
- Created an html page on a server
- Put required tags ahk.button etc.
- opened in neutronwindow
It works.
Plus side; You dont need js, css, image files to be created.
You can save form datas directly to the server and the ahk objects.
I guess you can allso cache css's
Negative side; It loads webpage from remote server so it can lag a bit.
-
- Posts: 104
- Joined: 07 Aug 2015, 15:53
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids
Please see the code. Button function. How can i handle that buttonClick event inside that class? Not the global scope.
Code: Select all
#Persistent
#Include, ../lib/Neutron.ahk
P := new PharmacyGui()
P.showGui()
;How can i get this function to work in PharmacyGui class as a method.
;I should handle the form data inside, not the global scope, amn't I?
Button(neutron, event) {
MsgBox, Pushed me.
}
class PharmacyGui {
showGui() {
template =
(
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="./css/vital-ui-kit.css">
<link rel="stylesheet" href="./css/styleguide.css">
<script src="./js/jquery.min.js"></script>
<script src="./js/vital-ui-kit.js"></script>
</head>
<body>
<input type="button" value="Push Me" onclick="ahk.Button(event)" />
</body>
</html>
)
FileDelete, template.html
FileAppend, % template, template.html
neutron := new NeutronWindow()
neutron.Load("template.html")
neutron.Gui("+LabelNeutron")
neutron.Show()
}
;Somewhere around here. As a method.
}
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids
geek wrote: ↑04 Jun 2020, 00:06Welcome to Neutron
Neutron provides a powerful set of tools for build HTML-based user interfaces with AutoHotkey. It leverages the Trident engine, known for its use in Internet Explorer, because of its deep integration with the Microsoft Windows operating system and its wide availability across systems.
(...)
Wow! I just have to drop by and say this is amazing. I've been keeping my eye out for AHK GUI-tools for a while (as well as some Python tools, as I've been dabbling in that), and the execution of Neutron seems very good.
It's really pushing me to get back into coding for AutoHotkey again. Will give it a shot, but first just compliments on doing this. (I watched most of the video)
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids
@sumon Long time no see.. glad you still around
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids (now for v2!)
Neutron has now been fully ported to AHKv2! See here: https://github.com/G33kDude/Neutron.ahk/tree/v2 or the link at the top of the original post
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids (now for v2!)
Great!geek wrote: ↑23 Dec 2022, 18:23Neutron has now been fully ported to AHKv2! See here: https://github.com/G33kDude/Neutron.ahk/tree/v2 or the link at the top of the original post
In the template.ahk example script the form part appears to have some kind of issue, the form data values are always blank
MsgBox "Hello " formData.firstName " " formData.lastName "!"
- oldbrother
- Posts: 279
- Joined: 23 Oct 2013, 05:08
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids (now for v2!)
Thank you.
The 2.0 example of "HTML Generation" doesn't work properly.
The 2.0 example of "HTML Generation" doesn't work properly.
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids (now for v2!)
Both of those problems were related. I had a > where I should have had a < and so the form data submissions were never getting loaded into AHK. Not sure how I missed that thanks for the bug reports!
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids (now for v2!)
@sashaatx
Looks great, having an eye on it!
Looks great, having an eye on it!
-
- Posts: 4
- Joined: 31 Oct 2020, 08:47
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids (now for v2!)
Loving the look of the GUI with Neutron!
Has anyone figured out a way to cut/copy/paste in the Neutron GUI using keyboard shortcuts?
Right-clicking and selecting cut/copy/paste works but I have not been able to use the keyboard shortcuts on input fields (textarea) or text fields. When I use Edge in IE compatibility mode the keyboard shortcuts work.
Is there a way to figure out what is blocking them or to redefine ^x ^c and ^v to restore the normal function?
Has anyone figured out a way to cut/copy/paste in the Neutron GUI using keyboard shortcuts?
Right-clicking and selecting cut/copy/paste works but I have not been able to use the keyboard shortcuts on input fields (textarea) or text fields. When I use Edge in IE compatibility mode the keyboard shortcuts work.
Is there a way to figure out what is blocking them or to redefine ^x ^c and ^v to restore the normal function?
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids (now for v2!)
I’m using a modified version of bootstrap. When compiling, if compression is enable the GUI gets corrupted. Is it expected ? If no compression is enabled, GUI is normal.
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids (now for v2!)
Can I update an element without triggering it in the HTML?
Example:
I want this element
to turn into this: (automatically after the neutron page loads)
using this:
This is what I've tried so far (to no avail)
Any help would be greatly appreciated.
I wanna add: I also dont want to trigger it via a hotkey. I just want it to run at the beggining of the script when the page first loads, Is this possible?
Example:
I want this element
Code: Select all
<div class="expiration" id="exp">INACTIVE</div>
Code: Select all
<div class="expiration" id="exp">TEST</div>
Code: Select all
neutron.doc.getElementById("exp").innerText := "test"
Code: Select all
#Persistent
#SingleInstance ignore
;some code to initially verify if my license is valid
;and store it into a var (license)
mm := new NeutronWindow()
mm.Load("html/home.html")
mm.Gui("-Resize +LabelGui")
mm.Show("w410 h483")
settimer, Link, 1000 ;tried to make it update every 1s but nothing happens automatically
return
Link()
{
global neutron
neutron.doc.getElementById("exp").innerText := license ;I want this to "happen" without the need for triggering it with html.
}
I wanna add: I also dont want to trigger it via a hotkey. I just want it to run at the beggining of the script when the page first loads, Is this possible?
Re: [Library] Neutron.ahk - AutoHotkey Web GUIs on Steroids (now for v2!)
I used neutron for a script I released for creating SSH tunnels, check it out here viewtopic.php?f=6&t=125013.
Return to “Scripts and Functions (v1)”
Who is online
Users browsing this forum: No registered users and 36 guests