Get file path easier on a mac with applescript | Copy Path script droplet

An issue I’ve had with managing multiple files and versions of files and different servers and emailing files around to different people throughout a process… you get the idea.

I looked for a way to get the path to a file like a url online. that would be easy for anyone to navigate to, while not having to type it manually. I know it’s a small thing, but these small things add up…

So first I was surprised that mac os x doesn’t do this out of the box. I’m pretty sure it was easy enough to do in windows. Although when you control-click and “Get Info” the location of that file is displayed in the window, you can’t select it. So if you really want to type it this is your solution. I found it really annoying that you couldn’t select the text and copy it.

Then I read somewhere that you could open a terminal window and drop a file into it, then the path to the file would be printed in the terminal. Awesome, but not very useful for me, it is rare that I have a terminal window open and the process is a bit lengthy since my main drive for this is to save time (and typos) from having to type the path myself of take a screen shot of the path in either the finder or the get info window. I thought about venturing into apple script, a realm I’ve heard a bit about but never ventured alone.

After some initial tuts and intros to applescript it seems like a very feasible task. I want to either set up a shortcut so I can select the file and hit a couple keys and have the path copied to my clipboard or have a droplet in my dock to drop a file into which will copy the file’s path to my clipboard and then I can easily paste the file path into an email in a matter of seconds and trust that they will be able to navigate to the correct file.

Thanks to this great forum post I was able to find what I needed!

droplet in dock
I created a droplet with applescript to copy a files path to my clipboard (code below) and then put it into my dock for easy access! Create your own “Copy Path” droplet with this code or download mine here

[cc lang=”applescript”]
(*
I use this script to show people where to find files on our LAN.
Just drop a few files/folders onto this droplet and their pathes will be copied and put on the clipboard.
–CBT
*)

on open these_items
set myItems to itemSort(these_items) — v1.0.5 ASCIIsort failed on older versions of applescript. — CBT; 10/5/99

set path_str to “” as string

repeat with i from 1 to the count of myItems
set this_item to item i of myItems
set posix_path to POSIX path of this_item

— For now I’m stripping the preceding ‘/Volumes’ string for external
— drives so I don’t clutter my build logs.
set shortened_path to do shell script ”
echo \”” & posix_path & “\” | sed ‘s|/Volumes||’

set path_str to path_str & shortened_path & return
–set path_str to path_str & posix_path & return
end repeat

— Copy plain text to the clipboard.
set the clipboard to «class ktxt» of ((the path_str as text) as record)
end open

on itemSort(my_list)
set the index_list to {}
set the sorted_list to {}
repeat (the number of items in my_list) times
set the low_item to “”
repeat with i from 1 to (number of items in my_list)
if i is not in the index_list then
set this_item to item i of my_list
if the low_item as text is “” then
set the low_item to this_item
set the low_item_index to i
else if this_item as text comes before the low_item as text then
set the low_item to this_item
set the low_item_index to i
end if
end if
end repeat
set the end of sorted_list to the low_item
set the end of the index_list to the low_item_index
end repeat
return the sorted_list
end itemSort
[/cc]

context menu ui nightmareAlso I was able to use automator to create a context menu item – although I prefer the droplet since I don’t have to fool with the accuracy required to navigate through nested context menu items. I’m still yet to create a shortcut that will make it the fastest, but this is a big step in the right direction. It’s one thing I love about computers, and I guess life in general, where there’s a will there’s usually a way (especially when forums are involved). Figured I’d post this for posterity and in case any of you are wishing your mac could do this too.

Cornerstone Media Group | Atlanta Web Design

csmediagroup redesignI’ve joined Cornerstone Media Group of Atlanta as the Senior Web Designer and Front-End coder! A bit stale as far as news goes, I’m going on 6 months already. The reason I bring it up now is that we’ve just relaunched our website. This new look is not just about new appearances and aesthetics, it is about a new approach. The redesigned website has new features that make the user experience easier and more intuitive. There is a dynamic portfolio and the company blog is tied more into the site and more into the business. Most employees are signed on as an author on the blog. We’ll do our best to flood the inter-web with good content related to what we do and our expertise. Three of our most popular business solutions now are highlighted buttons that can take you straight to landing pages with more in depth information on each solution; SEO, Web Design and E-Commerce. The redesigned website offers a freshness that comes with change. We hope you enjoy your new experience at cornerstone. If you’re in need of any web services chances are we’ll have a solution at CSMediaGroup.

