// ------ EDITARE/LISTARE ----------------------------------------------------------- // citeste sistemul de operare x_os := RTRIM(UPPER(GETENV("OS"))) // citeste cataloagele // daca variabila scat nu este prezenta (exe mai vechi), // daca scat nu este definit, // daca catalog scat este vid, // atunci TYPE("FIL_SCAT")#"N" x_scat := IF(TYPE("FIL_SPRO")="N",h_FilePathes[fil_scat],"") x_spro := IF(TYPE("FIL_SPRO")="N",h_FilePathes[fil_spro],"") x_crlf := CHR(13)+CHR(10) aMes := {} wMes := h_NewOptions("O", ; ,,,, ; "Listare OPT/FVT",NIL, ; {aMes,{"Modificare", "Listare", "Abandon"}} ,{2}) AADD(aMes, "") AADD(aMes, "Fisierul de descriere documente de plata:") AADD(aMes, f_par) AADD(aMes, "") xQry := 1 #WHILE xQry != 0 xQry := 0 #IF h_PopUpWindow(wMes) xQry := wMes[13,1] #ENDIF #IF xQry = 1 // editare #IF !EMPTY(x_scat) MEMOWRIT(h_AddPath("edit"+h_StatId()+".cmd",x_scat),; "[RUN]"+x_crlf+; "MODE=/MAX"+x_crlf+; "DIRECTORY="+x_spro+x_crlf+; "EXE="+f_par+x_crlf+; "PARAMETERS="+x_crlf) #ELSEIF x_os = "LINUX_TS" // catalog spooler, programe implicit MEMOWRIT(h_AddPath("edit"+h_StatId()+".cmd","u:\RW\SPOOL\"),; "[RUN]"+x_crlf+; "MODE=/MAX"+x_crlf+; "DIRECTORY=C:\HAMOR"+x_crlf+; "EXE="+f_par+x_crlf+; "PARAMETERS="+x_crlf) #ELSEIF x_os = "LINUX" h_EditFile(f_par, "Parametri hOP.exe", 250, 60) #ELSEIF x_os = "WINDOWS_NT" h_DOS("CMD /C START /WAIT notepad.exe "+f_par) #ELSE // Windows 9X h_DOS("START /WAIT notepad.exe "+f_par) #ENDIF wMes[13,1] := 2 #ELSEIF xQry =2 // listare #IF !EMPTY(x_scat) MEMOWRIT(h_AddPath("hop_"+h_StatId()+".cmd",x_scat),; "[RUN]"+x_crlf+; "MODE=/MIN"+x_crlf+; "DIRECTORY="+x_spro+x_crlf+; "EXE=hOP.exe"+x_crlf+; "PARAMETERS="+f_par+x_crlf) ALERT("Lansat: hOP "+f_par) #ELSEIF x_os = "LINUX_TS" // catalog spooler, programe implicit MEMOWRIT(h_AddPath("hop_"+h_StatId()+".cmd","u:\RW\SPOOL\"),; "[RUN]"+x_crlf+; "MODE=/MIN"+x_crlf+; "DIRECTORY=C:\HAMOR"+x_crlf+; "EXE=hOP.exe"+x_crlf+; "PARAMETERS="+f_par+x_crlf) ALERT("Lansat: hOP "+f_par) #ELSEIF x_os = "LINUX" // hOP.bat va contine: // unix.com wine /.../hOP.exe /.../TMP/%1 // h_DOS("hOP.bat "+f_parN, .T.) #ELSEIF x_os = "WINDOWS_NT" // daca IMPRIMANTA = ? taskul hOP trebuie sa fie activ pt.dialog, // deci nu utilizati /MIN h_DOS("CMD /C START /WAIT /MIN hOP.exe "+f_par) #ELSE // Windows 9X // daca IMPRIMANTA = ? taskul hOP trebuie sa fie activ pt.dialog, // deci nu utilizati /MIN h_DOS("START /WAIT /MIN hOP.exe "+f_par) #ENDIF xQry :=0 #ELSE xQry :=0 #ENDIF #ENDDO