Hello
I have a basic script with some display dialogs and creates a text file based upon the inputs. The user puts in numbers only. They can contain comma’s. Problem is that the file is used in a workflow that doesn’t allow comma’s in the numbers, but points.
Al the comma’s should be converted to points. It’s something with text delimeters, but I can not figure out to get it to work or i should write a rule for each variable , but it will make the code lengthy and slow.
Anyone can help?
set NameJob to the text returned of (display dialog "Job name" default answer "job")
set WriteFile to "Macintosh HD:Users:" & (do shell script "whoami") & ":Desktop:" & NameJob & ".ppf"
set PrintWidth to the text returned of (display dialog "paper width" default answer "52")
set PrintHeight to the text returned of (display dialog "Paper height" default answer "36")
set ElementWidth to the text returned of (display dialog "Element width" default answer "")
set ElementHeight to the text returned of (display dialog "Element height" default answer "")
set Row to the text returned of (display dialog "columns" default answer "")
set Column to the text returned of (display dialog "rows" default answer "")
set BlockWidth to ElementWidth * Row
set BlockHeight to ElementHeight * Column
set BlockTrfLeft to the text returned of (display dialog "left margin" default answer "")
set BlockTrfTop to the text returned of (display dialog "Top margin" default answer "")
set PPFFile to "%!PS-Adobe-3.0
%%CIP3-File Version 3.0
CIP3BeginSheet
(Sheet structure of CIP3 example) CIP3Comment
/CIP3AdmJobName (" & NameJob & ") def
/CIP3AdmMake (blank for posting) def
/CIP3AdmModel (PC210) def
/CIP3AdmSoftware (CutCreator) def
/CIP3AdmCreationTime (" & (current date) & ") def
/CIP3AdmArtist (blank for posting) def
/CIP3AdmCopyright (Copyright blank for posting) def
/CIP3AdmPSExtent [" & PrintWidth & " cm " & PrintHeight & " cm] def
/CIP3AdmSheetLay /Left def
/CIP3AdmPrintVolume 120000 def
/CIP3AdmPaperGrammage 130 def
CIP3BeginCutData
/CIP3CutModel (Wohlenberg 92) def
CIP3BeginCutBlock
/CIP3BlockTrf [1 0 0 1 " & BlockTrfLeft & " cm " & BlockTrfTop & " cm] def
/CIP3BlockSize [" & BlockWidth & " cm " & BlockHeight & " cm] def
/CIP3BlockElementSize [" & ElementWidth & " cm " & ElementHeight & " cm] def
/CIP3BlockSubdivision [" & Row & " " & Column & "] def
/CIP3BlockType /CutBlock def
/CIP3BlockElementType /Unknown def
/CIP3BlockName (Block 1) def
CIP3EndCutBlock
CIP3EndCutData
CIP3EndSheet
%%CIP3EndOfFile
"
set tmpLogdatei to (open for access file WriteFile with write permission)
write PPFFile starting at eof to tmpLogdatei
close access tmpLogdatei