hey guys, i have started working on my password generator to work with my advanced config
the problem i am having is, nothing is being written to the end files
current code:
Code:
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: WinAll
; Author: Frosty <Snowman533@gmail.com>
;
; Script Function:
; Password Generator, creates hard to crack passwords for use in online registrations
;
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
IniRead, Numv, settings.ini, settings, numbers
IniRead, Smlv, settings.ini, settings, sletters
IniRead, Cplv, settings.ini, settings, cletters
if Numv = 1 ;begin ini check, this checks to see if all options are set to 1 and continues as per normal
{
if Smlv = 1
{
if Cplv = 1
{
Inputbox,NumChars,No.Chars, What is the Minimum Number of Characters?
FileSelectFolder,SavePassTo
InputBox,SavePassAs, Save Password as?, please include the extension as well, eg: *.txt
Loop, %NumChars%
{
FileAppend,,%SavePassTo%/%SavePassAs%
Random,RValue,1,62
FileReadLine,ReadV,%A_WorkingDir%/PGC.txt,RValue
FileAppend,%ReadV%,%SavePassTo%/%SavePassAs%
}
}
}
}
the files are only written if the code is this:
Code:
;
; AutoHotkey Version: 1.x
; Language: English
; Platform: WinAll
; Author: Frosty <Snowman533@gmail.com>
;
; Script Function:
; Password Generator, creates hard to crack passwords for use in online registrations
;
Inputbox,NumChars,No.Chars, What is the Minimum Number of Characters?
FileSelectFolder,SavePassTo
InputBox,SavePassAs, Save Password as?, please include the extension as well, eg: *.txt ;unwanted, this stores the user inputed vars before the check is done
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
IniRead, Numv, settings.ini, settings, numbers
IniRead, Smlv, settings.ini, settings, sletters
IniRead, Cplv, settings.ini, settings, cletters
if Numv = 1
{
if Smlv = 1
{
if Cplv = 1
{
Loop, %NumChars%
{
FileAppend,,%SavePassTo%/%SavePassAs%
Random,RValue,1,62
FileReadLine,ReadV,%A_WorkingDir%/PGC.txt,RValue
FileAppend,%ReadV%,%SavePassTo%/%SavePassAs%
}
}
}
}
but, i dont want the variables to be set until the ini check has been done
please help, this is getting annoying, i cannot see what would be stopping the script from writing to file with the first piece of code
*edit* unless i simply expand on the code that does work and implement the rest of the code...
problem is, i want to implement error messages, so i dont want the user inputted vars to be saved before the ini check is done so that it displays the error messages without asking for user input if the options are set to something that the password gen wont work with (all options 0 for example)