Jon310 Posted December 18, 2007 Share Posted December 18, 2007 (edited) I have been trying to make a place where I can store my passwords for sites, nothing important so I dont need much security on it. The program to stores the passwords in an ini file (disguised as a dll file), and makes an ini file for the GUI combo on the loader. I have been working on another script to view the information without having to open the text file they are in. Heres the script to store them: #include <GuiConstants.au3> GuiCreate("Password Vault", 192, 311,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Group_1 = GuiCtrlCreateGroup("Name", 10, 10, 170, 50) $Group_2 = GuiCtrlCreateGroup("Website", 10, 70, 170, 50) $Group_3 = GuiCtrlCreateGroup("Username", 10, 130, 170, 50) $Group_4 = GuiCtrlCreateGroup("Password", 10, 190, 170, 50) $Button_5 = GuiCtrlCreateButton("Save", 10, 250, 170, 50) $Input_6 = GuiCtrlCreateInput("", 20, 30, 150, 20) $Input_7 = GuiCtrlCreateInput("", 20, 90, 150, 20) $Input_8 = GuiCtrlCreateInput("", 20, 150, 150, 20) $Input_9 = GuiCtrlCreateInput("", 20, 210, 150, 20) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit 0 EndIf If $msg = $Button_5 Then FileWrite("Vault.ini", GUICtrlRead($Input_6)&"|") FileWrite("Vault.dll", "["&GUICtrlRead($Input_6)&"]" & @CRLF) FileWrite("vault.dll", "site=" & GUICtrlRead($Input_7) & @CRLF) FileWrite("Vault.dll", "user=" & GUICtrlRead($Input_8) & @CRLF) FileWrite("Vault.dll", "pass=" & GUICtrlRead($Input_9) & @CRLF) EndIf WEnd Exit And heres the code that I have been trying to get to load them: #include <GuiConstants.au3> GuiCreate("Password Loader", 160, 300,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $list = FileRead("Vault.ini") $Combo_1 = GuiCtrlCreateCombo("", 20, 30, 120, 21) $Input_2 = GuiCtrlCreateInput("", 20, 90, 120, 20) $Group_3 = GuiCtrlCreateGroup("Name", 10, 10, 140, 50) $Group_4 = GuiCtrlCreateGroup("Website", 10, 70, 140, 50) $Group_5 = GuiCtrlCreateGroup("Username", 10, 130, 140, 50) $Input_6 = GuiCtrlCreateInput("", 20, 150, 120, 20) $Group_7 = GuiCtrlCreateGroup("Password", 10, 190, 140, 50) $Input_8 = GuiCtrlCreateInput("", 20, 210, 120, 20) $button_1 = GUICtrlCreateButton("Load", 20, 250, 120, 40) GUICtrlSetData($Combo_1, $list) GuiSetState() While 1 $msg = GuiGetMsg() If $msg = $button_1 Then GUICtrlRead($Combo_1) GUICtrlSetData($Input_2, IniRead("vault.dll", $Combo_1, "site", "")) GUICtrlSetData($Input_6, IniRead("vault.dll", $Combo_1, "user", "")) GUICtrlSetData($Input_8, IniRead("vault.dll", $Combo_1, "pass", "")) EndIf If $msg = $GUI_EVENT_CLOSE Then Exit 0 EndIf WEnd Exit Im not sure if I'm even going about it in the right way. I have looked through the help files and searched the forums. Still no luck. Any help, even a nudge in the right direction would be greatly appreciated. Thanks, Jon Edited December 18, 2007 by Jon310 Link to comment Share on other sites More sharing options...
Jon310 Posted December 18, 2007 Author Share Posted December 18, 2007 Sorry for re-posting this in 2 separate forums, I tried to delete my previous post, but could not figure it out. ================== I have been trying to make a place where I can store my passwords for sites, nothing important so I dont need much security on it. The program to stores the passwords in an ini file (disguised as a dll file), and makes an ini file for the GUI combo on the loader. I have been working on another script to view the information without having to open the text file they are in. Heres the script to store them: #include <GuiConstants.au3> GuiCreate("Password Vault", 192, 311,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Group_1 = GuiCtrlCreateGroup("Name", 10, 10, 170, 50) $Group_2 = GuiCtrlCreateGroup("Website", 10, 70, 170, 50) $Group_3 = GuiCtrlCreateGroup("Username", 10, 130, 170, 50) $Group_4 = GuiCtrlCreateGroup("Password", 10, 190, 170, 50) $Button_5 = GuiCtrlCreateButton("Save", 10, 250, 170, 50) $Input_6 = GuiCtrlCreateInput("", 20, 30, 150, 20) $Input_7 = GuiCtrlCreateInput("", 20, 90, 150, 20) $Input_8 = GuiCtrlCreateInput("", 20, 150, 150, 20) $Input_9 = GuiCtrlCreateInput("", 20, 210, 150, 20) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit 0 EndIf If $msg = $Button_5 Then FileWrite("Vault.ini", GUICtrlRead($Input_6)&"|") FileWrite("Vault.dll", "["&GUICtrlRead($Input_6)&"]" & @CRLF) FileWrite("vault.dll", "site=" & GUICtrlRead($Input_7) & @CRLF) FileWrite("Vault.dll", "user=" & GUICtrlRead($Input_8) & @CRLF) FileWrite("Vault.dll", "pass=" & GUICtrlRead($Input_9) & @CRLF) EndIf WEnd Exit And heres the code that I have been trying to get to load them: #include <GuiConstants.au3> GuiCreate("Password Loader", 160, 300,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $list = FileRead("Vault.ini") $Combo_1 = GuiCtrlCreateCombo("", 20, 30, 120, 21) $Input_2 = GuiCtrlCreateInput("", 20, 90, 120, 20) $Group_3 = GuiCtrlCreateGroup("Name", 10, 10, 140, 50) $Group_4 = GuiCtrlCreateGroup("Website", 10, 70, 140, 50) $Group_5 = GuiCtrlCreateGroup("Username", 10, 130, 140, 50) $Input_6 = GuiCtrlCreateInput("", 20, 150, 120, 20) $Group_7 = GuiCtrlCreateGroup("Password", 10, 190, 140, 50) $Input_8 = GuiCtrlCreateInput("", 20, 210, 120, 20) $button_1 = GUICtrlCreateButton("Load", 20, 250, 120, 40) GUICtrlSetData($Combo_1, $list) GuiSetState() While 1 $msg = GuiGetMsg() If $msg = $button_1 Then GUICtrlRead($Combo_1) GUICtrlSetData($Input_2, IniRead("vault.dll", $Combo_1, "site", "")) GUICtrlSetData($Input_6, IniRead("vault.dll", $Combo_1, "user", "")) GUICtrlSetData($Input_8, IniRead("vault.dll", $Combo_1, "pass", "")) EndIf If $msg = $GUI_EVENT_CLOSE Then Exit 0 EndIf WEnd Exit Im not sure if I'm even going about it in the right way. I have looked through the help files and searched the forums. Still no luck. Any help, even a nudge in the right direction would be greatly appreciated. Thanks, Jon Link to comment Share on other sites More sharing options...
GEOSoft Posted December 18, 2007 Share Posted December 18, 2007 Sorry for re-posting this in 2 separate forums, I tried to delete my previous post, but could not figure it out. ================== I have been trying to make a place where I can store my passwords for sites, nothing important so I dont need much security on it. The program to stores the passwords in an ini file (disguised as a dll file), and makes an ini file for the GUI combo on the loader. I have been working on another script to view the information without having to open the text file they are in. Heres the script to store them: #include <GuiConstants.au3> GuiCreate("Password Vault", 192, 311,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Group_1 = GuiCtrlCreateGroup("Name", 10, 10, 170, 50) $Group_2 = GuiCtrlCreateGroup("Website", 10, 70, 170, 50) $Group_3 = GuiCtrlCreateGroup("Username", 10, 130, 170, 50) $Group_4 = GuiCtrlCreateGroup("Password", 10, 190, 170, 50) $Button_5 = GuiCtrlCreateButton("Save", 10, 250, 170, 50) $Input_6 = GuiCtrlCreateInput("", 20, 30, 150, 20) $Input_7 = GuiCtrlCreateInput("", 20, 90, 150, 20) $Input_8 = GuiCtrlCreateInput("", 20, 150, 150, 20) $Input_9 = GuiCtrlCreateInput("", 20, 210, 150, 20) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit 0 EndIf If $msg = $Button_5 Then FileWrite("Vault.ini", GUICtrlRead($Input_6)&"|") FileWrite("Vault.dll", "["&GUICtrlRead($Input_6)&"]" & @CRLF) FileWrite("vault.dll", "site=" & GUICtrlRead($Input_7) & @CRLF) FileWrite("Vault.dll", "user=" & GUICtrlRead($Input_8) & @CRLF) FileWrite("Vault.dll", "pass=" & GUICtrlRead($Input_9) & @CRLF) EndIf WEnd Exit And heres the code that I have been trying to get to load them: #include <GuiConstants.au3> GuiCreate("Password Loader", 160, 300,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $list = FileRead("Vault.ini") $Combo_1 = GuiCtrlCreateCombo("", 20, 30, 120, 21) $Input_2 = GuiCtrlCreateInput("", 20, 90, 120, 20) $Group_3 = GuiCtrlCreateGroup("Name", 10, 10, 140, 50) $Group_4 = GuiCtrlCreateGroup("Website", 10, 70, 140, 50) $Group_5 = GuiCtrlCreateGroup("Username", 10, 130, 140, 50) $Input_6 = GuiCtrlCreateInput("", 20, 150, 120, 20) $Group_7 = GuiCtrlCreateGroup("Password", 10, 190, 140, 50) $Input_8 = GuiCtrlCreateInput("", 20, 210, 120, 20) $button_1 = GUICtrlCreateButton("Load", 20, 250, 120, 40) GUICtrlSetData($Combo_1, $list) GuiSetState() While 1 $msg = GuiGetMsg() If $msg = $button_1 Then GUICtrlRead($Combo_1) GUICtrlSetData($Input_2, IniRead("vault.dll", $Combo_1, "site", "")) GUICtrlSetData($Input_6, IniRead("vault.dll", $Combo_1, "user", "")) GUICtrlSetData($Input_8, IniRead("vault.dll", $Combo_1, "pass", "")) EndIf If $msg = $GUI_EVENT_CLOSE Then Exit 0 EndIf WEnd Exit Im not sure if I'm even going about it in the right way. I have looked through the help files and searched the forums. Still no luck. Any help, even a nudge in the right direction would be greatly appreciated. Thanks, JonYou can do it with this change While 1 $msg = GuiGetMsg() If $msg = $button_1 Then $Val = GUICtrlRead($Combo_1) GUICtrlSetData($Input_2, IniRead("vault.dll", $val, "site", "")) GUICtrlSetData($Input_6, IniRead("vault.dll", $val, "user", "")) GUICtrlSetData($Input_8, IniRead("vault.dll", $val, "pass", "")) EndIf If $msg = $GUI_EVENT_CLOSE Then Exit 0 EndIf WEnd George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
martin Posted December 18, 2007 Share Posted December 18, 2007 I have been trying to make a place where I can store my passwords for sites, nothing important so I dont need much security on it. The program to stores the passwords in an ini file (disguised as a dll file), and makes an ini file for the GUI combo on the loader. I have been working on another script to view the information without having to open the text file they are in. Heres the script to store them: #include <GuiConstants.au3> GuiCreate("Password Vault", 192, 311,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $Group_1 = GuiCtrlCreateGroup("Name", 10, 10, 170, 50) $Group_2 = GuiCtrlCreateGroup("Website", 10, 70, 170, 50) $Group_3 = GuiCtrlCreateGroup("Username", 10, 130, 170, 50) $Group_4 = GuiCtrlCreateGroup("Password", 10, 190, 170, 50) $Button_5 = GuiCtrlCreateButton("Save", 10, 250, 170, 50) $Input_6 = GuiCtrlCreateInput("", 20, 30, 150, 20) $Input_7 = GuiCtrlCreateInput("", 20, 90, 150, 20) $Input_8 = GuiCtrlCreateInput("", 20, 150, 150, 20) $Input_9 = GuiCtrlCreateInput("", 20, 210, 150, 20) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then Exit 0 EndIf If $msg = $Button_5 Then FileWrite("Vault.ini", GUICtrlRead($Input_6)&"|") FileWrite("Vault.dll", "["&GUICtrlRead($Input_6)&"]" & @CRLF) FileWrite("vault.dll", "site=" & GUICtrlRead($Input_7) & @CRLF) FileWrite("Vault.dll", "user=" & GUICtrlRead($Input_8) & @CRLF) FileWrite("Vault.dll", "pass=" & GUICtrlRead($Input_9) & @CRLF) EndIf WEnd Exit And heres the code that I have been trying to get to load them: #include <GuiConstants.au3> GuiCreate("Password Loader", 160, 300,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS)) $list = FileRead("Vault.ini") $Combo_1 = GuiCtrlCreateCombo("", 20, 30, 120, 21) $Input_2 = GuiCtrlCreateInput("", 20, 90, 120, 20) $Group_3 = GuiCtrlCreateGroup("Name", 10, 10, 140, 50) $Group_4 = GuiCtrlCreateGroup("Website", 10, 70, 140, 50) $Group_5 = GuiCtrlCreateGroup("Username", 10, 130, 140, 50) $Input_6 = GuiCtrlCreateInput("", 20, 150, 120, 20) $Group_7 = GuiCtrlCreateGroup("Password", 10, 190, 140, 50) $Input_8 = GuiCtrlCreateInput("", 20, 210, 120, 20) $button_1 = GUICtrlCreateButton("Load", 20, 250, 120, 40) GUICtrlSetData($Combo_1, $list) GuiSetState() While 1 $msg = GuiGetMsg() If $msg = $button_1 Then GUICtrlRead($Combo_1) GUICtrlSetData($Input_2, IniRead("vault.dll", $Combo_1, "site", "")) GUICtrlSetData($Input_6, IniRead("vault.dll", $Combo_1, "user", "")) GUICtrlSetData($Input_8, IniRead("vault.dll", $Combo_1, "pass", "")) EndIf If $msg = $GUI_EVENT_CLOSE Then Exit 0 EndIf WEnd Exit Im not sure if I'm even going about it in the right way. I have looked through the help files and searched the forums. Still no luck. Any help, even a nudge in the right direction would be greatly appreciated. Thanks, Jon It would make more sense to me if you wrote to the file using IniWrite. Apart from it being easier and more understandable to read the script, you are less likely to have problems using IniRead. Not sure from your post what problem you are having. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Jon310 Posted December 18, 2007 Author Share Posted December 18, 2007 You can do it with this change While 1 $msg = GuiGetMsg() If $msg = $button_1 Then $Val = GUICtrlRead($Combo_1) GUICtrlSetData($Input_2, IniRead("vault.dll", $val, "site", "")) GUICtrlSetData($Input_6, IniRead("vault.dll", $val, "user", "")) GUICtrlSetData($Input_8, IniRead("vault.dll", $val, "pass", "")) EndIf If $msg = $GUI_EVENT_CLOSE Then Exit 0 EndIf WEnd Thanks for that, I knew it was something simple. Not the first time I forgot to ctrlread the GUI.. Link to comment Share on other sites More sharing options...
GEOSoft Posted December 18, 2007 Share Posted December 18, 2007 Thanks for that, I knew it was something simple. Not the first time I forgot to ctrlread the GUI..You read it but you didn't assign the value to a variable. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
GEOSoft Posted December 18, 2007 Share Posted December 18, 2007 It would make more sense to me if you wrote to the file using IniWrite. Apart from it being easier and more understandable to read the script, you are less likely to have problems using IniRead. Not sure from your post what problem you are having.I answered it in his other thread in General help and support. He is reading from an INI he just disuised it as a DLL. The following is wrong. GUICtrlRead($Combo_1) GUICtrlSetData($Input_2, IniRead("vault.dll", $Combo_1, "site", "")) Should be $var = GUICtrlRead($Combo_1) GUICtrlSetData($Input_2, IniRead("vault.dll", $var, "site", ""))ORGUICtrlSetData($Input_2, IniRead("vault.dll", GUICtrlRead($Combo_1), "site", "")) George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now