Jump to content

Message Box don't work


Recommended Posts

Hello,

I have this code.

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include <array.au3>

#Region ### START Koda GUI section ### Form=c:\users\administrateur\documents\bot\interface\general.kxf

Global $currentVersion = 400
Global $GUI = GUICreate("DBG" & $currentVersion & "", 595, 539, 191, 126, -1, $WS_EX_TOPMOST)
Global $Tab1 = GUICtrlCreateTab(8, 8, 577, 513)
Global $TabSheet2 = GUICtrlCreateTabItem("Dofbot G4")
Global $journalFile = FileOpen(@ScriptDir & "\dofbotJournal.txt",1)
Global $journal = GUICtrlCreateEdit("", 16, 48, 257, 329, BitOR($ES_AUTOVSCROLL,$ES_READONLY,$WS_VSCROLL))
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg

MsgBox($MB_SYSTEMMODAL, "Title", "Cette boîte de message sera fermée après 10 secondes ou si le bouton OK est pressé avant.", 10)

        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

Can you tell me why i not show a message box ?

Link to post
Share on other sites
  • Developers

It is positioned in the wrong place and should be before the Switch line or within an Case block.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to post
Share on other sites
  • Moderators

@YuChan here is some of the best advice you will get when dealing with AutoIt, especially early on. Always have the help file open in another window, ready to look something up. If you are unsure where to even begin looking, expand the "Function Reference" folder:

image.png.dec59d0da528d88b729bbadef936f071.png

In your case you are wanting to write to a file, so expand File, Directory and Disk Management:

image.png.9da9570175fffd2c0d30676fcc3ab363.png

Scrolling through the list you will find functions such as FileWrite and FileWriteLine. Open these one at a time, try out the example scripts for yourself, and then try to modify them to your needs. Once you have tried something on your own, if you are still stuck, post the code you're working with and we will do our best to assist, :)

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...