Sign in to follow this  
Followers 0
Anuin

Format Text In Msg Window?

8 posts in this topic

I Wonder if its possible to format the text inside a MSG window :whistle:

Stuff like adding bold or underline, or even changing the size

the only thing i know is you can tab using @tab B)

THANKS :angry:

Share this post


Link to post
Share on other sites



I would suggest the Autoit3-gui project,

http://www.hiddensoft.com/fileman/users/jpm/AutoIt3-gui

Larry also has one:

http://www.hiddensoft.com/fileman/users/Larry/au3gui.zip

v1.0.23.0

http://www.hiddensoft.com/fileman/users/Larry/au3guixp.zip

v2.0.4.0

They provide a lot more flexiblilty.

The future may hold more Gui in AutoIt3.


AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Thanks :whistle: its too bad AutoIt doesnt have that function tho

Share this post


Link to post
Share on other sites

Thanks :whistle: its too bad AutoIt doesnt have that function tho

If it's any consolation, Window's doesn't either... which is why AutoIt doesn't.

Share this post


Link to post
Share on other sites

B) There was talk a while ago about using HTML messages. I seem to recall that ScriptKitty had a cute interim workaround, but I can't find it now :angry: !

Maybe this is a good opportunity to revisit the idea .. :whistle:

Share this post


Link to post
Share on other sites

I seem to recall that ScriptKitty had a cute interim workaround

Perhaps you are thinking of trick with SplashTextOn instead of MsgBox. The trick was to use SplashImageOn with a screenshot of the nice-looking text.

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

One of my suggestions was to use SplashImage with a screenshot, and worked out well for the person who was asking the question.

Basically my HTML idea is to write the html, then make a temp HTML file and display it as a function. Works for me just fine, you can even do some javascript :whistle:

example:

$line=InputBox("Question", "What do you want to show in the popup?"&@crlf&"HTML code ok", "", "", -1, -1, 0, 0)
If StringLen($line)<1 Then $line=clipget()
$color="#00FF66"
htmlshow($color,$line)
MsgBox(1,"Close","")
FileDelete(@ScriptDir &"\test.html")

Func htmlshow($color,$line)
AutoItSetOption("WinWaitDelay", 0)
$title="My AutoIt3 Status"
$file = FileOpen("test.html", 2)
If $file = -1 Then
     MsgBox(0, "Error", "Unable to open file.")
     Exit
EndIf
FileWriteLine($file, "<title>My AutoIt3 Status</title>"& @CRLF)
FileWriteLine($file, "<body bgcolor="& $color &">" & @CRLF)
FileWriteLine($file, $line & @CRLF)
FileClose($file)
Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE -k "& @ScriptDir &"\test.html","",@SW_HIDE)
WinWait ( $title, "") 
WinMove ( $title, "", 1, 1, 400, 400) 
WinShow ($title, "", @SW_RESTORE) 
EndFunc
Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Share this post


Link to post
Share on other sites

Very cool, I like it! :whistle:

My only suggestion would be to have it automatically close the window when finished:

$line=InputBox("Question", "What do you want to show in the popup?"&@crlf&"HTML code ok", "", "", -1, -1, 0, 0)
If StringLen($line)<1 Then $line=clipget()
$title="My AutoIt3 Status"
$color="#00FF66"
htmlshow($color,$line)
While 1
  If MsgBox(1,"Close","") <> 1 Then
    Sleep(1000)
  Else
    WinClose($title)
    ExitLoop
  EndIf
Wend
FileDelete(@ScriptDir &"\test.html")
Exit

Func htmlshow($color,$line)
  AutoItSetOption("WinWaitDelay", 0)
  $file = FileOpen("test.html", 2)
  If $file = -1 Then
    MsgBox(0, "Error", "Unable to open file.")
    Exit
  EndIf
  FileWriteLine($file, "<title>My AutoIt3 Status</title>"& @CRLF)
  FileWriteLine($file, "<body bgcolor="& $color &">" & @CRLF)
  FileWriteLine($file, $line & @CRLF)
  FileClose($file)
  Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE -k "& @ScriptDir &"\test.html","",@SW_HIDE)
  WinWait ( $title, "")
  WinMove ( $title, "", 1, 1, 400, 400)
  WinShow ($title, "", @SW_RESTORE)
EndFunc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0