Webapp.ahk - Make web-based apps with AutoHotkey

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
joedf
Posts: 8953
Joined: 29 Sep 2013, 17:08
Location: Canada
Contact:

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

Post by joedf » 12 Oct 2016, 15:56

@Capn Odin
Lol, nice one
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]

Dan

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

Post by Dan » 12 Oct 2016, 16:22

Hello Joedf,

thank you for the additional build.

I have been playing about with it and all i can report at the moment is - when I move the links to the top of the page - it seems to work.

Something about where the Go To index links position on the page was made a difference.
Don't know if any of this makes sense - but i'll update should i fall into difficulty. :)

I do like the web app idea as i can use html and css to make colorful GUI's and buttons - im not very good with the normal ahk GUI's as they seem very complex to program.

And ive seen some very impressive and advanced GUI's but thet get broken when i change the wrong things :roll:

cheers
dan

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

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

Post by joedf » 12 Oct 2016, 17:36

Hmm weird... Don't worry, it was meant to help people just like you :)
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]

MrBubbles
Posts: 87
Joined: 25 Nov 2015, 15:27

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

Post by MrBubbles » 18 Nov 2016, 18:35

Hey Joedf, this is pretty awesome.
One question though...any good way to stop that awful clicking coming from the web browser control?

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

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

Post by joedf » 18 Nov 2016, 21:32

I know... I wanted to find a way to fix that. I haven't found much... just some overly complicated docs.... :?
If you do find something, definitely share it here. I'll integrate it. :)

However, you can manually turn it off here: http://thebackroomtech.com/2009/01/29/h ... -explorer/
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]

MrBubbles
Posts: 87
Joined: 25 Nov 2015, 15:27

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

Post by MrBubbles » 19 Nov 2016, 11:48

Voila!

Make the DllCall after creation of __WebApp_ COM object.

Code: Select all

DllCall("urlmon\CoInternetSetFeatureEnabled"
	 ,"Int",  21 ; FEATURE_DISABLE_NAVIGATION_SOUNDS
	 ,"UInt", 0x00000002 ; SET_FEATURE_ON_PROCESS
	 ,"Int", 1)

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

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

Post by joedf » 19 Nov 2016, 15:58

Wow thanks! :dance:
I think I actually tried that, but I must have put it before the com object :p
commit: 76ed286
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]

User avatar
Tomer
Posts: 366
Joined: 21 Aug 2016, 05:11

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

Post by Tomer » 22 Nov 2016, 14:34

Gr8

TigerYT
Posts: 24
Joined: 13 Aug 2018, 01:01

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

Post by TigerYT » 27 Mar 2019, 01:51

Pretty dope, but I realised 'display: *;' doesn't work

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

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

Post by joedf » 27 Mar 2019, 06:48

what? what is that supposed to do? :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: 13
Joined: 22 Jul 2019, 12:50

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

Post by mmelon » 22 Jul 2019, 12:57

am i missing a way to eval() some code in the context of the gui/webpage? e.g wb.eval("alert('test');")

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

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

Post by joedf » 22 Jul 2019, 15:18

There's no need to use eval. What are you trying to achieve? :think:

If you want to make a js alert message, see this example:
https://github.com/joedf/Webapp.ahk/blob/master/src/page2.html

If you want a message box with AHK, you can do something like:
<a href="#" onclick="AHK('Hello')">Show MsgBox</a> in the HTML file, and

Code: Select all

Hello() {
	MsgBox Hello from AHK :D
}
in the ahk file.

Hope this helps :+1:
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: 13
Joined: 22 Jul 2019, 12:50

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

Post by mmelon » 24 Jul 2019, 12:02

Hi,

I wanted to execute JQuery in the UI from AHK events. I thought there would be a way to do execute js in the page from autohotkey. I am currently doing it like this, but i'm sure there is a neater way:

Code: Select all

if(buttonsActive == 0) {
		wb.Document.getElementById("scriptHolder").setAttribute("onClick","$('.status').html('on');$('.status').removeClass('inactive').addClass('active')")
		wb.Document.getElementById("scriptHolder").click()
		buttonsActive:=1
	} else {
		wb.Document.getElementById("scriptHolder").setAttribute("onClick","$('.status').html('off');$('.status').removeClass('active').addClass('inactive')")
		wb.Document.getElementById("scriptHolder").click()
		buttonsActive:=0
	}	

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

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

Post by joedf » 25 Jul 2019, 12:53

Ahh I see, interesting. :think:
After a little of tinkering, I got this for you. Seems to work pretty well :+1:

Say you have a javascript function you want to call (in your case, jQuery):

Code: Select all

myFunction = function(){
	return 13245;
}
You can call that function from AHK like so

Code: Select all

GetSecret() {
	window := getWindow() ; built-in function from Webapp.ahk
	MsgBox % window.myFunction() ;should display a MsgBox with the return result.
}
I presume you could execute jQuery functions using a similar approach. :+1:
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]

BNOLI
Posts: 548
Joined: 23 Mar 2020, 03:55

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

Post by BNOLI » 07 Apr 2020, 01:05

TBH, I've no clue what this (obviously amazing) tool is about?? Am I'm right, that it would be possible to build an AHK Online Editor with that, eg. based on G33kDude's AHK CodeQuickTester?
Remember to use [code]CODE[/code]-tags for your multi-line scripts. Stay safe, stay inside, and remember washing your hands for 20 sec !

leosouza85
Posts: 90
Joined: 22 Jul 2016, 16:28

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

Post by leosouza85 » 07 Apr 2020, 06:27

Hi! I didn't understand what this script is supposed to do.. The purpose is to make guis using html and css? Or to make an app based on a existing website?

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

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

Post by joedf » 07 Apr 2020, 08:24

@BNOLI
@leosouza85
This was made in order to facilitate making scripts with html/js UIs. This is the related tutorial:
https://www.autohotkey.com/boards/viewtopic.php?f=7&t=4588
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]

BNOLI
Posts: 548
Joined: 23 Mar 2020, 03:55

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

Post by BNOLI » 07 Apr 2020, 08:38

I guess I've stumbled over some awesome stuff again. Thx for your kind advise :thumbup:
Remember to use [code]CODE[/code]-tags for your multi-line scripts. Stay safe, stay inside, and remember washing your hands for 20 sec !

User avatar
davebrny
Posts: 85
Joined: 05 Dec 2016, 06:26

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

Post by davebrny » 07 Apr 2020, 14:47

this might be a bit of a #UselessFactOfTheDay, but this works on linux/wine! i just said i'd try it out for shits n giggles and was very surprised it worked considering it uses ComObj (any of the other Com stuff ive tried hasnt worked so far).

the only thing i had to change in example.ahk was full path to the #Include Webapp.ahk, and change the zoomLevel since the text was really big.
this is a great bit of work anyway. its nice seeing a scroll bar for a change as well

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

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

Post by joedf » 07 Apr 2020, 17:36

@davebrny
Wow! neat! Thanks for letting me know :+1:
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)”