YuChan Posted November 12, 2020 Posted November 12, 2020 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 ?
Developers Jos Posted November 12, 2020 Developers Posted November 12, 2020 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.
YuChan Posted November 12, 2020 Author Posted November 12, 2020 THX. Now how to a wwritein journal a file content ? Please
Moderators JLogan3o13 Posted November 12, 2020 Moderators Posted November 12, 2020 @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: In your case you are wanting to write to a file, so expand File, Directory and Disk Management: 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!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now