Stomper999

Interactive Design project for StomperNet’s tease of the announced reveal on 09/09/09 at 09:09:09!

“Online Marketing Changes Forever!”

stomper999-black
Wanted it to be unexpected, and I think we hit it! Check it out live at stomper999.com!
stomper999-white

Details:
For this project I used flash, html, css and javascript. Tweener for the fading effects. Found a nice stock flash from activeden for the countdown and used jquery and the easing and color plugins.

StomperNet FormulaFIVE Launch Web Design

StomperNet relaunched the popular FormaulFIVE and I was responsible for the design of the landing pages. Here are screenshots from the launch, FormulaFIVE was teased with a couple video trailers and even packaged with some bonus videos called the Cash Booster series.
Aviary stomperf5-com Picture 2Aviary stomperf5-com Picture 1Aviary-stomperf5-com-3a
Go to stomperf5.com to view the page.

CreativePro Office | Helping Freelancers Be Tidy

Doing freelancing it seems like half of the work is not the freelancing. It’s administration, accounting, management etc…

I got tired of spending my time doing those types of things and started looking for solutions, I quickly found the FREE CreativePro Office by Jeff Denton at UpStart Productions. It has already made my freelance life easier! Since it is free, I wanted to put out this review as a thank you to Jeff!

The site claims:

CreativePro Office is the most complete set of online office management tools you’re likely to find at any price – and it’s completely free! Manage your team, clients, projects, invoices, events and quotes (coming soon) from one web-based application.

CreativePro Office is well suited for both independent professionals and small teams of graphic designers, programmers and web developers.

CreativePro Office Screenshot (from flickr)

I’ve been doing small freelance web design jobs on the side since I was in school, but noticed that sometimes I spent seemingly as much time with administration as I did designing. Since I was always doing small things on the side, it never seemed important to be organized, but I can assure you that being organized is much easier than getting organized ;). But CreativePro Office seems to be exactly what I need, something better than email threads and spreadsheets to keep track of hours, rates, tasks, clients, projects and bills! I was up and running in minutes and already have a good understanding of how to manage myself better, I’ve even sent some invoices! It is much more professional than what I’ve been doing (keeping the tab documented on post it notes). I have learned a lot about my process through freelancing and I’m trying to incorporate that into a more transparent, organized and overall more professional process now. It can’t do anything but good for the client experience, and help me keep track of my tasks and hours without having to use my own clock and calculator. =)

I even wrote to Jeff personally to thank him for the great work he’s done and the service he is providing. He says there are many new features coming soon that he is very excited about. He says CPO 2.0 “will include features that are being requested most frequently!” Their website says CPO has amassed 15312 users, 14213 projects & $48,207,004.99 invoiced

CreativePro Office seems pretty flexible, and I can imagine a number of different business types utilizing it. So if you are wanting to focus more on actual work and not the other half, go check it out!

My StomperNet Portal Design

my-stompernet-com online videomy-stompernet-com pdf downloadPortal website design for StomperNet. Created to give digital access of subscription content: including video, pdf versions of print material (journal). I was responsible for the design of the front end of the site with valid html and css. I also designed the site logo and the graphics on the site. Was able to include some small customized flash elements. Visit public my.stompernet.com site and purchase instant access to StomperNet content inside the my.stompernet.com portal.
my-stompernet-com publicmy-stompernet-com publicmy-stompernet-com public

Fullscreen in AS3 Tutorial | Plus Firefox Flash bug when enter fullscreen keyboard events fired

To view the full fullscreen tutorial go here: How to use fullscreen in AS3 | Stage Display State Tutorial

fullscreen_keyboard_bug_thumbnail
Sucks when you seem to have a bug in your code somewhere so you dissect your code over and over and are convinced that according to your code, everything should be fine, so you come back later thinking fresher eyes will see it, and still can’t find the cause, and then resort to debugging with various trace statements…

I’ve been developing a custom flash player in as3. Fullscreen and all those bells and whistles… I could test locally and eveything was beautiful… but then upload and test in the browser and when I would go into fullscreen mode, the video would pause. Pretty annoying bug! So I’d go through my code and examine anywhere a call to pause the video (there are only two): pressing the play/pause button and pressing the spacebar (keyboard shortcut). I couldn’t find any correalation. I was thinking adobe must be doing some crazy security things when going into fullscreen… but no, no other video player I’ve seen does this!
After commenting out my keyboard events, the bug is fixed! But I still can’t use the spacebar to pause/play. I love this functionality for usability. Isn’t that pretty standard for video? space to pause, it’s like second nature to me.

Does entering fullscreen really trigger a keyboard event equivalent to pressing my spacebar!? Sure enough. how much sense does that make, but it gets better! I had a friend test this swf and it worked fine for him. No pause on fullscreen! Wha!? Using good ole IE7… So yes, it’s a browser specific actionscript bug, firefox even! That was one of the things I liked about flash initially, not too much to mess with as far as cross browser issues once you get the swf embedded in the html, or so I thought.

So after playing with booleans to try to control when the keyboard events will be working.

Has anyone experienced this or another issue that just left you baffled, even after you figured out the bug?!

Well, I’ve done the right thing, I’ve posted about it to hopefully help anyone else having this issue. I created a test case file to rule out anything else in my code and make sure I’m not crazy.

Get Adobe Flash player

[cc lang=”actionscript”]
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;

fsb.addEventListener(MouseEvent.CLICK, fullscreenToggle);
ssb.addEventListener(MouseEvent.CLICK, fullscreenToggle);
stage.addEventListener(FullScreenEvent.FULL_SCREEN, onFullscreenChange);
fsb.buttonMode = true;
ssb.buttonMode = true;
onFullscreenChange();

function fullscreenToggle(e:MouseEvent = null):void {
//normal mode, enter fullscreen mode
if (stage.displayState == StageDisplayState.NORMAL){
//set stage display state
stage.displayState = StageDisplayState.FULL_SCREEN;
}
//fullscreen mode, enter normal mode
else if (stage.displayState == StageDisplayState.FULL_SCREEN){
//set stage display state
stage.displayState = StageDisplayState.NORMAL;
}
onFullscreenChange();
}
function onFullscreenChange(e:FullScreenEvent = null):void {
if (stage.displayState == StageDisplayState.FULL_SCREEN) {
tracer(“full screen”);
fsb.visible = false;
ssb.visible = true;
}
else {
tracer(“small screen”);
fsb.visible = true;
ssb.visible = false;
}
tracer(“toggle to “+stage.displayState);
}
stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDownListener);

function keyDownListener(e:KeyboardEvent) {
tracer(“keyboard: keyCode: “+ e.keyCode.toString());
}
var tracerwindow:TextField;
function tracer( …args){
if (tracerwindow == null){
tracerwindow = new TextField();
tracerwindow.width = stage.stageWidth/2;
tracerwindow.height = stage.stageHeight;
tracerwindow.multiline = true;
addChild(tracerwindow);
}

for (var i:uint = 0; i < args.length; i++) { tracerwindow.appendText(args[i].toString() + " "); } tracerwindow.appendText("\n"); trace(args); } [/cc] other places that I've found this mentioned that helped me understand what was going on: http://dreamweaverforum.info/actionscript-3/123202-keyboard-event-full-screen.html http://bugs.adobe.com/jira/browse/FP-814

StomperNet Strikes Again! with FormulaFIVE

StomperNet has been a ‘buzz’.

After Andy’s ‘Mea Culpa‘ why wouldn’t it be…

But this is so much better and bigger, learning many lessons from the last launch – StomperNet strikes again!

Teamed up with Paul Lemberg a new product called FormulaFIVE (F5 for short).

Just launched a video to excite the industry!
So check out stomperf5.com now!

formula five landing page