GUi PopUp updated (#32)
This commit is contained in:
parent
b763441b32
commit
fae53c1dd0
23
SMACheck.au3
23
SMACheck.au3
|
@ -12,7 +12,7 @@
|
|||
|
||||
;#AutoIt3Wrapper_Res_ProductVersion=x.x.x.x ; Broken, use #AutoIt3Wrapper_Res_Field=ProductVersion|x.x.x as workarround.
|
||||
#AutoIt3Wrapper_Res_Field=ProductVersion|Freeware
|
||||
#AutoIt3Wrapper_Res_Fileversion=1.0.0.8
|
||||
#AutoIt3Wrapper_Res_Fileversion=1.0.0.10
|
||||
#AutoIt3Wrapper_Res_FileVersion_AutoIncrement=P ;(Y/N/P) AutoIncrement FileVersion After Aut2EXE is finished. default=N. P=Prompt, Will ask at Compilation time if you want to increase the versionnumber
|
||||
#AutoIt3Wrapper_Res_Language=1031 ;Resource Language code . german = 1031, english (U.S.) = 1033. default 2057=English (United Kingdom). For a List see http://technet.microsoft.com/en-us/library/dd346950.aspx
|
||||
|
||||
|
@ -33,12 +33,13 @@
|
|||
|
||||
;############################################################################################
|
||||
|
||||
Global $VERSION = "1.0.0 alpha 2"
|
||||
Global $VERSION = "1.0.0 alpha 3"
|
||||
|
||||
#NoTrayIcon
|
||||
|
||||
#include <_XMLDomWrapper.au3>
|
||||
#include <File.au3>
|
||||
#include <Array.au3>
|
||||
#include <ButtonConstants.au3>
|
||||
#include <EditConstants.au3>
|
||||
#include <GUIConstantsEx.au3>
|
||||
|
@ -46,9 +47,9 @@ Global $VERSION = "1.0.0 alpha 2"
|
|||
#include <WindowsConstants.au3>
|
||||
#include <resources.au3>
|
||||
#include "includes/functions.inc.au3"
|
||||
#include "includes/gui.inc.au3"
|
||||
|
||||
|
||||
;; GUi
|
||||
;; Main
|
||||
$GUi = GUICreate("SMACheck - smacbans.com", 370, 177, 353, 206)
|
||||
$GUiBG = GUICtrlCreatePic("", 0, 0, 370, 177)
|
||||
_ResourceSetImageToCtrl($GUiBG, "img_bg", $RT_RCDATA)
|
||||
|
@ -69,15 +70,19 @@ GUISetState(@SW_SHOW)
|
|||
|
||||
|
||||
While 1
|
||||
$nMsg = GUIGetMsg()
|
||||
Switch $nMsg
|
||||
Switch GUIGetMsg()
|
||||
Case $GUI_EVENT_CLOSE
|
||||
Exit
|
||||
ExitLoop
|
||||
Case $gButton_Submit
|
||||
$iSteamId = GUICtrlRead($gSteamId)
|
||||
If StringLeft($iSteamId, 6) = 765611 Then
|
||||
$iSteamId = _CommunityIDToSteamID($iSteamId)
|
||||
$iSteamId = _CommunityIDToSteamID($iSteamId)
|
||||
EndIf
|
||||
_GetStatusFromSMACb($iSteamId)
|
||||
; Disable the first GUI
|
||||
GUISetState(@SW_DISABLE, $GUi)
|
||||
gui_Info($iSteamId)
|
||||
; Re-enable the first GUI
|
||||
GUISetState(@SW_ENABLE, $GUi)
|
||||
WinActivate($GUi)
|
||||
EndSwitch
|
||||
WEnd
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="windows-1251"?>
|
||||
<object type="TAForm" name="GUi2">
|
||||
<properties>
|
||||
<property name="Left" vt="Int16">375</property>
|
||||
<property name="Top" vt="Int16">227</property>
|
||||
<property name="Width" vt="Int16">327</property>
|
||||
<property name="Height" vt="Int16">191</property>
|
||||
<property name="Caption" vt="String">INFO</property>
|
||||
<property name="Color" vt="Ident">clBtnFace</property>
|
||||
<property name="Font.Charset" vt="Ident">DEFAULT_CHARSET</property>
|
||||
<property name="Font.Color" vt="Ident">clWindowText</property>
|
||||
<property name="Font.Height" vt="Int8">-11</property>
|
||||
<property name="Font.Name" vt="String">MS Sans Serif</property>
|
||||
<property name="Font.Style" vt="Set"/>
|
||||
<property name="OldCreateOrder" vt="False">False</property>
|
||||
<property name="Visible" vt="True">True</property>
|
||||
<property name="Style" vt="Int32">-1798701056</property>
|
||||
<property name="ExStyle" vt="Int16">256</property>
|
||||
<property name="Version" vt="String">1.04</property>
|
||||
<property name="FormOptOnEvent" vt="False">False</property>
|
||||
<property name="FormOptExpVars" vt="False">False</property>
|
||||
<property name="FormOptPopulate" vt="False">False</property>
|
||||
<property name="FormOptVarsForSet" vt="False">False</property>
|
||||
<property name="FormOptIndentChar" vt="Int8">0</property>
|
||||
<property name="FormOptIndentCount" vt="Int8">1</property>
|
||||
<property name="FormOptIndentInit" vt="Int8">0</property>
|
||||
<property name="FormOptVarScope" vt="Int8">0</property>
|
||||
<property name="Resizing" vt="Set"/>
|
||||
<property name="PixelsPerInch" vt="Int8">96</property>
|
||||
<property name="TextHeight" vt="Int8">13</property>
|
||||
</properties>
|
||||
<components>
|
||||
<object type="TAButton" name="g2Close">
|
||||
<properties>
|
||||
<property name="Left" vt="Int8">120</property>
|
||||
<property name="Top" vt="Int8">120</property>
|
||||
<property name="Width" vt="Int8">65</property>
|
||||
<property name="Height" vt="Int8">25</property>
|
||||
<property name="Caption" vt="String">OK</property>
|
||||
<property name="TabOrder" vt="Int8">0</property>
|
||||
<property name="Color" vt="Ident">clBtnFace</property>
|
||||
<property name="CtrlStyle" vt="Int32">1342374656</property>
|
||||
<property name="CtrlExStyle" vt="Int8">0</property>
|
||||
<property name="Resizing" vt="Set">DockWidth, DockHeight</property>
|
||||
</properties>
|
||||
<components/>
|
||||
</object>
|
||||
<object type="TALabel" name="gStatus">
|
||||
<properties>
|
||||
<property name="Left" vt="Int8">24</property>
|
||||
<property name="Top" vt="Int8">24</property>
|
||||
<property name="Width" vt="Int8">48</property>
|
||||
<property name="Height" vt="Int8">17</property>
|
||||
<property name="Caption" vt="String">Status: </property>
|
||||
<property name="Font.Charset" vt="Ident">DEFAULT_CHARSET</property>
|
||||
<property name="Font.Color" vt="Ident">clWindowText</property>
|
||||
<property name="Font.Height" vt="Int8">-11</property>
|
||||
<property name="Font.Name" vt="String">MS Sans Serif</property>
|
||||
<property name="Font.Style" vt="Set">fsBold</property>
|
||||
<property name="ParentFont" vt="False">False</property>
|
||||
<property name="TabOrder" vt="Int8">1</property>
|
||||
<property name="HaveVariable" vt="False">False</property>
|
||||
<property name="CtrlStyle" vt="Int32">1342308608</property>
|
||||
<property name="CtrlExStyle" vt="Int8">0</property>
|
||||
<property name="Resizing" vt="Set"/>
|
||||
<property name="Description" vt="String">gStatus</property>
|
||||
</properties>
|
||||
<components/>
|
||||
</object>
|
||||
<object type="TALabel" name="oStatus">
|
||||
<properties>
|
||||
<property name="Left" vt="Int8">72</property>
|
||||
<property name="Top" vt="Int8">24</property>
|
||||
<property name="Width" vt="Int16">215</property>
|
||||
<property name="Height" vt="Int8">17</property>
|
||||
<property name="Caption" vt="String">STATUS</property>
|
||||
<property name="TabOrder" vt="Int8">2</property>
|
||||
<property name="HaveVariable" vt="False">False</property>
|
||||
<property name="CtrlStyle" vt="Int32">1342308608</property>
|
||||
<property name="CtrlExStyle" vt="Int8">0</property>
|
||||
<property name="Resizing" vt="Set"/>
|
||||
</properties>
|
||||
<components/>
|
||||
</object>
|
||||
<object type="TALabel" name="Label1">
|
||||
<properties>
|
||||
<property name="Left" vt="Int8">24</property>
|
||||
<property name="Top" vt="Int8">48</property>
|
||||
<property name="Width" vt="Int8">36</property>
|
||||
<property name="Height" vt="Int8">17</property>
|
||||
<property name="Caption" vt="String">Label1</property>
|
||||
<property name="TabOrder" vt="Int8">3</property>
|
||||
<property name="HaveVariable" vt="False">False</property>
|
||||
<property name="CtrlStyle" vt="Int32">1342308608</property>
|
||||
<property name="CtrlExStyle" vt="Int8">0</property>
|
||||
<property name="Resizing" vt="Set"/>
|
||||
</properties>
|
||||
<components/>
|
||||
</object>
|
||||
</components>
|
||||
</object>
|
|
@ -1,8 +1,10 @@
|
|||
#include-once
|
||||
|
||||
;; SMAC XML APi
|
||||
Func _GetStatusFromSMACb($input)
|
||||
Local $oXML = ObjCreate("Microsoft.XMLHTTP")
|
||||
;$oXML.Open("GET", "http://api.smacbans.com/xml/getbanninfo_multiple/" & $input & "/", 0)
|
||||
$oXML.Open("GET", "http://labor.spiffytek.com/smacheck/api/steamid/" & $input, 0)
|
||||
$oXML.Open("GET", "http://api.spiffytek.com/pub/smacheck/steamid/" & $input, 0)
|
||||
$oXML.Send
|
||||
|
||||
Local $sFile = _TempFile(@TempDir, '~', '.xml')
|
||||
|
@ -21,19 +23,34 @@ Func _GetStatusFromSMACb($input)
|
|||
EndIf
|
||||
If $pStatus[1] = "Y" Then
|
||||
Local $oStatus = "SteamID is Banned"
|
||||
MsgBox(64, "INFO", "Status: " & $oStatus & @LF & "Nick: " & $bNick[1] & @LF & "Reason: " & $bReason[1] & @LF & "Time: " & $bTime[1])
|
||||
;MsgBox(64, "INFO", "Status: " & $oStatus & @LF & "Nick: " & $bNick[1] & @LF & "Reason: " & $bReason[1] & @LF & "Time: " & $bTime[1])
|
||||
Local $return[5]
|
||||
$return[0] = $oStatus
|
||||
$return[1] = $bNick[1]
|
||||
$return[2] = $bReason[1]
|
||||
$return[3] = $bTime[1]
|
||||
$return[4] = $pStatus[1]
|
||||
Else
|
||||
Local $oStatus = "SteamID is not banned"
|
||||
MsgBox(64, "INFO", "Status: " & $oStatus)
|
||||
;MsgBox(64, "INFO", "Status: " & $oStatus)
|
||||
Local $return[5]
|
||||
$return[0] = $oStatus
|
||||
$return[1] = "-"
|
||||
$return[2] = "-"
|
||||
$return[3] = "-"
|
||||
$return[4] = $pStatus[1]
|
||||
EndIf
|
||||
Else
|
||||
MsgBox(16, "ERROR", "Oops :S" & @LF & "Output: " & $pStatus)
|
||||
;MsgBox(16, "ERROR", "Oops :S")
|
||||
Local $return = "ERROR"
|
||||
FileDelete($sFile)
|
||||
Return
|
||||
EndIf
|
||||
|
||||
FileDelete($sFile)
|
||||
|
||||
Return $return
|
||||
|
||||
EndFunc
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
#include-once
|
||||
|
||||
Func gui_Info($output)
|
||||
Local $pInfo = _GetStatusFromSMACb($output)
|
||||
|
||||
If IsArray($pInfo) Then
|
||||
$GUI2 = GUICreate("INFO", 312, 154, 375, 227, BitXOR($GUI_SS_DEFAULT_GUI, $WS_MINIMIZEBOX))
|
||||
If $pInfo[4] = "Y" Then
|
||||
GUISetBkColor(0xE33F35)
|
||||
Else
|
||||
GUISetBkColor(0x518652)
|
||||
EndIf
|
||||
$bClose = GUICtrlCreateButton("OK", 120, 125, 65, 25, $BS_CENTER)
|
||||
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
|
||||
$gStatus = GUICtrlCreateLabel("Status:", 24, 12, 48, 17)
|
||||
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
|
||||
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
|
||||
$oStatus = GUICtrlCreateLabel($pInfo[0], 72, 12, 215, 17)
|
||||
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
|
||||
$gNick = GUICtrlCreateLabel("Nick:", 24, 36, 48, 17)
|
||||
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
|
||||
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
|
||||
$oNick = GUICtrlCreateLabel($pInfo[1], 72, 36, 215, 17)
|
||||
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
|
||||
$gReason = GUICtrlCreateLabel("Reason:", 24, 60, 48, 17)
|
||||
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
|
||||
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
|
||||
$oReason = GUICtrlCreateLabel($pInfo[2], 72, 60, 215, 17)
|
||||
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
|
||||
$gTime = GUICtrlCreateLabel("Time:", 24, 84, 48, 17)
|
||||
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
|
||||
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
|
||||
$oTime = GUICtrlCreateLabel($pInfo[3], 72, 84, 215, 17)
|
||||
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
|
||||
$gVac = GUICtrlCreateLabel("VAC:", 24, 108, 48, 17)
|
||||
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
|
||||
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
|
||||
$oVac = GUICtrlCreateLabel("N/A", 72, 108, 215, 17)
|
||||
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
|
||||
GUISetState()
|
||||
|
||||
|
||||
While 1
|
||||
; We can only get messages from the second GUI
|
||||
Switch GUIGetMsg()
|
||||
Case $GUI_EVENT_CLOSE
|
||||
GUIDelete($GUI2)
|
||||
ExitLoop
|
||||
Case $bClose
|
||||
GUIDelete($GUI2)
|
||||
ExitLoop
|
||||
EndSwitch
|
||||
WEnd
|
||||
ElseIf $pInfo = "ERROR" Then
|
||||
MsgBox(16, "ERROR", "Oops!" & @LF & "!API API API!")
|
||||
Return
|
||||
EndIf
|
||||
EndFunc
|
Reference in New Issue