pfroelicher

export container fields, create a folder macos, write into it...

Discussion created by pfroelicher on Mar 12, 2014
Latest reply on Mar 12, 2014 by pfroelicher

I need to export container fields to a folder on the desktop of the user.

Nowadays I have a script that loops through my records and does the "export field content" .

When I start the script, I define the new folder and its location and then press "enter" for each record.

However I would like to automatise this.

My script would do something like this:

Check you're on the right layout

Execute Applescript : check if the folder nfe_export is created on desktop...if not create it

go to first record

Export field content, path Get(DesktopPath)/nfe_export/

Go next, exit after last

 

my existing script, which needs a manual input for the first record, where I create the folder looks like this.

 

I think most elegantly I would use Applescript to A: Create a folder on the desktop B: pull the content of the container fields.

 

Any suggestion

 

Ir para registro/solicitação/página

[ Primeiro ]

Definir variável [ $caminho; Valor:Get ( DesktopPath ) & "/" & "nfe_export"&"/" ]

Realizar AppleScript [ AppleScript nativo: tell application "Finder" activate

make new folder at folder "Desktop" of folder "pfroelicher" of folder "Users" of startup disk with properties {name:"nfe_export"} end tell

]

Loop

Exportar conteúdo do campo [ PC::pc_danfe_pdf; “file:$caminho” ]

Exportar conteúdo do campo [ PC::pc_danfe_xml; “file:$caminho” ]

Ir para registro/solicitação/página

[ Próximo; Sair depois do último ] End Loop

 

Outcomes