Sign in to follow this  
Followers 0
noobish

Numbers in column ?

5 posts in this topic

#1 ·  Posted (edited)

My friends i have in my gui an input box in which when i enter a number ie. 21 and click a button to generate a column of numbers from 1 to 21 to an editbox. The numbers must be entered after a string of words that i'll have in my editbox,and when i put a new number to erase the previous output and put the new column .

Something like this( your,numbers+1,2,3,4,5,6,7,..21 )

How to do this guys,i tried rundom numbers func but not luck.

Thank you for any help,i know i am Uber noob.

$Form1 = GUICreate("Form1", 601, 347, 192, 114)
$Button1 = GUICtrlCreateButton("Button1", 16, 32, 75, 25)
$Input1 = GUICtrlCreateInput("", 16, 64, 121, 21)
$Edit1 = GUICtrlCreateEdit("", 8, 104, 553, 225)
GUICtrlSetData(-1, "")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd
Edited by Melba23
Fixed tags

Share this post


Link to post
Share on other sites



Can you show us what you tried so far? We can then point you into the right direction.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thank you for the reply,but i have noting else, just a gui script as i posted above.

Don't know how to proceed.

Thank you

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>


$Form1 = GUICreate("Form1", 601, 347, 192, 114)
$Button1 = GUICtrlCreateButton("Button1", 16, 32, 75, 25)
$Input1 = GUICtrlCreateInput("", 16, 64, 121, 21,$ES_NUMBER)
$Edit1 = GUICtrlCreateEdit("", 8, 104, 553, 225)
GUICtrlSetData(-1, "")
GUISetState(@SW_SHOW)



local $sText
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $Button1

$i=GUICtrlRead($Input1)

for $x=1 to $i
$sText&=$x&@CRLF
ConsoleWrite($sText)
Next
GUICtrlSetData($Edit1,$sText)


EndSwitch
WEnd

That should do what you want.

Did you do the autoit123 tutorial?

Edited by DicatoroftheUSA

Share this post


Link to post
Share on other sites

You need something like this:

$Form1 = GUICreate("Form1", 601, 347, 192, 114)
$Button1 = GUICtrlCreateButton("Button1", 16, 32, 75, 25)
$Input1 = GUICtrlCreateInput("", 16, 64, 121, 21)
$Edit1 = GUICtrlCreateEdit("", 8, 104, 553, 225)
GUICtrlSetData(-1, "")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            $iInput = Int(GuiCtrlRead($Input1))
            $sEdit = GuICtrlRead($Edit1)
            Local $sOutput = ""
            For $i = 1 to $iInput
                $sOutput = $sOutput & $sEdit & " " & $i & @CRLF
            Next
            GuiCtrlSetData($Edit1, $sOutput)
EndSwitch
WEnd

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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