Jump to content

Search the Community

Showing results for tags 'brainfart'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. 1) Would a style of coding where everything of the GUI is in an array make sense ? 2) Can creating controls with Execute() bring trouble down the road ? This is the basic idea: Global $g_Gui[10][10] = [[0]] #include <MsgBoxConstants.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Global $eGui = GUICtrlArray('GUICreate',"Form1", 305, 269, 50, 50, BitOR($GUI_SS_DEFAULT_GUI,$WS_MAXIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_TABSTOP), BitOR($WS_EX_TOPMOST,$WS_EX_WINDOWEDGE)) Global $eInputForGofigure = GUICtrlArray("GUICtrlCreateInput","Input1", 32, 32, 121, 21,-1, -1, $GUI_DOCKLEFT+$GUI_DOCKTOP+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) Global $eEditForGofigure = GUICtrlArray('GUICtrlCreateEdit',"Edit1"&@CRLF&"=P", 32, 72, 185, 89,-1, -1, $GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKBOTTOM) Global $eBttnShowArray = GUICtrlArray("GUICtrlCreateButton","Show Gui array", 176, 24, 100, 25,-1, -1, $GUI_DOCKLEFT+$GUI_DOCKTOP+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT) Global $eLabelForGofigure = GUICtrlArray("GUICtrlCreateLabel","Label1", 40, 180, 180, 17,-1, -1, $GUI_DOCKLEFT+$GUI_DOCKRIGHT+$GUI_DOCKBOTTOM+$GUI_DOCKHEIGHT) GUISetState(@SW_SHOW) Func GUICtrlArray($sCtrl, $sText, $iLeft, $iTop , $iWidth = default , $iHeight = default , $iStyle = -1, $iExStyle = -1, $iResize = 0) $g_Gui[0][0] += 1 Local $i = $g_Gui[0][0] $g_Gui[$i][1] = $sCtrl $g_Gui[$i][2] = $sText $g_Gui[$i][3] = $iTop $g_Gui[$i][4] = $iWidth $g_Gui[$i][5] = $iHeight $g_Gui[$i][6] = $iStyle $g_Gui[$i][7] = $iExStyle $g_Gui[$i][8] = $iResize $g_Gui[$i][9] = "anything thing else ?" Switch $sCtrl Case "GUICreate" $g_Gui[$i][0] = Execute($sCtrl & "('" & $sText & "'," & $iLeft & "," & $iTop & "," & $iWidth & "," & $iHeight & "," & $iStyle & "," & $iExStyle & "," & $iResize & ")") Case Else $g_Gui[$i][0] = Execute($sCtrl & "('" & $sText & "'," & $iLeft & "," & $iTop & "," & $iWidth & "," & $iHeight & "," & $iStyle& "," & $iExStyle & ")") If $iResize Then GUICtrlSetResizing($g_Gui[$i][0], $iResize) EndSwitch Return $i EndFunc While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE GUIDelete() Exit Case $g_Gui[$eBttnShowArray][0] _ArrayDisplay($g_Gui, "$g_Gui") EndSwitch WEnd 3) Do you have an idea to make this "mode of coding" more functional ? 4) Is this a waste of time ( for 1 or more reasons ) ? As always, anything you post will be used against you is welcomed
×
×
  • Create New...