Results 1 to 2 of 2

[autoit] jtv infomatic source code example

This is a discussion on [autoit] jtv infomatic source code example within the Source Code Samples forums, part of the Programming category; Code: #include <inet.au3> #include <IE.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Frm = GUICreate("JTV Infomatic", 609, 134, 192, 124, -1, ...

  1. #1
    nosniipe is offline Junior Member
    Join Date
    Nov 2010
    Posts
    3

    Default [autoit] jtv infomatic source code example

    Code:
    #include <inet.au3>
    #include <IE.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    
    $Frm = GUICreate("JTV Infomatic", 609, 134, 192, 124, -1, BitOR($WS_EX_APPWINDOW, $WS_EX_WINDOWEDGE))
    GUISetBkColor(0xA0A0A0)
    $LUSER = GUICtrlCreateLabel("Username:", 12, 14, 82, 16)
    GUICtrlSetFont(-1, 9, 800, 0, "Terminal")
    GUICtrlSetColor(-1, 0x000000)
    $sUser = GUICtrlCreateLabel("Waiting..", 97, 16, 374, 16)
    GUICtrlSetFont(-1, 9, 400, 0, "Terminal")
    GUICtrlSetColor(-1, 0xFF0000)
    $LUID = GUICtrlCreateLabel("User ID:", 12, 36, 76, 16)
    GUICtrlSetFont(-1, 9, 800, 0, "Terminal")
    GUICtrlSetColor(-1, 0x000000)
    $sUID = GUICtrlCreateLabel("Waiting..", 89, 36, 482, 16)
    GUICtrlSetFont(-1, 9, 400, 0, "Terminal")
    GUICtrlSetColor(-1, 0xFF0000)
    $LStream = GUICtrlCreateLabel("Stream Key:", 12, 56, 103, 16)
    GUICtrlSetFont(-1, 9, 800, 0, "Terminal")
    GUICtrlSetColor(-1, 0x000000)
    $sStream = GUICtrlCreateInput("Waiting", 111, 52, 453, 20)
    GUICtrlSetFont(-1, 9, 400, 0, "Terminal")
    GUICtrlSetColor(-1, 0xFF0000)
    $LNOT = GUICtrlCreateLabel("Notifications:", 13, 77, 130, 16)
    GUICtrlSetFont(-1, 9, 800, 0, "Terminal")
    GUICtrlSetColor(-1, 0x000000)
    $sNOT = GUICtrlCreateLabel("Waiting..", 143, 76, 455, 16)
    GUICtrlSetFont(-1, 9, 400, 0, "Terminal")
    GUICtrlSetColor(-1, 0xFF0000)
    $LIP = GUICtrlCreateLabel("IP:", 12, 96, 29, 16)
    GUICtrlSetFont(-1, 9, 800, 0, "Terminal")
    GUICtrlSetColor(-1, 0x000000)
    $sIP = GUICtrlCreateLabel("Waiting..", 42, 96, 530, 16)
    GUICtrlSetFont(-1, 9, 400, 0, "Terminal")
    GUICtrlSetColor(-1, 0xFF0000)
    $LPRO = GUICtrlCreateLabel("Pro:", 13, 115, 40, 16)
    GUICtrlSetFont(-1, 9, 800, 0, "Terminal")
    GUICtrlSetColor(-1, 0x000000)
    $sPRO = GUICtrlCreateLabel("Waiting..", 52, 114, 549, 16)
    GUICtrlSetFont(-1, 9, 400, 0, "Terminal")
    GUICtrlSetColor(-1, 0xFF0000)
    GUISetState(@SW_HIDE)
    
    $Title = "Bad Error"
    $Error = "Must Be Compiled to Run"
    
    If @Compiled = 0 Then
    	MsgBox(0, $Title, $Error)
    	Exit 0
    Else
    	GUISetState(@SW_SHOW)
    EndIf
    
    $oIE = _IECreate("http://www.justin.tv", 0, 0, 1, 1)
    $Login = $oIE.document.parentWindow.eval("PP['login']")
    GUICtrlSetData($sUser, $Login)
    Sleep(1000)
    $UID = $oIE.document.parentWindow.eval("PP['user_id']")
    GUICtrlSetData($sUID, $UID)
    $SK = $oIE.document.parentWindow.eval("PP['stream_key']")
    GUICtrlSetData($sStream, $SK)
    $Noty = $oIE.document.parentWindow.eval("PP['notifications']")
    GUICtrlSetData($sNOT, $Noty)
    $GetIP = $oIE.document.parentWindow.eval("PP['ip']")
    GUICtrlSetData($sIP, $GetIP)
    $isPRO = $oIE.document.parentWindow.eval("PP['is_pro']")
    GUICtrlSetData($sPRO, $isPRO)
    
    While 1
    	$nMsg = GUIGetMsg()
    	Switch $nMsg
    		Case $GUI_EVENT_CLOSE
    			Exit
    
    	EndSwitch
    WEnd
    
    
    ;Coded by nosnipe
    great example of how to pull variables from a webpage

  2.   Alt These ads help cover server costs and such.


  3. #2
    Nachoman's Avatar
    Nachoman is offline Superhero in disguise
    Join Date
    Oct 2008
    Posts
    1,654

    Default

    Thanks for the contribution but that sure is a lot of code to do it..I love my old AHK...Does all that in just a couple lines

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Facebook Bots | Admin Forum