; Aliases alias pstore dlg pstore alias -l lb return $crlf $+ $crlf alias -l pval writeini $psini Secure $1- alias -l gini return $ini($psini,Secure,$1) alias -l gval return $readini($psini,Secure,$1) alias -l psini return $+(",$scriptdir,secure.ini,") alias -l dlg dialog - $+ $iif($dialog($1),a,m) $1 $1 alias -l ttitle dialog -t pmod Password Modifier ( $+ $1- $+ ) alias -l pexists var %1 = $1, %i = $gini(0) | while (%i) { $iif($gini(%i) == %1,return 1) | dec %i } alias -l pstore.readme var %r = $+(",$scriptdirReadme.txt") | $iif($exists(%r),run %r,return $input(The readme file was not $+(found!,$lb,%r,$lb,Make) sure that this file was included with your download.,wo,ReadMe Not Found)) alias -l pstore.unload { if ($dialog(pstore)) dialog -x pstore if ($dialog(pmod)) dialog -x pmod .unload -rs $+(",$script,") } alias -l nfind { var %f = $1, %i = $gini(0) while (%i) { if ($gini(%i) == %f) return $gini(%i) dec %i } } alias -l pstore.load { if ($dialog(pstore)) { var %i = $gini(0), %r = 0 did -r pstore 2 while (%i) { %r = $gini(%i) did -a pstore 2 %r ( $+ $gval($gini(%i)) $+ ) dec %i } did -b pstore 4,6 did -z pstore 2 } } ; Dialogs dialog -l pstore { title "Password Storage" size -1 -1 156 111 option dbu box "", 1, 3 3 150 90 list 2, 6 9 144 81, sort size hsbar vsbar extsel button "&Add...", 3, 3 96 30 12, default button "&Modify...", 4, 36 96 30 12 box "", 5, 69 94 1 14 button "&Delete", 6, 73 96 30 12 button "&Close", 7, 124 96 30 12, ok } ON *:DIALOG:pstore:*:*: { var %d = pstore, %e = $devent, %i = $did if (%e == init) pstore.load if (%e == sclick) { if (%i == 2) $iif($did(%i,$did(%i).sel),did -e %d 4 $+ $chr(44) $+ 6) if (%i == 3) dlg pmod if (%i == 4) { var %a = did -ra pmod, %n = $gettok($did(2,$did(2).sel),1,40) if (%n) { dlg pmod | %a 2 %n | %a 4 $gval(%n) | return } } if (%i == 6) { var %c = $did(2,0).sel, %dat if ($input(Are you sure that you wish to delete the selected password $+ $iif(%c > 1,s) $+ ?,wy,Confirm Delete)) { while (%c) { %dat = $gettok($did(2,$did(2,%c).sel),1,40) if ($nfind(%dat)) { .remini $psini Secure $ifmatch } dec %c } pstore.load } } } } dialog -l pmod { title "Password Modifier" size -1 -1 123 57 option dbu text "Password:", 1, 4 5 27 8 edit "", 2, 33 3 87 11, pass autohs text "Notes:", 3, 4 22 27 8 edit "", 4, 33 21 87 11, multi autohs box "", 5, 3 34 117 4 button "&OK", 6, 33 42 27 12, ok default button "&Cancel", 7, 63 42 27 12, cancel } ON *:DIALOG:pmod:*:*: { var %d = pmod, %e = $devent, %i = $did if (%e == init) did -b %d 6 if (%e == edit) { if ((%i == 2) || (%i == 4)) { if (%i == 2) { $iif($chr(32) isin $did(2),did -ra %d 2 $remove($did(2),$chr(32))) } did - $+ $iif(($did(2)) && ($did(4)),e,b) %d 6 } } if ((%e == sclick) && (%i == 6)) { if ($pexists($did(2))) $iif(!$input(This password already exists in your list! $+ $lb $+ Overwrite?,wy,Password Exists!),return) pval $did(2) $did(4) pstore.load } } ; Standard Events ON *:LOAD: { var %x = 1 if ($input(Addon Loaded: $+ $lb $+ Password Storage $+ $lb $+ v1.00 $+ $lb $+ Author: Zmodem $+ $lb $+ Type: /pstore to begin!,io,Addon Loaded)) haltdef if ($exists($psini)) { if (!$input(A password file already exists. Do you wish to overwrite it?,wy,File Exists)) %x = 0 } if (%x) write -c $psini [Secure] } ON *:UNLOAD:return $input(Addon successfully unloaded!,io,Unload Complete) ; Menus menu menubar,status,channel { Password Storage .Load Wizard:pstore .- .Add New:dlg pmod .- .ReadMe:pstore.readme .- .Unload:if ($input(Are you sure that you want to unload the Password Store addon?,wy,Confirm Unload)) pstore.unload }