Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 12:52

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Namen regi

Discussion on Namen regi within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
_.-°Turner°-._'s Avatar
 
elite*gold: 0
Join Date: Apr 2011
Posts: 33
Received Thanks: 17
Namen regi

Code:
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$123 = FileRead("Regi..ini")

GUICreate("Regestrieren", 361, 42)
$Input1 = GUICtrlCreateInput($123, 72, 8, 121, 24, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER), 0)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Label1 = GUICtrlCreateLabel("Name", 8, 8, 50, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("Registrieren", 200, 8, 75, 25)
$Button2 = GUICtrlCreateButton("Exit", 280, 8, 75, 25)
GUISetState(@SW_SHOW)


While 1
	$nMsg = GUIGetMsg()
	Switch $nMsg
		Case $GUI_EVENT_CLOSE
			Exit
		Case $Button1
			$I1 = GUICtrlRead($Input1)
			FileDelete("Regi..ini")
			FileInstall("Regi..ini",@TempDir,"Regi..ini")
			FileWrite("Regi..ini",$I1)
		Case $Button2
			Exit

	EndSwitch
WEnd
Einbinden :
und das ist das was ich gerne eingebunden haben möchte ABER ich habe 0 ahnung wo das es funktioniert HELP
_.-°Turner°-._ is offline  
Old 11/17/2011, 22:05   #2
 
lolkop's Avatar
 
elite*gold: 280
Join Date: May 2007
Posts: 2,818
Received Thanks: 3,483
würde das ganze eher anders herum machen, und eine art whitelist für alles zulässige einfügen...

beispiel code:
Code:
Dim $allowed[256]
; alle zeichen verbieten
For $i=0 To 255
	$allowed[$i]=False
Next
; gewisse Zeichen zulassen
$allowed[42] = True ; *
$allowed[45] = True ; -
$allowed[46] = True ; .
$allowed[91] = True ; [
$allowed[95] = True ; _
For $i=0 To 9
	$allowed[$i+48] = True ; 0-9
Next
For $i=1 To 26
	$allowed[64+$i] = True ; A-Z
	$allowed[96+$i] = True ; a-z
Next

GUICreate("Regestrieren", 361, 42)
$input = GUICtrlCreateInput(FileRead("Regi..ini"), 72, 8, 121, 24)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
GUICtrlCreateLabel("Name", 8, 8, 50, 24)
GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif")
$reg = GUICtrlCreateButton("Registrieren", 200, 8, 75, 25)
$exit = GUICtrlCreateButton("Exit", 280, 8, 75, 25)
GUISetState(@SW_SHOW)

While 1
	Switch GUIGetMsg()
		Case -3, $exit
			Exit
		Case $reg
			$name = GUICtrlRead($input)
			If CheckName($name) Then
				FileDelete("Regi..ini")
				FileInstall("Regi..ini",@TempDir,"Regi..ini")
				FileWrite("Regi..ini",$name)
			Else
				MsgBox(16,"Error","Es dürfen nur A-Z , 1-9 & [ , ] , * , . , _ , - &'  Buchstaben und Zahlen benutzt werden !")
			EndIf
	EndSwitch
WEnd

Func CheckName($name)
	Local $split = StringSplit($name,'')
	For $i=0 To $split[0]
		If Not $allowed[Asc($split[$i])] Then Return False
	Next
	Return True
EndFunc
lolkop is offline  
Reply


Similar Threads Similar Threads
Frage Bei der Regi 2-3 lev 1 ohne Namen auf Acc?
04/03/2011 - Metin2 Private Server - 4 Replies
Hallo liebe Com. Ich habe eine Frage wen man sich bei uns auf den Server Registrieren tut, sind manchma 2-3 Namenlose chars auf den Acc und diese kann man nicht Löschen. Kann mir wer weiter helfen wäre echt Super? Vielen Dank.



All times are GMT +1. The time now is 12:56.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.