Code:
;Autor: Logtetsch
;Date: 12.01.2013
#include-once
#include <array.au3>
#include <string.au3>
Global $thanks_Status = 0
Func _epvp_thankscheck($HWID, $s_Site)
if $HWID == "" Then
Return SetError(4, "", 0)
EndIf
if $s_Site == "" Then
Return SetError(5, "", 0)
EndIf
Global Const $error_NoThanks = 2
Global Const $error_NoSiteInfo = 3
Global Const $error_NoUserData = 4
Global const $success_Thanks = true
Local $Data_User = _GetHWIDData($md5_HWID)
If not @error and IsArray($Data_User) and $Data_User[0] <> "" Then
Local $thanks_Site = BinaryToString(InetRead($s_Site))
if not @error Then
Local $thanks_table = _StringBetween($thanks_Site, '.html" rel="nofollow">', '</a> ')
Local $thanks_table_Premium = _StringBetween($thanks_Site, 'rel="nofollow"><span style="color:#0099ff">', '</span></a> ')
if IsArray($thanks_table) Then
Local $a_thanks_table = UBound($thanks_table)
For $i = 0 to $a_thanks_table-1
if $Data_User[1] == $thanks_table[$i] Then $thanks_Status = 1
if $thanks_Status == 1 then ExitLoop
Next
if $thanks_Status == 1 Then
MsgBox(64, "Info", $success_Thanks)
Return True
Elseif $thanks_Status == 0 Then
For $i = 0 to UBound($thanks_table_Premium)-1
if $Data_User[1] == $thanks_table_Premium[$i] then $thanks_Status = 1
if $thanks_Status == 1 Then ExitLoop
Next
if $thanks_Status == 0 Then
MsgBox(48, "Error", $error_NoThanks)
Return SetError(2)
ElseIf $thanks_Status == 1 Then
MsgBox(64, "Info", $success_Thanks)
Return True
EndIf
EndIf
Else
MsgBox(48, "Error", $error_NoSiteInfo)
Return SetError(3)
EndIf
Else
MsgBox(0,"",$error_NoSiteInfo)
Return SetError(3)
EndIf
Else
MsgBox(48, "Error", $error_NoUserData)
Return SetError(4)
EndIf
EndFunc
Code:
;Autor: Logtetsch
;Date: 12.01.2013
;Copyright to Logtetsch
#cs
Rückgabewert mit @error: 2 = Thankschecker wurde beendet
4 = Keine HWID der Funktion mitgegeben
5 = Keine Seite der Funktion mitgegeben
#ce
#include-once
Global $Gui_Status = True
Func _epvp_thankscheck_GUI($md5_HWID, $s_Site)
if $md5_HWID == "" Then
Return SetError(4, "", 0)
EndIf
if $s_Site == "" Then
Return SetError(5, "", 0)
EndIf
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$GUI_Form1 = GUICreate("Thanks- HWIDchecker", 318, 108, 192, 124)
$grp_HWID = GUICtrlCreateGroup("HWID", 5, 5, 305, 80)
$inp_HWID = GUICtrlCreateInput($md5_HWID, 15, 25, 286, 21, BitOR($ES_CENTER, $ES_READONLY))
GUICtrlCreateGroup("", -99, -99, 1, 1)
$btn_ask = GUICtrlCreateButton("?", 265, 50, 35, 25)
$btn_enterHWID = GUICtrlCreateButton("HWID", 15, 50, 75, 25)
$btn_giveThanks = GUICtrlCreateButton("Thanks", 100, 50, 75, 25)
$lable_Copyright = GUICtrlCreateLabel("© Copyright Logtetsch", 5, 90, 311, 17)
GUICtrlSetColor(-1, 0x0000FF)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While $Gui_Status == True
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
$Gui_Status = False
GUISetState(@SW_HIDE)
Return SetError(2, "", 0)
Case $btn_ask
ShellExecute('http://www.elitepvpers.com/forum/e-pvp-news-de/981343-hwid-system-f-r-entwickler.html#post8879199')
Case $btn_enterHWID
ClipPut($md5_HWID)
ShellExecute('http://www.elitepvpers.com/forum/profile.php?do=editprofile')
Case $btn_giveThanks
ShellExecute($s_Site)
Case $lable_Copyright
ShellExecute('http://www.elitepvpers.com/forum/members/1387536-logtetsch.html')
EndSwitch
WEnd
EndFunc