Jump to content
Son zamanlarda artan kullanıcı hesap hırsızlıkları sebebiyle tüm kullanıcılara şifre sıfırlama maili gönderilmiştir. Lütfen güveli şifreler seçiniz. Mevcut e-mail adresinize erişemiyorsanız, en aşağıdaki destek linkinden bize ulaşınız. ×

Sitedeki Input Ve Butonu Kullanmak


darendeli
 Share

Recommended Posts

  • 2 hafta sonra ...
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>





    $gui = GUICreate("Maç Listesi", 425, 238, 192, 124)
    Local $idListview = GUICtrlCreateListView("Sıra                                  |   Ev Sahibi Takım      |     Deplasman Takımı         ", 10, 10, 450, 100) ;,$LVS_SORTDESCENDING)
    Local $idItem1 = GUICtrlCreateListViewItem("||", $idListview)
    Local $idItem2 = GUICtrlCreateListViewItem("||", $idListview)
    Local $idItem3 = GUICtrlCreateListViewItem("||", $idListview)
    GUISetState(@SW_SHOW)
    GUICtrlSetData($idItem2, "||")
    GUICtrlSetData($idItem3, "||")
    GUICtrlDelete($idItem1)
    $buton = GUICtrlCreateButton("Maçları Listele", 100, 150, 200, 30)


GUISetState()
While 1
	Switch GUIGetMsg()
		Case -3
			Exit
		Case $buton
			$read = InetRead("http://www.statarea.com/predictions", 1)
			If Not(@error) Then
				$read = BinaryToString ($read, 4)
				$exp = StringRegExp($read, '<div class="hostteam">(.*?)</div>', 3)
				$exp1 = StringRegExp($read, '<div class="guestteam">(.*?)</div>', 3)


				If Not(@error) Then
					GUICtrlSetData($idItem2, $exp[0]&'||'&$exp1[0])
				EndIf
			EndIf
	EndSwitch
WEnd

 

Edited by darendeli
Link to comment
Share on other sites

Hala yaşlanmamışım :D

#include <Array.au3>
#include <String.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 690, 119)
$Input1 = GUICtrlCreateInput("Brazil (Brazil)", 24, 48, 217, 21)
$Input2 = GUICtrlCreateInput("Barcelona (Spain)", 264, 48, 217, 21)
$Label1 = GUICtrlCreateLabel("1.Maçi Yaziniz", 48, 16, 72, 17)
$Label2 = GUICtrlCreateLabel("2.Maçi Yaziniz", 304, 8, 72, 17)
$Label3 = GUICtrlCreateLabel("Analiz  Sonucu", 120, 96, 75, 17)
$Label4 = GUICtrlCreateLabel("", 224, 96, 24, 24)
$Button1 = GUICtrlCreateButton("Analiz ET", 504, 16, 171, 81)
GUISetState(@SW_SHOW)

While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			$AverInput1 = GUICtrlRead($Input1)
			$AverInput2 = GUICtrlRead($Input2)
			$PostVeriAl = _PST('https://www.statarea.com/actions/controller', 'object={"action":"doCustomPredict","hostteamname":"' & $AverInput1 & '","guestteamname":"' & $AverInput2 & '","factors":255}')
			$Averi = _StringBetween($PostVeriAl, "<div class='value'>", "</div>")
			ConsoleWrite($Averi & @CRLF)
			If IsArray($Averi) Then
				ConsoleWrite($Averi[0] & @CRLF)
			EndIf
	EndSwitch
WEnd

Func _PST($url, $PostData = '')
	Local $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
	$oHTTP.Open("POST", $url, False)
	$oHTTP.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0")
	$oHTTP.SetRequestHeader("Accept", "*/*")
	$oHTTP.SetRequestHeader("Accept-Language", "tr-TR,tr;q=0.8,en-US;q=0.5,en;q=0.3")
	$oHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8")
	$oHTTP.SetRequestHeader("X-Requested-With", "XMLHttpRequest")
	$oHTTP.SetRequestHeader("Referer", "https://www.statarea.com/custompredict")
	$oHTTP.Send($PostData)
	If @error Then
		$error = 1
		$oHTTP = 0
		Return SetError(1)
	EndIf
	If $oHTTP.Status = 200 Then
		Local $sReceived = $oHTTP.ResponseText
		$oHTTP = Null
		Return $sReceived
	EndIf
	$oHTTP = Null
	Return -1
EndFunc   ;==>_PST

 

  • Haha 1
Link to comment
Share on other sites

şunu denermisin

Case $Button1
			$AverInput1 = GUICtrlRead($Input1)
			$AverInput2 = GUICtrlRead($Input2)
			$PostVeriAl = _PST('https://www.statarea.com/actions/controller', 'object={"action":"doCustomPredict","hostteamname":"' & $AverInput1 & '","guestteamname":"' & $AverInput2 & '","factors":255}')
			$Averi = _StringBetween($PostVeriAl, "<div class='value'>", "</div>")
			ConsoleWrite($Averi & @CRLF)
			If IsArray($Averi) Then
				For $i = 0 To UBound($Averi)-1
				ConsoleWrite($Averi[$i] & @CRLF)
				Next
			EndIf

 

Link to comment
Share on other sites

Tamam dır oldu   Soyle Bir Sorun daha Var  yoksa olmuyor  sitedeki  takımların ismini listeye aktara bilirmiyiz atıyorum brazilya türkiye gibi KArsılasmaları  listeye aktarmak gerek cunku  sitedeki Gibi takım isimleri Yazılmassa  Sonucu cıkartmıyor

Edited by darendeli
Link to comment
Share on other sites

Söyle Biraz Daha ilerlettim Ama listeye Hala Alamıyorum

Ben liste Olarak Ayarladım ama Text Dosyasına  Alınıp Analiz Ettirilebilirse Daha iyi olur  Liste Olarak Hem Yer Kaplamaz

#include <GUIConstantsEx.au3>
#include <GuiListView.au3>





    $gui = GUICreate("Maç Listesi", 425, 238, 192, 124)
    Local $idListview = GUICtrlCreateListView("Sıra                                  |   Ev Sahibi Takım      |     Deplasman Takımı         ", 10, 10, 450, 100) ;,$LVS_SORTDESCENDING)
    Local $idItem1 = GUICtrlCreateListViewItem("||", $idListview)
    Local $idItem2 = GUICtrlCreateListViewItem("||", $idListview)
    Local $idItem3 = GUICtrlCreateListViewItem("||", $idListview)
    GUISetState(@SW_SHOW)
    GUICtrlSetData($idItem2, "||")
    GUICtrlSetData($idItem3, "||")
    GUICtrlDelete($idItem1)
    $buton = GUICtrlCreateButton("Maçları Listele", 100, 150, 200, 30)


GUISetState()
While 1
	Switch GUIGetMsg()
		Case -3
			Exit
		Case $buton
			$read = InetRead("http://www.statarea.com/predictions", 1)
			If Not(@error) Then
				$read = BinaryToString ($read, 4)
				$exp = StringRegExp($read, '<div class="hostteam">(.*?)</div>', 3)
				$exp1 = StringRegExp($read, '<div class="guestteam">(.*?)</div>', 3)


				If Not(@error) Then
					GUICtrlSetData($idItem2, $exp[0]&'||'&$exp1[0])
				EndIf
			EndIf
	EndSwitch
WEnd

 

Edited by darendeli
Link to comment
Share on other sites

  • 2 hafta sonra ...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...