great example of how to pull variables from a webpageCode:#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


LinkBack URL
About LinkBacks
Reply With Quote
