Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
modifying multiple macros from one screen
#1
I have macros to log me in to various web sites. Occassionally, I need to change the password to these websites. Rather than going into QM and searching for each individual macro, I would like to have one screen that shows the name of the website with editable text boxes that show the user name and password of that website. Basically, it would be say 5 rows of 3 colums each.

Website User Name Password
Yahoo johndoe@yahoo.com 12345
Gmail johndoe@gmail.com 54321
Hotmail johndoe@hotmail.com password234

I want to be able to click into the user name and password fields and if I change the password, the corresponding macro will be updated permanently. The first column is static text representing not only the website to log into but also the macro that will be edited by any changes occurring from this dialog box. Is this possible?
#2
Possible but better place these passwords in a file or database or registry, not in macros. Then macros could retrieve passwords from the file/database/registry. For example, if the file is Excel workbook, you can edit it in Excel.
#3
you can use a dialog and exe and have it set it with rset and rget then have a menu on your taskbar maybe.
#4
Thank you both for your reply.

Gintaras,

Why not put in Macros. I would rather not do anything to the registry. Also, I don't want to have to open another program in order to obtain this information. I would like the information to be self contained in the macro file. The reason for this is I use the same set of macros on my desktop and my laptop and when I update the macros on one computer, I just copy that file to the other. If I used a registry file, I would have to constantly be updating the registry on the computer I am copying the file to. Also, I only want to have to copy one file, rather than 2 or more.

If I was to use excel, I would have to open excel in order to get the information and I only have excel on one computer.

If I wanted to use notepad/wordpad, how would you suggest I go about it? You also suggested using a database, could elaborate on that idea a bit, using a particular program, would that have to be running in the foreground or could it work totally in the background?

Thanks for your help.
#5
Use a macro to store user names and passwords. Use this function to retrieve them from the macro.

Member function str.ValueFromMacro
Code:
Copy      Help
function# $macro $name [action] ;;action: 0 read, 1 write, 2 delete

;Reads, writes or deletes a value from a macro that contains list of name/value pairs.
;If action is 0, returns 1 if found the name in the macro, or 0 if not found or the macro does not exist.
;If action is 1 or 2, returns 1.


;Macro format:
;name1 value1
;name2 value2
;...


;macro - macro name.
;name - the first word in a line.
;action:
;;;0 - reads the value (the rest of the line) from the macro to this variable (str variable for which the function is called).
;;;1 - writes this variable to the macro as the value.
;;;2 - removes the name/value pair from the macro. Does not use and does not change this variable.


;EXAMPLE
;str s s1 s2
;;write two values
;s="value1"; s.ValueFromMacro("testx" "name1" 1)
;s="value2"; s.ValueFromMacro("testx" "name2" 1)
;;read two values
;s1.ValueFromMacro("testx" "name1")
;s2.ValueFromMacro("testx" "name2")
;out "%s %s" s1 s2



;macro to string map
IStringMap m=CreateStringMap(1|4)
str s.getmacro(macro); err if(!action) ret
if(s.len) m.AddList(s "")

;get, add/replace or remove
sel action
,case 0 ret m.Get2(name this)!=0
,case 1 m.Add(name this)
,case 2 m.Remove(name)
,case else ret

;string map to macro
m.GetList(s "")
int i=qmitem(macro)
if(i) s.setmacro(i)
else newitem macro s "" "" "" 3

err+ end _error
ret 1


Forum Jump:


Users browsing this thread: 1 Guest(s)