English
Forum

Password input repeat

 

Stephan
Topm
Hi,

be now straight first on XProfan come and I neither sonderlich plenty programmiererfahrung.
have in the school time a little bit Pascal and C++ learnt and understand really The meißten terms.

my trouble is now, I a Password request prepares have as dialog and gladly if the Password wrong was a renewed input stattfindet until 3ten incorrect attempt.

If I but now a suitable Loop around the dialog lay becomes each Tastendruck one further PW-Window opened.

would super if your me help could, otherwise I will time my Luck moreover try. ;D
 
09/04/08  
 



One little Beispielcode would helpful
 
09/04/08  
 




Stephan
Topm
this is The Loop The to the dialog comes.
CompileMarkSeparation
Declare _pw%, Text%, Pass%, Pass$, Font%, OK%, Cancel%, F%, font1%
-Eingabefeld erstellen-
_pw%   = @Create("Dialog",%hWnd,"Cisco Configtool beta 1.0",10,10,400,220)
Text% = @Create("Text",_pw%,"Please insert Password:",20,20,300,20)
Pass% = @Create("Edit",_pw%,"",   20, 50,200,30)
Font% = @Create("Font","Lucida Console",12,0,0,0,0)
Font1% = @Create("Font","Lucida Console",24,0,0,0,0)
OK%     = @Create("DefButton",_pw%,"OK", 20,140, 100,30)
CANCEL% = @Create("Button",_pw%,"Cancel",130,140,100,30)
SetFont cancel%, font%
SetFont text%, font%
SetFont ok%, font%
SetFont Pass%, Font1%
sendmessage(Pass%,204,ord("*"),0)
@SetFocus(Pass%)
F% = 0

WhileNot F%

    WaitInput

    If Clicked(OK%)

        Pass$    = @GetText$(Pass%)

        If Pass$="Test"

            DestroyWindow(OK%)
            F% = 1
            DestroyWindow(_pw%)

        ElseIf Pass$ <> "Test"

            EnableWindow Text%,0
            EnableWindow Pass%,0
            EnableWindow OK%,0
            EnableWindow CANCEL%,0
            SLEEP 1500
            F% = 1
            DestroyWindow(_pw%)

        EndIf

    ElseIf @Clicked(CANCEL%)

        F% = 1
        DestroyWindow(_pw%)

    EndIf

EndWhile


having me too time one of your Examples angeguckt, but unfortunately not so really understood. ;)
 
09/04/08  
 



@Stephan: The code is unfortunately not run, one lauffähiges Minimalbeispiel [...]  must but already his...

you'll see the your trouble then very very integrally fix from the world created watts...
 
09/04/08  
 




Stephan
Topm
so mail watts updated, ought to so run his.

How functions the really with the objects or forms.
Have red the it this object creator gives the but not under the 10it functions and something eingebundenes I but somehow not find.
 
09/04/08  
 



solely The Programmstruktur stood you here in the ways:
CompileMarkSeparation
 {$cleq}
Gemerkt/Separiert von http://xprofan.com/thread.core?t=6865
Declare _pw%, Text%, Pass%, Pass$, Font%, OK%, Cancel%, F%, font1%
-Eingabefeld erstellen-
_pw%   = @Create("Dialog",%hWnd,"Cisco Configtool beta 1.0",10,10,400,220)
Text% = @Create("Text",_pw%,"Please insert Password:",20,20,300,20)
Pass% = @Create("Edit",_pw%,"",   20, 50,200,30)
Font% = @Create("Font","Lucida Console",12,0,0,0,0)
Font1% = @Create("Font","Lucida Console",24,0,0,0,0)
OK%     = @Create("DefButton",_pw%,"OK", 20,140, 100,30)
CANCEL% = @Create("Button",_pw%,"Cancel",130,140,100,30)
SetFont cancel%, font%
SetFont text%, font%
SetFont ok%, font%
SetFont Pass%, Font1%
sendmessage(Pass%,204,ord("*"),0)
@SetFocus(Pass%)
F% = 0

while 1

    WaitInput

    If Clicked(OK%)

        case GetText$(Pass%)="Test" : break
        EnableWindow Text%,0
        EnableWindow Pass%,0
        EnableWindow OK%,0
        EnableWindow CANCEL%,0
        SLEEP 1500
        f%=f%+1
        case f%=3 : break
        EnableWindow Text%,1
        EnableWindow Pass%,1
        EnableWindow OK%,1
        EnableWindow CANCEL%,1

    ElseIf @Clicked(CANCEL%)

        f%=3
        break

    EndIf

endWhile

DestroyWindow(_pw%)
case f%=3 : end
print "geschafft"
waitkey
/../function-references/XProfan/end/'>end
 
09/04/08  
 




Stephan
Topm
super!

Thank you, now yields it too sense! ;)

had not virtual, I here with sprungmarken works must.
 
09/04/08  
 



No Sprungmarken in the code! (break fractures Loop)

Obiges can itself too to 100 because of solve, I had it z.B. differently aufgebaut as You or Justus.
 
09/04/08  
 




Michael
Wodrich
Hello Stephan,


Have red the it this object creator gives the but not under the 10it functions


left under "Rokosofts Object Creator - Offizieller Fensterhelfer" find You always whom latest.

Best wishes
Michael Wodrich
 
Programmieren, das spannendste Detektivspiel der Welt.
09/04/08  
 




Rolf
Koch

Have red the it this object creator gives the but not under the 10it functions


who says because something like? a couple Bugs are mostly anzufinden, but the Creator is always into newest versions run. Kuck still simply on of my Page. [...] 
 
09/05/08  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

1.487 Views

Untitledvor 0 min.
Tommy01/04/14
funkheld05/25/12
Andreas Koch01/18/12
Julian Schmidt12/21/10

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie