Clips: eine echt coole Alternative

10 March, 2010 (23:37) | Software I Use | By: hubi

Ich nutze ja gerne LaunchBar, welches sich einige Zwischenablagen merken kann und noch einige andere coole Features hat. Dann habe ich für häufige Text-Zeilen mal TextExpander ausprobiert, was aber immer noch nicht so anwenderfreundlich wie mein eigenes Type4MeBlafasel war.
Was aber nun all diesen Tools den Rang zur Zeit abläuft, ist Clips. Das Programm merkt sich nicht nur brav die letzten x Inhalte der Zwischenablage (da lassen sich sogar Programme ausklammern!), sondern ich kann diesen Clips auch noch Shortcuts zuweisen, ihnen Kurzbezeichnungen geben und in einer Übersicht danach suchen. Genial!
Das Tool kann auch noch einige andere coole Sachen und könnte sich neben LaunchBar, 1Password, iStat Menus und DTerm zu den am häufigsten genutzten Tools bei mir mosern.

Dazu war das Ding noch ein Schnäppchen bei Macheist... ist wohl auch das einzige wirklich coole Tool aus der Liste, das sich wirklich bezahlt gemacht hat... na ja, Flow vielleicht noch, wobei Transmit mir wirklich besser gefällt und das auch bei Erstellen von neuen Dateien etwas runder lief im Test.

Erst mal Finger weg von Squeeze

27 February, 2010 (01:00) | NERV! | By: hubi

Mal als Warnung, weil ich gerade nur Ärger damit habe. Seit der Installation (heute Morgen) habe ich meine Programme und meinen Dokumenten-Ordner damit etwas verkleinert (37 GB auf ca 34 GB). Nur rödelt jetzt mein TimeMachine Backup seit 3 Stunden und löscht fleissig alte Backups, da auf einmal ein ca. 97 GB Backup ansteht. Dazu läuft mein Kernel-Log noch mit Fehlmeldungen voll (20 MB ala)
Feb 26 23:03:39 Joschi kernel[0]: hfs: cat_updatelink: couldn't resolve cnid 3518067
Feb 26 23:03:39 Joschi kernel[0]: hfs: cat_updatelink: couldn't resolve cnid 3518069
Feb 26 23:03:39 Joschi kernel[0]: hfs: cat_updatelink: couldn't resolve cnid 3518080
Feb 26 23:03:39 Joschi kernel[0]: hfs: cat_updatelink: couldn't resolve cnid 3518081
Feb 26 23:05:16 Joschi kernel[0]: hfs: cat_updatelink: couldn't resolve cnid 1668827
Feb 26 23:05:20 Joschi kernel[0]: hfs: cat_updatelink: couldn't resolve cnid 1668881

Ich will mal nur hoffen, dass sich das Problem irgendwie beheben lässt, die Bude die das Stück verbrochen hat, ist informiert, jetzt bin ich mal gespannt was Ihnen dazu einfällt.

Never Install Version 1.0, never trust a temp free software offer

Ich bin jetzt durch mit dem Thema...

Applescript: Bildschirmfoto alle 30 Sekunden (nur das Geräusch verrät einen ;-))

25 February, 2010 (02:25) | OS X | By: hubi

Das hier als AppleScript-File abspeichern

Code zum markieren einmal anklicken Code im Skript-Editor öffnen

set dFolder to "~/Desktop/screencapture/"

do shell script ("mkdir -p " & dFolder)

repeat 2 times

set dateTime to do shell script "date +%Y%m%d_%H%M%S"

do shell script ("screencapture " & dFolder & dateTime & ".png") -- Capture screen.

delay 2 -- Wait for 30 seconds.

end repeat

und crontab ablaufen lassen...
z.B.
40 8 * * * osascript /Users/hubi/scripts/screenshooter.scpt
Ach, wie sinnlos praktisch =)

Exposé mit AppleScript steuern

25 February, 2010 (02:10) | OS X | By: hubi

Code zum markieren einmal anklicken Code im Skript-Editor öffnen

do shell script "/Applications/Utilities/Expose.app/Contents/MacOS/Expose 1"

...wobei natürlich die 1 auch eine 2, 3 oder sonst etwas sein kann (Quelle).

AppleScript: Etwas eigenartige Datumsliste

25 February, 2010 (02:06) | AppleScript, ical | By: hubi

Es ging darum, eine Liste von Terminen zu bauen und zwar auf Grundlage von etwas eigenwillig formatierten Strings... wem auch immer das helfen mag =)

Code zum markieren einmal anklicken Code im Skript-Editor öffnen

--1/29

--2/22, 24, 26 (to return three different dates)

--2/22-25 (return four different dates)

--2/23-25, 27-28, 3/30 (return six different dates)

--2/21, 23, 25-27 (return five different dates)

--12/22-25, 1/1-2 works too =)

-- and even 1/25-2/1

set mydates to my makeDateList("1/25-2/1")

repeat with mydate in mydates

my addToiCal("MyDate2StringCalendar", mydate, mydate, "blaBla", "mydesc")

end repeat

------------------------------

on makeDateList(datestring)

set myoutput to {}

set AppleScript's text item delimiters to ","

set mydates to every text item of datestring

set AppleScript's text item delimiters to ","

set cd to (current date) - (time of (current date))

set day of cd to 1

set month of cd to 1

repeat with mydate_string in mydates

set mydate_string to delete_space(mydate_string as text)

if mydate_string contains "-" then

set AppleScript's text item delimiters to "-"

set StartDate to text item 1 of mydate_string

