Posts Tagged “script”

Es gibt ja diverse Wege wie man mit dem Thema:

Automatisch Netzwerk-Freigaben mounten unter Mac OS X

umgehen kann.

Der in meinen Augen einfachste Weg ist sicherlich sich einmalig sein Laufwerk im Finder mittels “Go -> Connect to Server” zu mounten um dann das Share-Icon einfach in seine Login-Items (System Preferences -> Accounts -> Login Items) zu ziehen.

Nunja, dies scheint fpà¼r manche Leute nicht zu funktionierenm warum kann ich eigentlich auch nicht nachvollziehen, daher hier mal ein eleganter alternativer Weg meines Arbeitskollegen.

Idee:

Man erstellt sich in seinem Home-Verzeichnis ein Ordner foo in dem Aliase der einmalig gemounteten Shares abgelegt werden. Anschliessend erstelle man ein AppleScript welches bei jedem Login automatisch ausgefà¼hrt wird und dessen einzige funktion es ist, unseren Ordner foo abzuarbeiten. Konkret alle Share-Aliase zu mounten. Wichtiog ist hierbei das die Login-Daten (User & Password) abgespeichert sind.

AppleScript-Code:

tell application "Finder"
activate
open every file of folder "foo" of home
--close every window
repeat with i in (every window whose visible is true) as list
set windowPath to (target of i)
try
set windowDisk to disk of windowPath
if not (local volume of windowDisk) then
close i
end if
end try
end repeat
end tell

Das ganze als nach einmaligem Compile als .app speichern und ab damit in die Login Items. Nun einmal aus Testgrà¼nden ausloggen und wieder einloggern und die NShares sollten alle automatisch erscheinen.

Hoffe das hilft dem einen oder anderen.

Comments No Comments »

Autohotkey sounds great if you are in need of Automation, Hotkeys and / or Scripting for your windows machine.

The description from the project page:

AutoHotkey is a free, open-source utility for Windows. With it, you can:

  • Automate almost anything by sending keystrokes and mouse clicks. You can write a mouse or keyboard macro by hand or use the macro recorder.
  • Create hotkeys for keyboard, joystick, and mouse. Virtually any key, button, or combination can become a hotkey.
  • Expand abbreviations as you type them. For example, typing “btw” can automatically produce “by the way”.
  • Create custom data-entry forms, user interfaces, and menu bars. See GUI for details.
  • Remap keys and buttons on your keyboard, joystick, and mouse.
  • Respond to signals from hand-held remote controls via the WinLIRC client script.
  • Run existing AutoIt v2 scripts and enhance them with new capabilities.
  • Convert any script into an EXE file that can be run on computers that don’t have AutoHotkey installed.

Getting started might be easier than you think. Check out the quick-start tutorial.

There is a great Script Showcase available too.

While reading about Autohotkey i discovered NiftyWindows (Window handling the easy way) too. check it out :)

Comments No Comments »

As i had some time over the weekend i started to play around with AppleScript (AS) and Exiftool to create s small AS-based Exif-Changer application.

This worked after some tries and errors but then i reached the limits of AppleScript and ScriptEditor as development environment….so i switched to XCode 3.

right now, after some hours of playing blind cow in xcode i have a working application which can change several exif-information fields in jpg-files .

Lets see how it develops…right now its just a fun project

Comments No Comments »

1