Jump to content
Sign in to follow this  
anixon

StringFormat

Recommended Posts

anixon

Can you use StringFomat to convert a text prompt used with say 'Msgbox' to displayed with an underline for example: 'NEXT' displayed as 'NEXT' Help appears to be silent as to this possibility

Help is always appreciated Ant..

Share this post


Link to post
Share on other sites
PsaltyDS

No, StringFormat() has nothing to do with the font effects, and the native MsgBox() doesn't support that kind of formatting.

You need to create your own GUI and set the font styles as required with GuiCtrlSetFont().

:D


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
anixon

No, StringFormat() has nothing to do with the font effects, and the native MsgBox() doesn't support that kind of formatting.

You need to create your own GUI and set the font styles as required with GuiCtrlSetFont().

Posted Image

Thanks for the direction gosh so much to learn so little time... Ant

Share this post


Link to post
Share on other sites
anixon

Once again thanks for the advice I decided to use a pic rather than a font. The screen [*.jpg] which includes the text message has been created using Photoshop and displayed using this code which includes a timeout feature. I can use the same routine to display any number of messages passing to the $sProcess variable the path & filename. You will notice that I also have Width and Height as a variable and if necessary could modify the function so that different values could be passed. I think that it is a fairly elegant solution to my issue and thanks again for the assistance.

Global $sStartupBanner = @scriptdir & "\StartUpBanner.jpg"

Global $sWarningMsg = @scriptdir & "\WarningMsg.Jpg"

_StartUpMenu($StartupBanner)

_StartUpMenu($WarningMsg)

;//Display Startup Warning and Information Messages
Func _StartUpMenu($sProcess)
While 1
  ;//Exit Menu After nn Minutes Nil Activity
  $MenuCycle = _TimeToTicks(@HOUR, @MIN, @SEC)
  $MenuEndCycle = $MenuCycle + $EndMenuTimer * 10000
  Local $sExit, $msg
  ;//Setup Window Pane
  GUICreate($Title, $Width, $Height, -1, -1, $WS_SIZEBOX + $WS_SYSMENU)
  GUISetBkColor(0xE0FFFF)
  $sExit = GUICtrlCreatePic($sProcess, 0, 0, $Width, $Height)
  GUISetState()
  ;//Menu Processor:
  While 1
   ;//Exit after nn Minutes
   If _TimeToTicks(@HOUR, @MIN, @SEC) >= $MenuEndCycle Then
    GUIDelete()
    ExitLoop (2)
   EndIf
   ;//Read the Input Message
   $msg = GUIGetMsg()
   ;//Check for User Input
   Select
    ;//Exit the Application
    Case $msg = $GUI_EVENT_CLOSE Or $msg = $sExit
    GUIDelete()
    ExitLoop (2)
   EndSelect
  WEnd
WEnd
EndFunc   ;==>_StartUpMenu
Edited by anixon

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  

×