Suche // Search:

03.08.2011

JavaScript-Verschönerer Makro
//
JavaScript Beautifier Macro

JavaScript ist eine schön, viele Skripte, die darin geschrieben sind, sind es aber nicht (ja, auch meine nicht).
Abhilfe schafft dieses Makro.
Es sucht alle Skripte die in JavaScript geschrieben sind und "verschönert" diese, sodass sie auch nach JavaScript aussehen.

ACHTUNG:
Auch wenn die Scripte in Ihrer Funktionsweise nicht beeinträchtigt werden sollten, kann ich das nicht garantieren – Denken Sie daher an eine Sicherungskopie Ihres Formulars!


AKTUALISIERUNG:
Das Makro verwendet nun die aktuellste Version des js-beautify-Skripts von Einar Lielmanis.
Damit das Makro damit funktioniert, musste ich aber einen Großteil der Kommentare entfernen. 
Für mehr Details sehen Sie daher bitte in der Ursprungsdatei direkt nach.



JavaScript is beautiful, but most of the scripts written in it aren't (yes, mine too).
This macro is a remedy.
It looks for all scripts written in JavaScript and "beautifies" them, so they looks like JavaScript should look like.


ATTENTION:
Even if the scripts should not be affected negatively in any way I cannot ensure that – So don't forget to make a backup of you form before you use the macro!

UPDATE:
The macro now uses the latest version of the js-beautify-Skripts by Einar Lielmanis.
To make the macro work, I had to remove the most of the comments.
So if you need more information please refer to the source file.


JavaScript vor der Verschönerung
//
JavaScript before the beautification


JavaScript nach der Verschönerung
//
JavaScript after the beautification



Das Marko
//
The macro
https://cloud.acrobat.com/file/c0c8578b-b2f7-4e27-96b7-ac4f1e0b6778

02.08.2011

Suchen und Ersetzen Makro
//
Find and Replace Macro

Neulich gab es in einem Forum eine Anfrage, ob man einen bestimmten Wert in einem Formularentwurf nicht in einem Rutsch suchen und ersetzen kann.
Man kann das natürlich in der XML-Quelle über "Suchen " und "Alle ersetzen" machen, aber wenn der Suchbegriff auch innerhalb eines XML-Tags vorkommt, zerstört mitunter das Formular.
Mit einem Makro hat man da viel mehr Kontrolle, bietet es doch die Möglichkeit die Suche auf bestimmte Objekte einzugrenzen.

Tada, hier ein Makro, dass genau das ermöglicht.
Man kann die Suche über die Parameter "Klassenname" und "Startnode" auf bestimmte Objekte eingrenzen, um zum Beispiel nur Beschriftungen im Ast "xfa.template.Formular1.#Teilformular2" zu verändern.


Recently somebody in a forum asked for a way to replace a specific value in a form template in one go.
This is indeed possible with the "find" and "replace all" functions within the XML-Source.
But if any of the XML tags also contains the search string, you possibly may damage your form.
With a macro have much more control over this process, as you can limit the search to specific objects.

Ta-dah, a macro that exactly will do those things.
You can limit the search thrugh the parameters "class name" and "start node" to specific object such as all captions under the node "xfa.template.form1.#subform2".


Schritt 1 – Makro aus dem Menü aufrufen
//
Step 1 – Call macro from menu



Schritt 2 – Einstellungen vornehmen und mit "OK" bestätigen
//
Step 2 – Make settings and confirm with "OK"




Schritt 3 – Ein Dialog meldet, welche Änderungen gemacht wurden
//
Step 3 – A dialog shows, which changes have been made





Schritt 4 – Einstellungen wurden aus dem Flex Dialog in Designer übernommen
//
Step 4 – Setting from the Flex dialog were applied to Designer




Suchen und Ersetzen-Makro
//
Find and Replace Macro
https://workspaces.acrobat.com/?d=9cIUmSVH*EmQqWZtpj7Nzg