Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.postscript > #1445 > unrolled thread
| Started by | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| First post | 2013-07-15 17:49 +0200 |
| Last post | 2013-07-15 18:30 +0000 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.lang.postscript
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
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Date | 2013-07-15 17:49 +0200 |
| Subject | Is 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]
| From | ashley willis <"s/^.*/valid/&&print' address'"@hostscript.org> |
|---|---|
| Date | 2013-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