// // SAP-SM02.VDM C.Z. 12.12.2002 // 22.10.2003 // // Sends system messages to SAP R/3 // // // Expects to be on a text like: (max 60x3) // // ------------------------------------------------------------- // Das System muss in 5 Minuten heruntergefahren werden. | // L2 | // L3 ENDE| // ------------------------------------------------------------- // Next message ... | // L2 | // L3 ENDE| // ------------------------------------------------------------- // ... // .. // . // // And expects an open SapGui being on SM02 - Systemnachrichten anlegen // // Requires SAP-SM02.AUT for AutoIt // // EoL while( ! At_BoL){ // search beginning of current message block Line(-1, NOERR+ERRBREAK) EoL } if(At_BoL){ // if still At_BOL: Line(1) } if( Match("--") != 0 ){ // check if on the line of dashes Return(1) } Line(1) // First line of message :doit: Reg_Set(97, ".") Reg_Set(98, ".") Reg_Set(99, ".") #99=0 while( (Match("--") != 0) && (#99 < 3) ){ // up to next line of dashes, but max 3 lines Goto_Col(61) Search("|{|!|W, |<}", REVERSE+ADVANCE+NOERR) if( ! At_BoL){ RCB(97 + #99, BoL_Pos, Cur_Pos) } Line(1, NOERR) #99++ } while( Match("--") != 0){ // forward to end line of dashes Line(1) } if(! File_Exist("C:\src\autoit\sap-sm02.aut")){ // if AutoIt file doesn't exist: exit (otherwise endless loop!!!) return } Buf_Switch(Buf_Free) Reg_Ins(97) Ins_Newline(1) Reg_Ins(98) Ins_Newline(1) Reg_Ins(99) Ins_Newline(1) Clip_Copy_Block(0, FileSize) Buf_Quit(OK) System('c:\programme\autoit\autoit.exe C:\src\autoit\sap-sm02.aut ', DOS+SIMPLE) Line(1) // goto first line of next message (if any) EoL if( ! At_BoL ){ // if there are more messages in this block => process them also goto doit }