Jump to content

Numbers in column ?


noobish
 Share

Recommended Posts

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
Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

#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
Link to comment
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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...