Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

HtmlBox - MsgBox replacement that uses embedded HTML


  • Please log in to reply
12 replies to this topic
GeekDude
  • Spam Officer
  • 391 posts
  • Last active: Oct 05 2015 08:13 PM
  • Joined: 23 Nov 2009

HTML embedded in a MsgBox replacement!

 

HtmlBox.png

 

Arguments:

  • HTML code/URL
  • Title of window
  • Whether or not it's just the body
  • If it is a URL
  • Window width
  • Window height

 

Use example:

#Include <HtmlBox>

HTML = 
(
<style>
	body {
		text-align: center;
	}
</style>
<a href="http://www.google.com/" >Google</a>
<div style="color:#FF0000" >RED TEXT!</div>
<div style="color:#00FF00" >GREEN TEXT!</div>
<div style="color:#0000FF" >BLUE TEXT!</div>
)
HtmlBox(HTML, "Tutorial!", True, False, False, 300, 200) ; HTML code, Title, Put into body, not a URL, width, height

HTML = 
(
<!DOCTYPE HTML>
<html>
	<body>
		This one has a scrollbar because when you write all the html yourself, it doesn't have the overflow CSS style.
	</body>
</html>
)
HtmlBox(HTML, "Tutorial?", False, False, False, 300, 200) ; HTML code, Title, don't put in body, not a URL, width, height

HtmlBox("http://www.google.com/", "Tutorial.", False, True, True, 1024, 768) ; URL, Title, don't put in body, it's a URL, width, height
ExitApp
return

Download here
 

 

Note that there is a way to fix the outdated render engine shell.explorer uses by default in this thread.



Swannie
  • Members
  • 9 posts
  • Last active: Jun 04 2013 07:43 AM
  • Joined: 06 Dec 2011

Hi,

It looks great...except i can`t get the example to work.



AfterLemon
  • Moderators
  • 237 posts
  • Connoisseur of Boobs
  • Last active: Jan 04 2016 11:12 PM
  • Joined: 09 Oct 2012

So simple, so useful.

 

This is pretty much exactly what I was looking for ~2 days ago. Thank you so much!



AfterLemon
  • Moderators
  • 237 posts
  • Connoisseur of Boobs
  • Last active: Jan 04 2016 11:12 PM
  • Joined: 09 Oct 2012

Just to add a specific case example and understanding, my HTML uses % width and % height. To escape these, one must use the % option for a continuation section. Read it here.

 

 

Hi,

It looks great...except i can`t get the example to work.

 

You must merge the example code here with the function code in the link. 



G. Sperotto
  • Members
  • 539 posts
  • Last active: Jun 20 2015 04:54 PM
  • Joined: 12 Dec 2011

Excellent idea geekdude.

 

This certainly eases up some aesthethical designs for GUIs.

 

Thanks.


"What is a suitable automation? Whatever saves your day for the greater matters."
Barcoder - Create QR Codes and other Barcodes using only Autohotkey !!


faqbot
  • Members
  • 997 posts
  • Last active:
  • Joined: 10 Apr 2012

This is pretty much exactly what I was looking for ~2 days ago. Thank you so much!


You could have used HtmDlg() - HTML DialogBox by SKAN http://www.autohotke...dialogbox-v051/

guest3456
  • Members
  • 1704 posts
  • Last active: Nov 19 2015 11:58 AM
  • Joined: 10 Mar 2011
^^^ indeed

GeekDude
  • Spam Officer
  • 391 posts
  • Last active: Oct 05 2015 08:13 PM
  • Joined: 23 Nov 2009

HtmDlg uses an HTML file, not by inserting HTML code on page load.



GeekDude
  • Spam Officer
  • 391 posts
  • Last active: Oct 05 2015 08:13 PM
  • Joined: 23 Nov 2009

New version, new features, and a few fixes.

 

Fixes

  • Embedded IE will now adjust height/width properly

New features

  • Practically everything, just check the "Arguments" section of the OP


AfterLemon
  • Moderators
  • 237 posts
  • Connoisseur of Boobs
  • Last active: Jan 04 2016 11:12 PM
  • Joined: 09 Oct 2012

Right, and for some reason, HTMLdlg doesn't like my files.

 

Also, it's much easier to drop some test html into a script to run than create an html file then run a huge script.

 

Might as well just drag and drop in a browser after that point.

 

Thanks very much geekdude.



Rijul Ahuja
  • Members
  • 763 posts
  • Last active: Nov 25 2013 10:16 AM
  • Joined: 14 Mar 2012

Thank you! I am sure I will find a use for it.

Could there be a similar InputBox?


Abandon the forum. The community has decided in a democratic vote to leave this website because of inactive and perverse administration.

Very few of the contributing members remain here.


GeekDude
  • Spam Officer
  • 391 posts
  • Last active: Oct 05 2015 08:13 PM
  • Joined: 23 Nov 2009

Thank you! I am sure I will find a use for it.

Could there be a similar InputBox?

 

It would be simple to modify my function for that, but I wonder if I could set up some kind of html form reading.



Rijul Ahuja
  • Members
  • 763 posts
  • Last active: Nov 25 2013 10:16 AM
  • Joined: 14 Mar 2012

It would be simple to modify my function for that, but I wonder if I could set up some kind of html form reading.

 

Thank you, but that seems too much work for you. The ability to add a simple input field would suffice.


Abandon the forum. The community has decided in a democratic vote to leave this website because of inactive and perverse administration.

Very few of the contributing members remain here.