Parameter #2 Invalid?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
djjunko
Posts: 8
Joined: 18 Jul 2022, 12:56

Parameter #2 Invalid?

Post by djjunko » 03 Feb 2023, 01:47

My code.

Gui, Add, Html, x10 y10 w200 h200 vMyHtmlControl,
<html>
<head>
<style>
body { background-color: black; }
h1 { color: yellow; margin-left: 20px; }
</style>
</head>
<body>
<h1>Coanim</h1>
</body>
</html>
Gui, Show


error message

Error: Parameter #2 Invalid.
Specifically Html
Line#001:Gui, Add, Html, x10 y10 w200 h200 vMyHtmlControl,
<html>
<head>
<style>

How can I fix this?

swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Parameter #2 Invalid?

Post by swagfag » 03 Feb 2023, 02:47

fix what? what uve written so far is pure nonsense. there is no HTML guicontrol type, which is exactly what the error message is complaining about. theres nothing to fix, delete everything and start over(preferably reading the actual documentation alongside)

User avatar
mikeyww
Posts: 26588
Joined: 09 Sep 2014, 18:38

Re: Parameter #2 Invalid?

Post by mikeyww » 03 Feb 2023, 06:57

I wonder if this is chatbot output. It seems like it would be hard for a person to make up this stuff. Chatbot output is not supported on this forum.

User avatar
boiler
Posts: 16767
Joined: 21 Dec 2014, 02:44

Re: Parameter #2 Invalid?

Post by boiler » 03 Feb 2023, 07:27

mikeyww wrote: I wonder if this is chatbot output. It seems like it would be hard for a person to make up this stuff. Chatbot output is not supported on this forum.
I was thinking the same, especially given the fact that OP has asked similar questions about implementing HTML into a GUI and was directed to several good examples, none of which resembled anything like this, of course.

@djjunko — If your code is the output of ChatGPT, please don’t post its code output again. Its code is often pure nonsense that isn’t worth trying to use as a starting point, and it’s a waste of the forum members’ time to attempt to debug it, if you can even call it that. If you had trouble implementing any of the real examples you were given, ask specifically about one of those.

If this is actually your code, then you need to realize that you can’t make up syntax in hopes that it will work. Stick to what you find in the documentation, and ask how to implement things not shown specifically in the documentation, as you have in your prior threads.

Post Reply

Return to “Ask for Help (v1)”