• Apfeltalk ändert einen Teil seiner Allgemeinen Geschäftsbedingungen (AGB), das Löschen von Useraccounts betreffend.
    Näheres könnt Ihr hier nachlesen: AGB-Änderung
  • Das Monatsmotto Juli lautet -- Kitsch as Kitsch can -- Jeder von Euch kann dafür ganz individuell bestimmen, was für ihn Kitsch ist und ein Foto davon einsenden. Macht mit, traut Euch! --> Klick

Ordner mit unterschiedlichen Thumbnails erstellen?

Shushu

Granny Smith
Registriert
14.03.15
Beiträge
12
<div class="bbWrapper">Hallo Leute!<br /> <br /> Zunächst einmal eine Beschreibung, was ich da eigentlich genau vor habe - vielleicht hat ja jemand eine Idee und kann mir helfen:<br /> Ich würde gern mit mehreren Shortcuts in der Lage sein unterschiedliche leere Ordner im aktuell angezeigten Finder-Bereich zu erstellen, die jeweils mit einem anderen Thumbnail ausgestattet sind - also genau wie cmd-shift-N, nur dass der Folder noch ein Thumbnail zugewiesen bekommt (wie wenn man die Info öffnet und dort auf das Icon links oben blickt und ein Bild mit cmd-V einfügt).<br /> Da dachte ich mir, ich platziere ein paar Bilder an einen Ort, der statisch bleibt und setze die Referenz direkt im jeweiligen Script. Das scheint auch zumindest so ein bisschen zu funktionieren, allerdings hat mein rudimentäres Script noch Fehler und ich schätze auch, dass es da eine elegantere Lösung geben könnte als jedes mal die Vorschau aufzurufen und das Bild direkt anzuzeigen. Wenn die Scripts selbst funktionieren, wär das ganze mit den Shortcuts mit Hilfe von Quicksilver auch kein Problem.<br /> <br /> So sieht das ganze momentan aus:<br /> <br /> <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"> <div class="bbCodeBlock-title"> Code: </div> <div class="bbCodeBlock-content" dir="ltr"> <pre class="bbCodeCode" dir="ltr" data-xf-init="code-block" data-lang=""><code>tell application &quot;Preview&quot; open &quot;/Users/[username]/__/GenericFolderIcon.png&quot; activate end tell tell application &quot;System Events&quot; tell application &quot;Preview&quot; to activate keystroke &quot;a&quot; using {command down} keystroke &quot;c&quot; using {command down} keystroke &quot;w&quot; using {command down} keystroke &quot;q&quot; using {command down} end tell tell application &quot;Finder&quot; activate set newfolder to make new folder with properties {name:&quot;NewFolder&quot;} select newfolder end tell tell application &quot;System Events&quot; activate application &quot;Finder&quot; delay 0.1 keystroke &quot;i&quot; using {command down} tell process &quot;Finder&quot; tell window 1 tell scroll area 1 click image 1 #wird nicht geklickt keystroke &quot;v&quot; using {command down} end tell end tell end tell end tell</code></pre> </div> </div><br /> <br /> Vielen Dank schon mal für jeglichen Hinweis!<br /> Schöne Grüße,<br /> Shushu</div>
 

Pill

Adams Parmäne
Registriert
07.07.12
Beiträge
1.310
<div class="bbWrapper">Ich würde mal ausprobieren einfach statt der Bilder direkt die Ordner mit Thumbnail irgendwo zu speichern und diesen Ordner dann per Skript immer wieder zu kopieren.</div>
 
  • Like
Reaktionen: Shushu

Shushu

Granny Smith
Registriert
14.03.15
Beiträge
12
<div class="bbWrapper"><blockquote data-attributes="member: 161782" data-quote="Pill" data-source="post: 4867239" class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote js-expandWatch"> <div class="bbCodeBlock-title"> <a href="/community/goto/post?id=4867239" class="bbCodeBlock-sourceJump" rel="nofollow" data-xf-click="attribution" data-content-selector="#post-4867239">Pill schrieb:</a> </div> <div class="bbCodeBlock-content"> <div class="bbCodeBlock-expandContent js-expandContent "> Ich würde mal ausprobieren einfach statt der Bilder direkt die Ordner mit Thumbnail irgendwo zu speichern und diesen Ordner dann per Skript immer wieder zu kopieren. </div> <div class="bbCodeBlock-expandLink js-expandLink"><a role="button" tabindex="0">Zum Vergrößern anklicken....</a></div> </div> </blockquote>Danke für die schnelle Antwort! Stimmt, das wär eine Möglichkeit! Allerdings würde es dann schwieriger, die Ordner bei mehrfacher Erstellung umzubenennen, oder? (1. Ordner heißt &quot;Neuer Ordner&quot;, 2. Ordner, wenn es bereits einen &quot;Neuer Ordner&quot; gibt, dann &quot;Neuer Ordner 2&quot; usw.) Das kann zwar mein Script bisher auch nicht, allerdings ist mir noch eingefallen: Ich könnte den Ordner auch so erstellen:<br /> <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"> <div class="bbCodeBlock-title"> Code: </div> <div class="bbCodeBlock-content" dir="ltr"> <pre class="bbCodeCode" dir="ltr" data-xf-init="code-block" data-lang=""><code>tell application &quot;SystemEvents&quot; tell application &quot;Finder&quot; to activate keystroke &quot;n&quot; using {command down, shift down} end tell</code></pre> </div> </div>Ich werd aber mal deinen Vorschlag ausprobieren!<br /> <br /> EDIT:<br /> Danke nochmal!<br /> Das läuft jetzt ganz gut:<br /> <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"> <div class="bbCodeBlock-title"> Code: </div> <div class="bbCodeBlock-content" dir="ltr"> <pre class="bbCodeCode" dir="ltr" data-xf-init="code-block" data-lang=""><code>tell application &quot;Finder&quot; to activate tell application &quot;System Events&quot; if exists (window 1 of process &quot;Finder&quot;) then tell application &quot;Finder&quot; to set originalWindow to window 1 end if end tell do shell script &quot;open /Users/stefd/Folders/_Folders&quot; tell application &quot;Finder&quot; to set foldersWindow to window 1 tell application &quot;System Events&quot; delay 0.01 keystroke (ASCII character 29) delay 0.01 keystroke &quot;c&quot; using {command down} delay 0.01 end tell tell application &quot;Finder&quot; close foldersWindow try open originalWindow end try end tell tell application &quot;System Events&quot; keystroke &quot;v&quot; using {command down} end tell</code></pre> </div> </div></div>
 
