Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #1445 > unrolled thread

Is it possible to get the file-name of the script

Started byCecil Westerhof <Cecil@decebal.nl>
First post2013-07-15 17:49 +0200
Last post2013-07-15 18:30 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.lang.postscript


Contents

  Is it possible to get the file-name of the script Cecil Westerhof <Cecil@decebal.nl> - 2013-07-15 17:49 +0200
    Re: Is it possible to get the file-name of the script ashley willis <"s/^.*/valid/&&print' address'"@hostscript.org> - 2013-07-15 18:30 +0000

#1445 — Is it possible to get the file-name of the script

FromCecil Westerhof <Cecil@decebal.nl>
Date2013-07-15 17:49 +0200
SubjectIs it possible to get the file-name of the script
Message-ID<87bo63ddr3.fsf@Aspire.decebal.nl>
I want to do something depending on the language. For example:
    [
        isDutch { % ifelse
            (Waarschuwing:)
            ()
            (dit is een SATIRE.)
        } { % ekse
            (Warning:)
            ()
            (this is SATIRE.)
        } ifelse
    ]  arrayOnPage

I was thinking about doing this through the script-name. So when the
name is like:
    script-eng.ps

isDutch is false, otherwise it is true. (At the moment I only need two
languages.) But for this I need to know the name of the script. Can
this be done? (Otherwise I just need to use a parameter for it.)

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

[toc] | [next] | [standalone]


#1449

Fromashley willis <"s/^.*/valid/&&print' address'"@hostscript.org>
Date2013-07-15 18:30 +0000
Message-ID<alpine.DEB.2.02.1307151824540.27744@ashley.laurelmail.net>
In reply to#1445
On Mon, 15 Jul 2013, Cecil Westerhof wrote:

> I want to do something depending on the language. For example:
>    [
>        isDutch { % ifelse
>            (Waarschuwing:)
>            ()
>            (dit is een SATIRE.)
>        } { % ekse
>            (Warning:)
>            ()
>            (this is SATIRE.)
>        } ifelse
>    ]  arrayOnPage
>
> I was thinking about doing this through the script-name. So when the
> name is like:
>    script-eng.ps
>
> isDutch is false, otherwise it is true. (At the moment I only need two
> languages.) But for this I need to know the name of the script. Can
> this be done? (Otherwise I just need to use a parameter for it.)

in gs there is: http://ghostscript.com/doc/current/Language.htm#File

%!PS
currentfile .filename {
   dup (script-eng.ps) eq {
     ...
   } {
     ...
   } ifelse
} {
   % file is a filter
} ifelse

-ashley

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.postscript


csiph-web