// // SAP-CreateUser.VD C.Z. 12.12.2002 // 14.05.2003 // // Creates user in SAP // // // Expects to be on a text like: // // USER Anrede(H/F) Nachname Vorname Sprache(DEFI) Telefon(0234/1234) Durchwahl(5678) Fax(0234/1234) Durchwahl(5678) Mail // // And expects an open SapGui being on SU01 - Benutzerpflege: Einstieg // // Creates a temp\SAP-CREATEUSER.AUT for AutoIt // // Reg_Set(19, 'WinActivate, Benutzerpflege: Einstieg WinWaitActive, Benutzerpflege: Einstieg Send, {HOME} Send, {DEL} Send, {DEL} Send, {DEL} Send, {DEL} Send, {DEL} Send, {DEL} Send, {DEL} Send, {DEL} Send, {DEL} Send, {DEL} ; USER ;### Send, {F8} WinWaitActive, Benutzer pflegen Send, {ENTER} Send, {UP} ; H/F ;### Send, {TAB} ; Nachname ;### Send, {TAB} ; Vorname ;### Send, {TAB} Send, {DOWN} Send, {DOWN} Send, {DOWN} Send, {DOWN} Send, {DEL} ; Sprache ;### Send, {RIGHT} Send, {TAB} Send, {TAB} ; Telefon ;### Send, {TAB} ; Durchwahl ;### Send, {TAB} Send, {TAB} ; Fax ;### Send, {TAB} ; Durchwahl ;### Send, {TAB} Send, {TAB} ; Mail ;### Send, {ENTER} Send, {ENTER} Send, {ENTER} Send, +{TAB} Send, {RIGHT} Send, {ENTER} Send, {TAB} Send, {TAB} WinActivate, Benutzerpflege: Einstieg WinWaitActive, Benutzerpflege: Einstieg ') #11=Buf_Num // Current buffer with list of names #12=Buf_Free // working buffer with aut-file BS(#12) Reg_Ins(19) #13=Buf_Free // working buffer BS(#11) while (! At_EoF) { BoL RCB(20, CP, EoL_Pos) Buf_Switch(#13) Reg_Ins(20) // USER Anrede(H/F) Nachname Vorname Sprache(DEFI) Telefon(0234/1234) Durchwahl(5678) Fax(0234/1234) Durchwahl(5678) Mail // Ins_Newline(1) BoF while (! At_EoF) { Search("|!|W", NOERR+ERRBREAK) #18=CP if (Match("-") == 0) { RE(21) Search("|{|W,|>}", NOERR) } else { Search("|{|W,|>}", NOERR) RCB(21, #18, CP) // 1 Eintrag } BS(#12) BoF if (Reg_Size(21) > 0) { Replace(";###", "Send, ") } else { Replace(";###", "") } Reg_Ins(21) BS(#13) } BS(#12) FSA("|(VEDIT_TEMP)\sap-CreateUser.aut", OK+NOMSG) Buf_Empty(OK) Reg_Ins(19) BS(#13) Buf_Empty(OK) if ( File_Exist("|(VEDIT_TEMP)\sap-CreateUser.aut.stop")) { break } System('c:\programme\autoit\autoit.exe |(VEDIT_TEMP)\sap-CreateUser.aut ', DOS+SIMPLE) BS(#11) Line(1, NOERR) } BS(#12) Buf_Quit(OK) BS(#13) Buf_Quit(OK) BS(#11)