home *** CD-ROM | disk | FTP | other *** search
- //////////////////////////////////////////////////
- // Plugin-Script für Jinnee
- //
- // Funktion: Textdatei(en) ausdrucken mit IdeaList
- //////////////////////////////////////////////////
-
- // JCtxtPlg|Group=extensions|Name=Drucken mit IdeaList|File=1|Folder=0|Folderlinks=0|Desktop=0|Directory=0|
- // |Match=*.txt,*.doc,*.dok,*.tex,*.sty,*.asc,*.man,liesmich.*,readme.*,read.me,*.htm,*.html,*.rtf,*.sic,*.stg|
- // |End
-
- // Pfad von IdeaList aus ilplugin.inf lesen
- error = 1;
- cwd(inffile);
- inffile += "config\\";
- inffile += "ilplugin.inf";
- if (fopen(inffile, "r")) {
- getline(inffile,idealistpath);
- fclose(inffile);
- error = (fsize(idealistpath) == -1);
- }
-
- // ilplugin.inf oder Pfad von IdeaList nicht gefunden -> Fileselector, Pfad in ilplugin.inf sichern
- if (error) {
- cwd(idealistpath);
- if (fsel(idealistpath,"Wo ist IDEALIST.PRG?","IDEALIST.PRG")) {
- if (fopen(inffile, "w")) {
- putline(inffile,idealistpath);
- fclose(inffile);
- }
- }
- }
-
- cnfpath = path(idealistpath) + "ILPRINT.CNF";
-
- if (jinnee.TestApp(basename(idealistpath))) {
- // IdeaList bereits aktiv -> Datei(en) übergeben und ausdrucken
- if (fsize(cnfpath) != -1) {
- idealist.LoadCNF(cnfpath);
- }
- if (argc > 0) {
- for(i = 0; i < argc; i++) {
- idealist.Open(argv[i]);
- idealist.Print();
- }
- }
- }
- else {
- // IdeaList nicht aktiv -> Kommandozeile erstellen und IdeaList im Batch-Modus starten
- if (argc > 0) {
- cmd = argv[0];
- for (i = 1; i < argc; i++) {
- cmd += " " + argv[i];
- }
- if (fsize(cnfpath) != -1) {
- cmd += " " + cnfpath;
- }
- cmd += " -B";
- jinnee.Exec(idealistpath, cmd);
- }
- }
-
-