Webapp.ahk - Make web-based apps with AutoHotkey

Post your working scripts, libraries and tools for AHK v1.1 and older
mmelon
Posts: 12
Joined: 22 Jul 2019, 12:50

Re: Webapp.ahk - Make web-based apps with AutoHotkey

Post by mmelon » 09 Jul 2020, 02:51

Hey. For whatever reason I didn't understand your example using mywindow at the time. Looking at it now it looks great. Just wanted to say thanks for making this. So useful

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Webapp.ahk - Make web-based apps with AutoHotkey

Post by joedf » 09 Jul 2020, 09:44

Glad it worked out for you! this is just meant as a place to start. :+1:
You may also be interested in looking into neutron.ahk if you ever feel you need more advanced features.
Image Image Image Image Image
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]

mmelon
Posts: 12
Joined: 22 Jul 2019, 12:50

Re: Webapp.ahk - Make web-based apps with AutoHotkey

Post by mmelon » 25 Mar 2023, 01:24

hi. I can't for the life of me make winactivate work on a webapp gui window. can anyone make it popup? would be much appreciated thx

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Webapp.ahk - Make web-based apps with AutoHotkey

Post by joedf » 26 Mar 2023, 18:41

@mmelon I am assuming you are the same that contacted on my website. :+1:

So you mean you want to have your window come to the forefront?
Can you provide the code for when you first create or show the window?

If if still doesn't show, maybe you can we do Always-On-top but we can explore that later if need be. :think:
Image Image Image Image Image
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]

mmelon
Posts: 12
Joined: 22 Jul 2019, 12:50

Re: Webapp.ahk - Make web-based apps with AutoHotkey

Post by mmelon » 27 Mar 2023, 01:36

Hi,

So I think it is being invoked with the standard webapp.ahk code

Code: Select all

__Webapp_AppStart:
;<< Header End >>

;Get our HTML DOM object
iWebCtrl := getDOM()
Mike

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Webapp.ahk - Make web-based apps with AutoHotkey

Post by joedf » 27 Mar 2023, 05:43

Ahh yes... I see. It's been a while... :mrgreen:
Try this? :think:

Code: Select all

WinActivate,ahk_id %__Webapp_GuiHwnd%
Image Image Image Image Image
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]

mmelon
Posts: 12
Joined: 22 Jul 2019, 12:50

Re: Webapp.ahk - Make web-based apps with AutoHotkey

Post by mmelon » 29 Mar 2023, 03:56

@joedf
thanks that works fine. My problem was I was trying to include it in

Code: Select all

; Our custom protocol's url event handler
app_call(args) {}
where it doesn't work.

I have moved it out of that function and now it works fine. You are brilliant.

Mike

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Webapp.ahk - Make web-based apps with AutoHotkey

Post by joedf » 30 Mar 2023, 10:18

Oh! Glad it works now! :D
Image Image Image Image Image
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]

mmelon
Posts: 12
Joined: 22 Jul 2019, 12:50

Re: Webapp.ahk - Make web-based apps with AutoHotkey

Post by mmelon » 13 Apr 2023, 01:44

hi. would it be possible to spawn a conventional ahk gui outside of my webapp? i am trying this

Code: Select all

if(InStr(output,"clipboard")) {
		MsgBox rendered HTML is in clipboard
		gui,margin,0,0
		gui, Add, ActiveX, x0 y0 w499 h1080 vWB, about:<!DOCTYPE html><meta http-equiv="X-UA-Compatible" content="IE=edge">
		wb.document.write(templated)
		gui, Show, , Preview
}
I think either the commands are being swallowed by the default webapp, or maybe a clash with the var wb?

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Webapp.ahk - Make web-based apps with AutoHotkey

Post by joedf » 13 Apr 2023, 09:33

I think you might need to call Gui, New before you do any GUI calls in this case... :think:
https://www.autohotkey.com/docs/v1/lib/Gui.htm#New
Image Image Image Image Image
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]

mmelon
Posts: 12
Joined: 22 Jul 2019, 12:50

Re: Webapp.ahk - Make web-based apps with AutoHotkey

Post by mmelon » 13 Apr 2023, 12:47

thx i've nearly got it. The problem (again) was where i was trying to do it. I think I am inside a function. It works if I gosub out and back. strange.

User avatar
joedf
Posts: 8940
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

Re: Webapp.ahk - Make web-based apps with AutoHotkey

Post by joedf » 13 Apr 2023, 18:20

Yes make sure you are not recreating it each time. You likely already understand this, but you should be creating each unique GUI only once, then simply show/hide them.
Image Image Image Image Image
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]

Post Reply

Return to “Scripts and Functions (v1)”