Sign in to follow this  
Followers 0
Rawox

_MsgBox UDF problems

7 posts in this topic

Hi Guys,

I'm trying to create a messagebox using the _MsgBox UDF by jscript but my msgbox looks kinda messed up >_<

Can anyone explain why...

_MsgBox ( 64, "About " & $Title & " " & $Version, $Title & " is created by "& $AuthorFullName & " (a.k.a. " & $AuthorNickName & ")." & @CRLF & "Current version is version " & $Version & " released on " & $Release & "." );, 0, 0, "Website|Email|Close" )

The explanation in the udf

; #FUNCTION# ====================================================================================================================
; Name...........: _MsgBox
; Description ...: Displays a simple message box with optional timeout.
; Syntax.........: ;_MsgBox( flag, "title", "text" [, timeout [, hwnd [, ownButtons [, FileName [, ResName [, ResType _
;                           [, left [, top [, allwaysActive ]]]]]]]]] )
; Parameters ....: OwnButtons   - [optional] Personalized texts for the buttons. If it be used more than a button, separate the texts with "|".
;                  FileName     - Filename of the picture or resource to be loaded, supported types: BMP, JPG, PNG, GIF(animated).
;                  ResName      - [optional] The name of resource to be load from EXE, DLL, OCX, CPL and other formats.
;                  ResType      - [optional] The type of resource to be load. Default is 10: $RT_RCDATA.
;                  left         - [optional] The left side of the dialog box. By default (-1), the window is centered.
;                  top          - [optional] The top of the dialog box. Default (-1) is centered.
;                  allwaysActive- [optional] The dialog box will be placed above all Topmost windows and should stay above them.
;                                 The window is NOT DEACTIVATED.
;                  Other parameters, same as MsgBox function.
; Return values .: Success  - Returns the ID of the button pressed.
;                  Failure  - Returns -1 if the message box timed out.
;                             If error, returns an friendly message and exit script.
; Author ........: jscript
; Modified.......:
; Remarks .......: Same as MsgBox function.
;                  Version 2.6  - It shows the countdown if the variable timeout be specified.
; Related .......:
; Link ..........;
; Example .......; _MsgBox(4096, "Test", "This box will time out in 10 seconds", 10)
; ===============================================================================================================================

Share this post


Link to post
Share on other sites



What do you mean by "looks kinda messed up"?

Does it return an error message or doesn't it look the way you want it?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Well, it looks like this:

post-40706-12508559629142_thumb.jpg

Share this post


Link to post
Share on other sites

I'm running AutoIt 3.3.0.0 on Windows XP SP2 German. If I use

Global $Title = "Titel"
Global $Version = "1"
Global $AuthorFullName = "Author Full Name"
Global $AuthorNickName = "Nick"
Global $Release = "0"

_MsgBox( 64, "About " & $Title & " " & $Version, $Title & " is created by "& $AuthorFullName & " (a.k.a. " & $AuthorNickName & ")." & @CRLF & "Current version is version " & $Version & " released on " & $Release & "." );, 0, 0, "Website|Email|Close" )

I get:


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

is it maybe because of Vista?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Unfortunately I have no Vista at hand to test. Do you have a PC with XP available?

But why don't you use the builtin "MsgBox" of AutoIt? You don't use a feature that isn't available with "MsgBox".

MsgBox (64, "About " & $Title & " " & $Version, $Title & " is created by "& $AuthorFullName & " (a.k.a. " & $AuthorNickName & ")." & @CRLF & "Current version is version " & $Version & " released on " & $Release & "." )
Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Damn I'm feeling stupid.

The last few things don't need to be commented.

Does this:

_MsgBox ( 64, "About " & $Title & " " & $Version, $Title & " is created by "& $AuthorFullName & " (a.k.a. " & $AuthorNickName & ")." & @CRLF & "Current version is version " & $Version & " released on " & $Release & ".", 0, 0, "Website|Email|Close" )

Also work for you??

Edited by Rawox

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