set EndDate to text item 2 of mydate_string

set AppleScript's text item delimiters to ""

copy string2date(StartDate, cd) to StartDate

copy string2date(EndDate, cd) to EndDate

copy {StartDate} to tempDateList

if StartDate < EndDate then

repeat until StartDate = EndDate

set StartDate to StartDate + 60 * 60 * 24

set tempDateList to tempDateList & StartDate

copy StartDate to cd

end repeat

set myoutput to myoutput & tempDateList

else

error "StartDate is not < EndDate!!"

end if

else

copy string2date(mydate_string, cd) to currentDate

set myoutput to myoutput & currentDate

end if

end repeat

return myoutput

end makeDateList

on delete_space(thestring)

repeat with i from 1 to count of characters of thestring

if last character of thestring = " " then

set thestring to (((characters 1 through -2 of thestring) as text) as text)

set is_modified to true

else

exit repeat

end if

end repeat

repeat with i from 1 to count of characters of thestring

if first character of thestring = " " then

set thestring to (((characters 2 through -1 of thestring) as text) as text)

set is_modified to true

else

exit repeat

end if

end repeat

return thestring

end delete_space

on string2date(thestring, datedummy)

--works with 23 or 1/12 (so day only or month/day)

copy datedummy to whereIStarted

if thestring contains "/" then

set AppleScript's text item delimiters to "/"

set theday to (text item 2 of thestring) as integer

set themonth to (text item 1 of thestring) as integer

set AppleScript's text item delimiters to ""

set month of datedummy to themonth

set day of datedummy to theday

-- if we started last year and should end up in next year... so what

if datedummy < whereIStarted then

set year of datedummy to (year of datedummy) + 1

end if

else

set theday to thestring as integer

set day of datedummy to theday

end if

return datedummy

end string2date

on addToiCal(CalendarTitle, StartDate, EndDate, mySummary, mydescription)

tell application "iCal"

if calendar CalendarTitle exists then

else

make new calendar with properties {name:CalendarTitle}

end if

tell calendar CalendarTitle

make new event at end of events with properties {start date:StartDate, end date:EndDate, summary:mySummary, description:mydescription, allday event:true}

end tell

end tell

end addToiCal

Kleines Update des Codes, da war noch ein Bug drin, der zu einem Endlos-Loop führen konnte...
Zudem ist das jetzt mal ein RealLive-Beispiel, mit Eintragung in iCal =)

Script the unscriptable

24 February, 2010 (10:42) | scripting | By: hubi

Sikuli ist eine neuer Ansatz Skripte zu erstellen, so etwas wie Extreme-GUI-Scripting. Anstelle von aufrufen von GUI-Elementen via Applescript macht man einfach einen Screenshot der Stelle auf die geklickt werden soll, bzw. bei deren Erscheinen auf dem Bildschirm das Skript weiter laufen soll.
Sehr schöne Idee, insbesondere bei Java Programmen, Flash Anwendungen, die so nicht ohne weiteres automatisch zu steuern wären. Zudem sooo simpel, dass es jeder nach 5 min drauf hat, ein Skript zu programmieren, das die IP-Adresse ändert.
Es läuft (wie alle GUI-Scripting-Ansätze) nicht immer 100%ig und auch die Geschwindigkeit ist nicht der Hit, aber im Falle eines Falles immer noch schneller, als von Hand durch irgend eine AppleSkript-Feindliche App zu steuern.

Das Programm gibt es für Windows, Mac und Linux. Es basiert auf Phyton.

und noch mehr defaults write

23 February, 2010 (22:50) | defaults write, links | By: hubi

http://secrets.blacktree.com/?show=all&page=1

und einer den ich noch nicht kannte bezüglich Spaces(To lower the delay between moving windows from space to space):
defaults write com.apple.dock workspaces-edge-delay -float 0.1; killall Dock

AppleScript: Länge einer Audio-Datei auslesen

22 February, 2010 (23:10) | AppleScript | By: hubi

Spotlight kann so etwas wunderbar und noch dazu bei verschiedensten Audio-Formaten:

Code zum markieren einmal anklicken Code im Skript-Editor öffnen

set aFile to choose file

tell application "Finder" to set filename to name of aFile

set AppleScript's text item delimiters to " = "

set duration to text item 2 of (do shell script "mdls -name kMDItemDurationSeconds " & quoted form of (POSIX path of aFile))

set AppleScript's text item delimiters to "."

set total_seconds to text item 1 of duration

set AppleScript's text item delimiters to ""

set showsec to (total_seconds as integer) mod 60

set showmin to (total_seconds as integer) div 60

display dialog filename & return & return & "Duration:" & return & showmin & " min " & showsec & " sec"

Mein lichter Moment der Woche

22 February, 2010 (11:07) | Blafasel | By: hubi

Irgendwie ist die MacCommunity Seite inspirierend was solche Kommentar angeht..

....Bislang erlaubt Apple auf dem iPhone keine Browser, die nicht auf dem WebKit basieren, dem Unterbau des hauseigenen Browsers Safari. Wie es Opera gelingen soll,...
--macnews--

Apple hat ja damit geworben, dass das iPhone kein kastriertes Internet (mal abgesehen von Flash) darstellt, sondern alles funktioniert. Opera möchte aber etwas anderes, das Internet läuft nämlich erfahrungsgemäß schneller ohne Eier.

Anagramme – verdammte viele davon

22 February, 2010 (00:48) | Blafasel, links | By: hubi

Mein Lieblings-Anagramm von der Seite ist: