am 31. jeden Monat aus Vis ein PDF erstellen

Williklein

Mitglied
Thread Starter
Registriert
23.07.2015
Beiträge
16
Reaktionspunkte
4
Hallo,
ich habe eine Vis mit einer Monatsstatistik die am Monatsende auf 0 gestellt wird. Die möchte ich automatisch als PDF über das Druckermenü speichern.
Ein Script habe ich erstellt, das funktioniert auch, aber ich bekomme es nicht über den Automaten gedruckt und auch nicht über den Kalender als Ereignis ausgeführt.
Ich habe das script auch als APP gespeichert, leider geht das alles nur immer manuell.
Hat jemand eine Idee ?

Gruss Willi Klein
 
Es soll über einen „Kalender Alarm“, welcher in Automator gesetzt wird funktionieren:

Here's a solution that works for me:
  1. In Automator, create a Calendar Alarm
  2. Select Utilities from the library pane
  3. Select & drag Run AppleScript into the workflow area
  4. Copy/paste the AppleScript into the Run AppleScript box
  5. Save the newly created Calendar Alarm
  6. Open Calendar.app, create a new event
  7. Select the Automator calendar as your reference calendar
  8. Select Open File for the alert, and select the file you created in Automator. By default, iCal is the file that comes up when you select Open File.
  9. Change that to the name of the Automator app you created.
  10. Select Other if the file name isn't shown.

Siehe: https://discussions.apple.com/thread/4139323?answerId=19044839022&sortBy=rank#19044839022
 
Das alles habe ich zig mal versucht. Es gibt keine Möglichkeit, das die Script Datei ausgeführt wird. Ich habe die Script Datei als Script gespeichert und auch als APP gespeichert, aber es ist nicht möglich das diese im Kalender ausgeführt werden.Im Kalender passiert zu der eingestellten Zeit überhaupt keine Reaktion.
Wenn das Script im Automator ist kann ich es starten und die Vis wird auf dem Bildschirm dargestellt, der Druck als PDF wir gewählt über das Tap Feld und wird über die einzelnen tab Felder bis zum Speichern geleitet und dann ein Filename aus "Vis-Datum" erstellt und ins Download Verzeichnis gespeichert. Funktioniert alles mit einem Tastendruck. Die aus dem Skript erstellte APP kann auch per Doppelklick gestartet werden und auch da wird die PDF Datei erstellt.
Aber leider passiert das nicht über den Kalender oder ein erstelltes Ereignis.

Das Script funktioniert einwandfrei. Die Tabs kann man auch in einer Zeile eingeben, weiss im Moment nicht wie das geht.

AppleScript:
tell application "Google Chrome"

      activate
      open location "http://192.168.178.200:8082/vis/index.html?Hausanlage#Annimation"
      delay 20

end tell

tell application "System Events"

     keystroke "p" using {command down}
     delay 2
     keystroke tab
     delay 1
     keystroke tab
     delay 1
     keystroke tab
     delay 1
     keystroke tab
     delay 1
     keystroke tab
     delay 1
     keystroke tab
     delay 1
     keystroke tab
     delay 1
     keystroke tab
     delay 1
     keystroke tab
     delay 0.5
     keystroke return

     keystroke "G" using {shift down, command down}
     delay 1
     set currentDate to do shell script "date +%Y-%m-%d"

     keystroke "~/Downloads"
     delay 1
     keystroke return
     delay 1
     set fileName to "VIS-" & currentDate
     keystroke fileName
     delay 1
     keystroke return

end tell
 
Zuletzt bearbeitet von einem Moderator:
In „Automator.app“ eine „Kalendererinnerung“ erstellen – nicht als .app oder .workflow abspeichern,
sondern als „Kalendererinnerung“.

Automator-Kalendererinnerung.png
 
Zurück
Oben Unten