Sign in to follow this  
Followers 0
AzKay

AutoIt CodeBox.

4 posts in this topic

Pretty simple, On the forums the

How do you get that with the scroll bars? For large code?


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites



Try [ codebox][ autoit] ........ [ /autoit][ /codebox] example below.

CODE
#include <GUIConstants.au3>

GUICreate("My GUICtrlRead") ; will create a dialog box that when displayed is centered

$menu1  = GUICtrlCreateMenu("File")

$n1     = GUICtrlCreateList("", 10, 10, -1, 100)
GUICtrlSetData(-1, "item1|item2|item3", "item2")

$n2     = GUICtrlCreateButton("Read", 10, 100, 50)
GUICtrlSetState(-1, $GUI_FOCUS) ; the focus is on this button

GUISetState () ; will display an empty dialog box
; Run the GUI until the dialog is closed
Do
    $msg = GUIGetMsg()
    if $msg = $n2 Then
        Msgbox(0, "Selected listbox entry", GUICtrlRead($n1)) ; display the selected listbox entry
        $menustate  = GUICtrlRead($menu1) ; return the state of the menu item
        $menutext   = GUICtrlRead($menu1, 1) ; return the text of the menu item
        Msgbox(0, "State and text of the menuitem", "state:" & $menustate & @LF & "text:" & $menutext)
    EndIf
Until $msg = $GUI_EVENT_CLOSE


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Thanks ;)


# MY LOVE FOR YOU... IS LIKE A TRUCK- #

Share this post


Link to post
Share on other sites

I wish those codebox's would have a select all function. Something like the select link they use over at www.frebasic.net/forum. It would make it so much easier to copy code you want to try out.;)

Share this post


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
Sign in to follow this  
Followers 0