[GUI] Use HTML and CSS for your GUIs!

Put simple Tips and Tricks that are not entire Tutorials in this forum
User avatar
joedf
Posts: 7377
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

Re: [GUI] Use HTML and CSS for your GUIs!

13 Sep 2019, 07:53

The code seems fine overall except for the setAttribute() calls. They should change class instead, but dont use that. You can access the class with ".className"

Also you gotta check if IE or whatever browser is running, that it supports "filter".
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x8GB G.Skill RipJaws V - DDR4 3280 MHz | [About Me] | [ASPDM - StdLib Distribution]
[Populate the AHK MiniCity!] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library] | [About the AHK Foundation]
Mipha
Posts: 74
Joined: 27 Jul 2018, 17:08

Re: [GUI] Use HTML and CSS for your GUIs!

13 Sep 2019, 17:56

joedf wrote:
13 Sep 2019, 07:53
The code seems fine overall except for the setAttribute() calls. They should change class instead, but dont use that. You can access the class with ".className"

Also you gotta check if IE or whatever browser is running, that it supports "filter".
The browser does not support filter. I've tried more things like loading a html file into ahk and the same file into chrome and trying the same thing it it would work for chrome but not for ahk. Are there any alternatives?

I've tried changing class instead of classname in the setAttribute() before posting the code here but that didn't work at all.
User avatar
kczx3
Posts: 953
Joined: 06 Oct 2015, 21:39

Re: [GUI] Use HTML and CSS for your GUIs!

13 Sep 2019, 20:27

You should use classList.add actually.

And yes, Internet Explorer doesn’t support the filter css property at all. So it won’t work.
User avatar
kczx3
Posts: 953
Joined: 06 Oct 2015, 21:39

Re: [GUI] Use HTML and CSS for your GUIs!

14 Sep 2019, 06:28

@malcev
What’s your point? It used to be supporters but didn’t follow any standards and was thus removed
malcev
Posts: 348
Joined: 12 Aug 2014, 12:37

Re: [GUI] Use HTML and CSS for your GUIs!

14 Sep 2019, 06:33

They were not removed.
You can still use it using proper document mode (<10) and modifying security settings.
User avatar
kczx3
Posts: 953
Joined: 06 Oct 2015, 21:39

Re: [GUI] Use HTML and CSS for your GUIs!

14 Sep 2019, 06:48

Both I wouldn’t recommend to anyone
User avatar
joedf
Posts: 7377
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

Re: [GUI] Use HTML and CSS for your GUIs!

14 Sep 2019, 11:54

If you open your HTML file directly in IE and it doesn't work... but it works in chrome. Then it will not work with your current script since it will utilize IE.
You might have to try something like Chrome.ahk
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=42890
If not you can also consider alternatives such using a js-canvas or consider different image files. Either way, filter is not a necessity. :think: :thumbup:
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500, NVIDIA GTX 1060 6GB, 2x8GB G.Skill RipJaws V - DDR4 3280 MHz | [About Me] | [ASPDM - StdLib Distribution]
[Populate the AHK MiniCity!] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library] | [About the AHK Foundation]

Return to “Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 16 guests