Sign in to follow this  
Followers 0
corey822

Password creation - built in script (dunno if been asked b4)

11 posts in this topic

#1 ·  Posted (edited)

Hey all,

Im just wondering with my code--

CODE
#include <ButtonConstants.au3>

#include <GUIConstantsEx.au3>

#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("Shortcut opener", 265, 447, 192, 124)

$Button1 = GUICtrlCreateButton("Hotmail", 8, 64, 89, 25, 0)

$Button2 = GUICtrlCreateButton("Music", 8, 104, 89, 25, 0)

$Button3 = GUICtrlCreateButton("Autoit site", 8, 144, 89, 25, 0)

$Button4 = GUICtrlCreateButton("Bebo logout", 8, 184, 89, 25, 0)

$Button5 = GUICtrlCreateButton("CMD", 8, 224, 89, 25, 0)

$Button6 = GUICtrlCreateButton("Button6", 8, 264, 89, 25, 0)

$Button7 = GUICtrlCreateButton("Button7", 8, 304, 89, 25, 0)

$Button8 = GUICtrlCreateButton("Button8", 8, 344, 89, 25, 0)

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $Button1

ShellExecute("http://www.hotmail.com")

Case $Button2

Run("C:\Documents and Settings\Owner\Desktop\corey's\virtualdj.exe")

WinWaitActive("VirtualDJ")

ShellExecute("C:\Documents and Settings\Owner\My Documents\My Music\corey's")

Case $Button3

ShellExecute("http://www.autoitscript.com/forum")

Case $Button4

ShellExecute("http://www.bebo.com/c/account/sign_out")

WinWaitActive("Signed Out - Windows Internet Explorer")

WinClose("Signed Out - Windows Internet Explorer")

Case $Button5

run("cmd.exe")

EndSwitch

WEnd

is there a way to open a seperate box that ask's for a password input - and if password = true it allow's the program to be used and if password = false program closes?

i was thinking

$Pass = "watever pass is"

$input = "watever user inputs"

If $Pass = $input

Then run("w/e is here")

else exit

is that the way to go?

But i dont want the password dialog box to be a seperate program becuase thats the flaw the other person can just come out of no where and open the other program bypassing the password and i wanted the password coded into the program :P

Cheers C.W

Edited by corey822

C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake

Share this post


Link to post
Share on other sites



Hey all,

Im just wondering with my code--

CODE
#include <ButtonConstants.au3>

#include <GUIConstantsEx.au3>

#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("Shortcut opener", 265, 447, 192, 124)

$Button1 = GUICtrlCreateButton("Hotmail", 8, 64, 89, 25, 0)

$Button2 = GUICtrlCreateButton("Music", 8, 104, 89, 25, 0)

$Button3 = GUICtrlCreateButton("Autoit site", 8, 144, 89, 25, 0)

$Button4 = GUICtrlCreateButton("Bebo logout", 8, 184, 89, 25, 0)

$Button5 = GUICtrlCreateButton("CMD", 8, 224, 89, 25, 0)

$Button6 = GUICtrlCreateButton("Button6", 8, 264, 89, 25, 0)

$Button7 = GUICtrlCreateButton("Button7", 8, 304, 89, 25, 0)

$Button8 = GUICtrlCreateButton("Button8", 8, 344, 89, 25, 0)

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $Button1

ShellExecute("http://www.hotmail.com")

Case $Button2

Run("C:\Documents and Settings\Owner\Desktop\corey's\virtualdj.exe")

WinWaitActive("VirtualDJ")

ShellExecute("C:\Documents and Settings\Owner\My Documents\My Music\corey's")

Case $Button3

ShellExecute("http://www.autoitscript.com/forum")

Case $Button4

ShellExecute("http://www.bebo.com/c/account/sign_out")

WinWaitActive("Signed Out - Windows Internet Explorer")

WinClose("Signed Out - Windows Internet Explorer")

Case $Button5

run("cmd.exe")

EndSwitch

WEnd

is there a way to open a seperate box that ask's for a password input - and if password = true it allow's the program to be used and if password = false program closes?

i was thinking

$Pass = "watever pass is"

$input = "watever user inputs"

If $Pass = $input

Then run("w/e is here")

else exit

is that the way to go?

But i dont want the password dialog box to be a seperate program becuase thats the flaw the other person can just come out of no where and open the other program bypassing the password and i wanted the password coded into the program :P

Cheers C.W

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$PWD = InputBox("SCURITY","TYPE HERE PASSWORD","","*")
If Not Verify($PWD) Then 
    MsgBox(16,"SECURITY","WRONG PASSWORD")
    Exit
