Çözüldü - Autoit inputlarda işlem Yapma

Programlama ve Script dilleri konusunda bilgi paylaşım alanıdır.
Cevapla
darendeli
Byte4
Byte4
Mesajlar: 195
Kayıt: 06 Haz 2016, 16:55
Teşekkür etti: 1 kez
Teşekkür edildi: 6 kez

Çözüldü - Autoit inputlarda işlem Yapma

Mesaj gönderen darendeli »

Yapmaya çalıştıgım inputlara Sayılar girdigimizde ornegin 1- 2- 3- 4 inputa rakamlar yazdık bu rakamları kendi aralarında toplayıp Kac inputa yazdıysak o input sayısına bolmek .....

Kod: Tümünü seç

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Analiz", 323, 294, 192, 124)
$Label1 = GUICtrlCreateLabel("", 16, 16, 135, 17)
$Label2 = GUICtrlCreateLabel("", 168, 16, 143, 17)
$Input1 = GUICtrlCreateInput("", 40, 40, 73, 21)
$Input2 = GUICtrlCreateInput("", 40, 64, 73, 21)
$Input3 = GUICtrlCreateInput("", 40, 88, 73, 21)
$Input4 = GUICtrlCreateInput("", 40, 112, 73, 21)
$Input5 = GUICtrlCreateInput("", 40, 136, 73, 21)
$Input6 = GUICtrlCreateInput("", 208, 40, 73, 21)
$Input7 = GUICtrlCreateInput("", 208, 64, 73, 21)
$Input8 = GUICtrlCreateInput("", 208, 88, 73, 21)
$Input9 = GUICtrlCreateInput("", 208, 112, 73, 21)
$Input10 = GUICtrlCreateInput("", 208, 136, 73, 21)
$Input11 = GUICtrlCreateInput("", 128, 192, 73, 21)
GUICtrlSetState(-1,128)
$Label3 = GUICtrlCreateLabel("Sonuç", 144, 168, 35, 17)
$Button1 = GUICtrlCreateButton("Analiz Et", 32, 224, 267, 41)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

		Case $Button1





	EndSwitch
WEnd

En son darendeli tarafından 19 Eki 2018, 01:50 tarihinde düzenlendi, toplamda 1 kere düzenlendi.
Kullanıcı avatarı
BlueLife
Kilobyte1
Kilobyte1
Mesajlar: 292
Kayıt: 29 Ağu 2014, 20:42
Teşekkür etti: 46 kez
Teşekkür edildi: 68 kez

Re: Autoit inputlarda işlem Yapma

Mesaj gönderen BlueLife »

@darendeli
Yanlış anlamadıysam aşağıdaki gibi bir şey olabilir....

Kod: Tümünü seç

Global $Inputs[11] = [10], $x = 40,$y = 40
Local $Form1 = GUICreate("Analiz", 323, 294, 192, 124)
Local $Label1 = GUICtrlCreateLabel("", 16, 16, 135, 17)
Local $Label2 = GUICtrlCreateLabel("", 168, 16, 143, 17)
For $I = 1 to $Inputs[0]
	$Inputs[$I] = GUICtrlCreateInput("", $x, $y, 73, 21,0x2000)
	$y += 24
	If $I = 5 Then
		$x = 208
		$y = 40
	EndIf
Next
Local $Input11 = GUICtrlCreateInput("", 128, 192, 73, 21,0x0800)
Local $Label3 = GUICtrlCreateLabel("Sonuç", 144, 168, 35, 17)
Local $Button1 = GUICtrlCreateButton("Analiz Et", 32, 224, 267, 41)
GUISetState(@SW_SHOW)

Local $tRead, $tNum,$tVal
While 1
	Switch GUIGetMsg()
		Case -3
			Exit
		Case $Button1
			$tNum = 0
			$tVal = 0
			For $I = 1 to $Inputs[0]
				$tRead = GUICtrlRead($Inputs[$I])
				If StringLen($tRead) > 0 Then
					$tNum = 1 + $tNum
					$tVal = $tVal + Number($tRead)
				EndIf
				;GUICtrlSetData($Inputs[$I],"")
			Next
			If $tNum = 0 Then ContinueLoop
			GUICtrlSetData($Input11,$tVal/$tNum)
	EndSwitch
WEnd
Cevapla

“Programlama ve Script dilleri” sayfasına dön