Webapp.ahk - Make web-based apps with AutoHotkey

Post your working scripts, libraries and tools
User avatar
joedf
Posts: 7888
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

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

12 Oct 2016, 15:56

@Capn Odin
Lol, nice one
Dan

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

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: 7888
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

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

12 Oct 2016, 17:36

Hmm weird... Don't worry, it was meant to help people just like you :)
MrBubbles
Posts: 87
Joined: 25 Nov 2015, 15:27

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

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: 7888
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

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

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/
MrBubbles
Posts: 87
Joined: 25 Nov 2015, 15:27

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

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: 7888
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

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

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
TigerYT
Posts: 24
Joined: 13 Aug 2018, 01:01

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

27 Mar 2019, 01:51

Pretty dope, but I realised 'display: *;' doesn't work
User avatar
joedf
Posts: 7888
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

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

27 Mar 2019, 06:48

what? what is that supposed to do? :think:
mmelon
Posts: 3
Joined: 22 Jul 2019, 12:50

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

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: 7888
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

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

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:
mmelon
Posts: 3
Joined: 22 Jul 2019, 12:50

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

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: 7888
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

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

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:
BNOLI
Posts: 548
Joined: 23 Mar 2020, 03:55

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

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: 44
Joined: 22 Jul 2016, 16:28

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

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: 7888
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

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

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
BNOLI
Posts: 548
Joined: 23 Mar 2020, 03:55

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

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: 84
Joined: 05 Dec 2016, 06:26

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

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: 7888
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

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

07 Apr 2020, 17:36

@davebrny
Wow! neat! Thanks for letting me know :+1:

Return to “Scripts and Functions”

Who is online

Users browsing this forum: daywalker, pgeugene and 19 guests