EndIf

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Shortcut opener", 265, 447, 192, 124)
$Button1 = GUICtrlCreateButton("Hotmail", 8, 64, 89, 25, 0)
$Button2 = GUICtrlCreateButton("Music", 8, 104, 89, 25, 0)
$Button3 = GUICtrlCreateButton("Autoit site", 8, 144, 89, 25, 0)
$Button4 = GUICtrlCreateButton("Bebo logout", 8, 184, 89, 25, 0)
$Button5 = GUICtrlCreateButton("CMD", 8, 224, 89, 25, 0)
$Button6 = GUICtrlCreateButton("Button6", 8, 264, 89, 25, 0)
$Button7 = GUICtrlCreateButton("Button7", 8, 304, 89, 25, 0)
$Button8 = GUICtrlCreateButton("Button8", 8, 344, 89, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

Case $Button1
ShellExecute("http://www.hotmail.com")

Case $Button2
Run("C:\Documents and Settings\Owner\Desktop\corey's\virtualdj.exe")
WinWaitActive("VirtualDJ")
ShellExecute("C:\Documents and Settings\Owner\My Documents\My Music\corey's")

Case $Button3
ShellExecute("http://www.autoitscript.com/forum")

Case $Button4
ShellExecute("http://www.bebo.com/c/account/sign_out")
WinWaitActive("Signed Out - Windows Internet Explorer")
WinClose("Signed Out - Windows Internet Explorer")

Case $Button5
run("cmd.exe")


EndSwitch
WEnd

Func Verify($PWD)
    If $PWD == "PASSWORD" Then
        Return 1
    Else
        Return 0
    EndIf
EndFunc

When the words fail... music speaks

Share this post


Link to post
Share on other sites

Would u be kind enough to explain ur code to me please :P

= better understanding of wat has been done


C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Would u be kind enough to explain ur code to me please :(

= better understanding of wat has been done

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$PWD = InputBox("SCURITY","TYPE HERE PASSWORD","","*") ; This creates an input box in which the person will type the 'password'
If Not Verify($PWD) Then ; This will call the Verify function (at the bottom) to make sure the password is correct
    MsgBox(16,"SECURITY","WRONG PASSWORD") ; If it isnt correct a messagebox will popup saying WRONG PASSWORD
    Exit ; and then exit
EndIf
; Note if the password is right nothing will be done
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Shortcut opener", 265, 447, 192, 124)
$Button1 = GUICtrlCreateButton("Hotmail", 8, 64, 89, 25, 0)
$Button2 = GUICtrlCreateButton("Music", 8, 104, 89, 25, 0)
$Button3 = GUICtrlCreateButton("Autoit site", 8, 144, 89, 25, 0)
$Button4 = GUICtrlCreateButton("Bebo logout", 8, 184, 89, 25, 0)
$Button5 = GUICtrlCreateButton("CMD", 8, 224, 89, 25, 0)
$Button6 = GUICtrlCreateButton("Button6", 8, 264, 89, 25, 0)
$Button7 = GUICtrlCreateButton("Button7", 8, 304, 89, 25, 0)
$Button8 = GUICtrlCreateButton("Button8", 8, 344, 89, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit

Case $Button1
ShellExecute("http://www.hotmail.com")

Case $Button2
Run("C:\Documents and Settings\Owner\Desktop\corey's\virtualdj.exe")
WinWaitActive("VirtualDJ")
ShellExecute("C:\Documents and Settings\Owner\My Documents\My Music\corey's")

Case $Button3
ShellExecute("http://www.autoitscript.com/forum")

Case $Button4
ShellExecute("http://www.bebo.com/c/account/sign_out")
WinWaitActive("Signed Out - Windows Internet Explorer")
WinClose("Signed Out - Windows Internet Explorer")

Case $Button5
run("cmd.exe")


EndSwitch
WEnd

Func Verify($PWD) ; the verify function
    If $PWD == "PASSWORD" Then ; checks if the password they inputted is = the real password (case sensitive)
        Return 1 ; if it is correct it will return one
    Else
        Return 0; if its not correct it will return 0
    EndIf
EndFunc

I added comments

Hope you understand now :P

Edited by DexterMorgan

code

Share this post


Link to post
Share on other sites

Would u be kind enough to explain ur code to me please :(

= better understanding of wat has been done

When the program started, enter your password into inputbox.Then function Verify (), test if you have entered is equal to the password is set, in the example "PASSWORD".

If the same password is returned 1 if the value does not return 0. If the result of function is 0 (is wrong password) then a message appears and then the script ends; if the result of function is 1 then the script continue.

Sorry for bad english. :P


When the words fail... music speaks

Share this post


Link to post
Share on other sites

ok thnx for clearing that up guy's

Basically that is a quick introduction to function's lmao

but would my orignal way work?

with variable's?

say i wanted to change the password from inside the program with one of those button's is there a way to do that with another function?


C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake

Share this post


Link to post
Share on other sites

Hmmm, you could take a look at my signature. _Password()

AlmarM


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

im sorry m8 but your script didnt quite help..

i was trying to figure out a way to change the certain variable i.e the password with the click of a button a text input box come's (or 2 to check pass) then click ok and the password is changed?


C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake

Share this post


Link to post
Share on other sites

Ah, you could use IniWrite and IniRead?

AlmarM


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

im sorry m8 but your script didnt quite help..

i was trying to figure out a way to change the certain variable i.e the password with the click of a button a text input box come's (or 2 to check pass) then click ok and the password is changed?

I've got a login UDF thats pretty nice. It does use INI's to store/hide the password; it also uses a very secure encryption technique.

In my sig if you want it. You may be able to modify it to your needs as well=)

Share this post


Link to post
Share on other sites

thnx m8 ill check it out after school


C.Wnew rules:1.dont use plz in a post or title use please instead2.always use help file as it is now muchly over rated3. dont think where not watching u4.please wait 24 hours after last post ot bump XD i use to make that mistake

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0