My idea is to read from an excel file where i do maintain the credentials of my workers.
It would be nice to have a invoke this window or toolbar with a mouse bump.
It should appear near cursor or mouse.
I guess a datagrid should be used for best control, because i think clicking a whole row would paste user and password, while clicking a cell would just insert user or password.
Since i am a little bit rusty with coding qm i need your help.
Please give me some suggestions and maybe a hint which examples to test.
Database db.Open(db.CsExcel("$documents$\book1.xls")) ARRAY(str) a;int c ;note: data starts from row 2. Row 1 must be column names: User, Password.
db.QueryArr("SELECT User FROM [Sheet1$]" a) for(c 0 a.len) lb3.addline(a[0 c])
if(!ShowDialog(dd &sub.DlgProc&controls))ret
#sub DlgProc v function# hDlg message wParam lParam
sel message ,caseWM_INITDIALOG ,caseWM_DESTROY ,caseWM_COMMANDgoto messages2 ret ;messages2 sel wParam ,case [4,5,6] ,str u p ,int i=LB_SelectedItem(id(3 hDlg) u) ,if(i<0)ret ,if wParam!=4 ,,db.QueryArr(F"SELECT Password FROM [Sheet1$] WHERE User='{u}'" a 1) ,,p=a[0] ,;out F"{u} {p}" ,;paste u and/or p ,act ,sel wParam ,,case4paste u ,,case5paste p ,,case6AutoPassword u p ret1
Error (RT) in <open ":3512: /599">Account popup: 0x80040E37,
[Microsoft][ODBC Excel Driver] Das Microsoft Jet-Datenbankmodul konnte das Objekt 'Sheet1$' nicht finden
I renamed Tabelle1 to Sheet1.
So it would be nice to have your xls to see if there is something wrong with my german windows.
Database db.Open(db.CsExcel("$documents$\book1.xls")) str s;ARRAY(str) a;int c ;note: data starts from row 2. Row 1 must be column names: User, Password.
db.QueryArr("SELECT User FROM [Sheet1$]" a) for(c 0 a.len) s.addline(a[0 c])
int i=ListDialog(s """Accounts")-1;if(i<0)ret str u p
u.getl(s i) int j=ShowMenu("4 Paste user[]5 Paste password[]6 Paste user && password[]-[]Cancel");if(j=0)ret
if j!=4 ,db.QueryArr(F"SELECT Password FROM [Sheet1$] WHERE User='{u}'" a 1) ,p=a[0] ;out F"{u} {p}"
;paste u and/or p act sel j ,case4paste u ,case5paste p ,case6AutoPassword u p