Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

securing scipts


  • Please log in to reply
6 replies to this topic
Invalid User
  • Members
  • 447 posts
  • Last active: Mar 27 2012 01:04 PM
  • Joined: 14 Feb 2005
Gui, Add, Text,, UserName:
Gui, Add, Edit, vUserName,

Gui, Add, Text,, PassWord:
Gui, Add, Edit, VPassWord Password,

Gui, Add, Button, gCreatNewUser, Create New UserName
Gui, Add, Button, gLogIn, Log In

Gui, Show,, Sign in Prompt
Return
;---------------------------------
CreatNewUser:
Gui, Submit
IniWrite, %UserName%, C:\Documents and Settings\Owner\Desktop\programming tools\test scripts\password.ini, User, %UserName%
IniWrite, %PassWord%, C:\Documents and Settings\Owner\Desktop\programming tools\test scripts\password.ini, Password, %PassWord%

;---------------------------------

LogIn:
Gui, Submit
IniRead, KnownUserName, C:\Documents and Settings\Owner\Desktop\programming tools\test scripts\password.ini, User, %UserName%
IniRead, KnownPassWord, C:\Documents and Settings\Owner\Desktop\programming tools\test scripts\password.ini, Password, %PassWord%
If KnownUserName = ERROR
	MsgBox Invalid Username
If KnownPassWord = ERROR
	MsgBox Invalid Password
Return
;_____________________________________Here is the same thing used for securing your scripts beyond an encryption__________________________________________________________________

Gui, Add, Text,, UserName:
Gui, Add, Edit, vUserName,

Gui, Add, Text,, PassWord:
Gui, Add, Edit, VPassWord Password,


Gui, Add, Button, gLogIn, Log In

Gui, Show,, Sign in Prompt
Return
;---------------------------------

LogIn:
Gui, Submit


If UserName <> YourUserName ;place your user name here
{
	MsgBox Invalid Username
}
If PassWord <> YourPassWordSlashPassPhase ;Place your PW here, the longer the better
{
	MsgBox Invalid Password
	Return
}

Note, Tested, Edited, Untested
Use these if you want your scipt to be secure, but make sure your scipt is encypted if you botther useing these, and make sure you pw at encryptions is hard to hack, if I were me I would go after the source before I tryed getting thru this code as a gui.
my lame sig :)

jonny
  • Members
  • 2951 posts
  • Last active: Feb 24 2008 04:22 AM
  • Joined: 13 Nov 2004
---------------------------
test2.ahk
---------------------------
Error at line 44.

Line Text: LogIn
Error: This label has been defined more than once.

The program will exit.
---------------------------
OK
---------------------------


:?

Invalid User
  • Members
  • 447 posts
  • Last active: Mar 27 2012 01:04 PM
  • Joined: 14 Feb 2005
oh your so so right, that is two scipts, they seperate withe the
;;_____________________________________Here is the same thing used for securing your scripts beyond an encryption__________________________________________________________________
my lame sig :)

jonny
  • Members
  • 2951 posts
  • Last active: Feb 24 2008 04:22 AM
  • Joined: 13 Nov 2004
I see. Thanks for clarifying. I just posted that after a quick paste-and-run.

bubby
  • Guests
  • Last active:
  • Joined: --
how can I make this script as part of a LOGIN TAB...with other TABS disabled until the login is successful?
Gui, Add, Tab, x4 y7 w1000 h700, WELCOME|LOGIN|RED|BLUE|GREEN|

gui, tab, login
gui, add, button, x466 y580 w80 h20, ENTER
Gui, Add, text, x266 y275 w80 h20, PASSWORD:
Gui, Add, Text, x266 y247 w90 h20 h20, LOGIN:
Gui, Add, Edit, x366 y247 w310 h20 uppercase vLOGin,  
Gui, Add, Edit, x366 y275 w310 h20 uppercase password vPASS

gui, tab, RED
gui, add, edit, text
;etc. 

Gui, tab, blue
gui, add, button;.....etc

what i want is the other tabs disabled until login passes. where would i put any of the two scripts here?

Chris
  • Administrators
  • 10727 posts
  • Last active:
  • Joined: 02 Mar 2004
Although you can't disable entire pages in a tab control, you can disable each of the controls on a page via "GuiControl Disable". You can also temporarily hide tabs at the end of a tab control using the procedure described in the top section of the GuiControl page (the "Tab controls" paragraph).

bubby
  • Guests
  • Last active:
  • Joined: --
Thanks Chris.

You can also temporarily hide tabs at the end of a tab control using the procedure described in the top section of the GuiControl page (the "Tab controls" paragraph).


Thats exactly what I needed to do.