Kageno Posted January 30, 2015 Share Posted January 30, 2015 (edited) Why Error ? #include <GUIConstants.au3> #include <GuiStatusBar.au3> #include <Misc.au3> Global $GUI = GUICreate("Command", 674, 346) $Dummy = GUICtrlCreateDummy() $Edit = GUICtrlCreateEdit("", 0, 0, 673, 297, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetFont(-1, 12, 400, 0, "Arial") GUICtrlSetColor(-1, 0x00FF00) GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetCursor (-1, 5) $Command = GUICtrlCreateInput("", 0, 296, 673, 26) GUICtrlSetFont(-1, 12, 400, 0, "Arial") GUICtrlSetColor(-1, 0x00FF00) GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetCursor (-1, 5) $StatusBar = _GUICtrlStatusBar_Create($GUI) _GUICtrlStatusBar_SetSimple($StatusBar) _GUICtrlStatusBar_SetText($StatusBar, "Coded by Noro") Dim $AccelKeys = [1][2] = [['{ENTER}', $Dummy]] GUISetAccelerators($AccelKeys) GUISetState(@SW_SHOW) While 1 $Msg = GUIGetMsg() Select Case $Msg = -3 Exit Case $Msg = $Dummy MsgBox(64 + 262144, '', 'OK') EndSelect WEnd Edited January 30, 2015 by Kageno Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 30, 2015 Moderators Share Posted January 30, 2015 Kageno,Welcome to the AutoIt forums. Because: expandcollapse popup#include <GUIConstantsEx.au3> ; Use the correct include #include <EditConstants.au3> ; Which means you need to add a few more #include <GuiStatusBar.au3> #include <Misc.au3> Global $GUI = GUICreate("Command", 674, 346) ; If all control share the same properties, just set them once GUISetFont(12, 400, 0, "Arial") GUICtrlSetDefColor(0x00FF00) GUICtrlSetDefBkColor( 0x000000) $Dummy = GUICtrlCreateDummy() $Edit = GUICtrlCreateEdit("", 0, 0, 673, 297, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetCursor (-1, 5) $Command = GUICtrlCreateInput("", 0, 296, 673, 26) GUICtrlSetCursor (-1, 5) $StatusBar = _GUICtrlStatusBar_Create($GUI) _GUICtrlStatusBar_SetSimple($StatusBar) _GUICtrlStatusBar_SetText($StatusBar, "Coded by Noro") GUISetState(@SW_SHOW) Local $AccelKeys[1][2] = [['{ENTER}', $Dummy]] ; Look at difference in syntax from your code GUISetAccelerators($AccelKeys) While 1 $Msg = GUIGetMsg() Select Case $Msg = -3 ; Now reads "Case" and not "Call" Exit Case $Msg = $Dummy MsgBox(64 + 262144, '', 'OK') EndSelect ;Sleep(100) ; Not required as GUIGetMsg has an inbuilt Sleep WEndPlease ask if you have any questions. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Kageno Posted January 30, 2015 Author Share Posted January 30, 2015 Kageno, Welcome to the AutoIt forums. Because: expandcollapse popup#include <GUIConstantsEx.au3> ; Use the correct include #include <EditConstants.au3> ; Which means you need to add a few more #include <GuiStatusBar.au3> #include <Misc.au3> Global $GUI = GUICreate("Command", 674, 346) ; If all control share the same properties, just set them once GUISetFont(12, 400, 0, "Arial") GUICtrlSetDefColor(0x00FF00) GUICtrlSetDefBkColor( 0x000000) $Dummy = GUICtrlCreateDummy() $Edit = GUICtrlCreateEdit("", 0, 0, 673, 297, BitOR($ES_READONLY,$ES_WANTRETURN)) GUICtrlSetCursor (-1, 5) $Command = GUICtrlCreateInput("", 0, 296, 673, 26) GUICtrlSetCursor (-1, 5) $StatusBar = _GUICtrlStatusBar_Create($GUI) _GUICtrlStatusBar_SetSimple($StatusBar) _GUICtrlStatusBar_SetText($StatusBar, "Coded by Noro") GUISetState(@SW_SHOW) Local $AccelKeys[1][2] = [['{ENTER}', $Dummy]] ; Look at difference in syntax from your code GUISetAccelerators($AccelKeys) While 1 $Msg = GUIGetMsg() Select Case $Msg = -3 ; Now reads "Case" and not "Call" Exit Case $Msg = $Dummy MsgBox(64 + 262144, '', 'OK') EndSelect ;Sleep(100) ; Not required as GUIGetMsg has an inbuilt Sleep WEnd Please ask if you have any questions. M23 Write mistake Thanks you Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 30, 2015 Moderators Share Posted January 30, 2015 Kageno,Glad I could help. M23P.S. When you reply, please use the "Reply to this topic" button at the top of the thread or the "Reply to this topic" editor at the bottom rather than the "Quote" button - I know what I wrote and it just pads the thread unnecessarily. Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
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