Jump to content

Recommended Posts

Posted

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)
; ===============================================================================================================================
Posted

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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Posted

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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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

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
×
×
  • Create New...