Zuletzt bearbeitet:

Kernelpanik

Maren Nissen
Registriert
05.03.04
Beiträge
2.304
<div class="bbWrapper"><a href="http://stackoverflow.com/questions/20172959/change-icon-of-folder-with-applescript" target="_blank" class="link link--external" rel="nofollow ugc noopener">Schau mal hier</a>. Mit seticon. Bestimmt eine elegantere Lösung als GUI scripting.</div>
 
  • Like
Reaktionen: Shushu

Shushu

Granny Smith
Registriert
14.03.15
Beiträge
12
<div class="bbWrapper"><blockquote data-attributes="member: 807" data-quote="Kernelpanik" data-source="post: 4867518" class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote js-expandWatch"> <div class="bbCodeBlock-title"> <a href="/community/goto/post?id=4867518" class="bbCodeBlock-sourceJump" rel="nofollow" data-xf-click="attribution" data-content-selector="#post-4867518">Kernelpanik schrieb:</a> </div> <div class="bbCodeBlock-content"> <div class="bbCodeBlock-expandContent js-expandContent "> <a href="http://stackoverflow.com/questions/20172959/change-icon-of-folder-with-applescript" target="_blank" class="link link--external" rel="nofollow ugc noopener">Schau mal hier</a>. Mit seticon. Bestimmt eine elegantere Lösung als GUI scripting. </div> <div class="bbCodeBlock-expandLink js-expandLink"><a role="button" tabindex="0">Zum Vergrößern anklicken....</a></div> </div> </blockquote>Danke für die Info! Das hatte ich auch schon gesehen bei meiner Suche, allerdings würd ich gern ohne zusätzliche Tools auskommen.</div>
 

sedna

Galloway Pepping
Registriert
22.10.08
Beiträge
1.364
<div class="bbWrapper">Hallo,<br /> <br /> ... mal davon ausgehend, dass du ein aktuelles OS benutzt...<br /> sofern du Xcode installiert haben solltest, könnte man mit den damit einhergehenden &quot;zusätzlichen&quot; Tools arbeiten, wie z.B. <a href="http://apple.stackexchange.com/questions/6901/how-can-i-change-a-file-or-folder-icon-using-the-terminal" target="_blank" class="link link--external" rel="nofollow ugc noopener">hier</a> beschrieben. Ganz ohne zusätzliche Tools bleibt dir nur deine oder die von Pill beschriebene simple aber effektive Lösung. Letztere lässt sich statt mit AppleScript auch mit dem <b>Automator</b> -oder auch einem Mix aus beiden- realisieren.<br /> <br /> Gruß</div>
 
  • Like
Reaktionen: Shushu

Shushu

Granny Smith
Registriert
14.03.15
Beiträge
12
<div class="bbWrapper"><blockquote data-attributes="member: 62812" data-quote="sedna" data-source="post: 4869070" class="bbCodeBlock bbCodeBlock--expandable bbCodeBlock--quote js-expandWatch"> <div class="bbCodeBlock-title"> <a href="/community/goto/post?id=4869070" class="bbCodeBlock-sourceJump" rel="nofollow" data-xf-click="attribution" data-content-selector="#post-4869070">sedna schrieb:</a> </div> <div class="bbCodeBlock-content"> <div class="bbCodeBlock-expandContent js-expandContent "> Hallo,<br /> <br /> ... mal davon ausgehend, dass du ein aktuelles OS benutzt...<br /> sofern du Xcode installiert haben solltest, könnte man mit den damit einhergehenden &quot;zusätzlichen&quot; Tools arbeiten, wie z.B. <a href="http://apple.stackexchange.com/questions/6901/how-can-i-change-a-file-or-folder-icon-using-the-terminal" target="_blank" class="link link--external" rel="nofollow ugc noopener">hier</a> beschrieben. Ganz ohne zusätzliche Tools bleibt dir nur deine oder die von Pill beschriebene simple aber effektive Lösung. Letztere lässt sich statt mit AppleScript auch mit dem <b>Automator</b> -oder auch einem Mix aus beiden- realisieren.<br /> <br /> Gruß </div> <div class="bbCodeBlock-expandLink js-expandLink"><a role="button" tabindex="0">Zum Vergrößern anklicken....</a></div> </div> </blockquote>Danke für die Hinweise! Xcode habe ich auf dem entsprechenden Rechner leider nicht drauf, weil der nur eine sehr kleine SSD hat.<br /> Mit Automator hatte ich es auch schon versucht, hatte damit aber auch keine bessere Lösung gefunden als mit Applescript.</div>