AutoHotkey Community

It is currently May 27th, 2012, 10:40 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: January 16th, 2008, 2:50 pm 
Offline
User avatar

Joined: December 21st, 2007, 3:14 pm
Posts: 3826
Location: Louisville KY USA
very good
still has no real world purpose but it is
a very well written script
and satisfies a design plan without error
and works on many systems
cannot be (easily) bypassed
usage of labels and proceedures


this is a great example of good script development

the only thing i might suggest is prompting for both the username and the password

a locking function for say 3 minutes after failed pass entered 3 times

_________________
No matter what your oppinion Please join this discussion
Formal request to Polyethene
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject: reply
PostPosted: January 16th, 2008, 6:34 pm 
Offline

Joined: December 17th, 2007, 6:39 pm
Posts: 235
Location: Galati, Romania
And the following one is the Romanian version (I think no one is interested of it): :?
Code:
#UseHook
#NoTrayIcon
#WinActivateForce

myPassword =
myName =

START:
   Gui, Font, S8 CDefault, tahoma
   Gui, Add, Text, x26 y20 w80 h20 ,Nume:
   Gui, Add, Text, x26 y40 w80 h20 ,Parola:
   Gui, Add, Text, x26 y60 w80 h20 ,Repet-o:
   Gui, Add, Edit, x116 y20 w140 h20 vmyName, %myName%
   Gui, Add, Edit, x116 y40 w140 h20 vmyPassword +Password, %myPassword%
   Gui, Add, Edit, x116 y60 w140 h20 vmyPassword2 +Password, %myPassword%
   Gui, Add, Button, x100 y87 w86 h27 gTESTDATA +default, Blocare
   Gui, Show,center h128 w320, Blocare computer
Return


TESTDATA:
   gui,submit
   if (myName == "") {
      msgbox 16,Eroare,Trebuie sa scrii un nume sau o porecla a ta.
      goto START
   } else if (myPassword <> myPassword2 ) {
      msgbox 16,Eroare,Parolele nu se potrivesc.
      goto START
   }
   SetTimer, MoveToForeground, 10
   informationText = %myName% a blocat computerul folosind o parola. Numai %myName% il poate debloca.
   goto LOCKED
return




LOCKED:
   gui, 2:color, black
   gui, 2:show, center h2024 w2000
   gui, destroy
   Gui, Font, S8 CBlack, tahoma
   Gui, Add, Text, x16 y10 w550 h40, %informationText%
   Gui, Add, Text, x16 y30 w50 h20 , Parola:
   Gui, Add, Edit, x66 y30 w380 h20 vTypedPswd +Password,
   Gui, Add, Button, x452 y30 w101 h23 gVERIFY +default, Introducere
   gui, -sysmenu +alwaysontop +WS_EX_TOPMOST -caption
   Gui, Show, center h60 w561, %A_ScriptName%enterPswd
return

VERIFY:
   Gui, Submit
   if (TypedPswd <> myPassword) {
      informationText = Parola incorecta.
      goto LOCKED
      return
   } else {
      exitapp
   }
return

MoveToForeground:
   WinActivate, %A_ScriptName%
   WinActivate, %A_ScriptName%enterPswd
   IfWinExist ahk_class #32770
      winkill, ahk_class #32770
return

*LCtrl::return
*RCtrl::return
*LAlt::return
*RAlt::return
*LWin::return
*RWin::return


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 13 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group