Re: Script to insert the file name in TextWrangler
Re: Script to insert the file name in TextWrangler
- Subject: Re: Script to insert the file name in TextWrangler
- From: Christopher Stone <email@hidden>
- Date: Sat, 09 Jan 2016 07:11:27 -0600
On Jan 08, 2016, at 01:48, CafeTran Wiki <email@hidden> wrote:
Could someone please help me with a script that copies the name of the open file without the path and the extension (.md) to the clipboard, for easy inserting in the open document?
______________________________________________________________________
Hey Hans,
Something like this?
------------------------------------------------------------ tell application "TextWrangler" tell front text document if on disk = true then set docName to its name if docName ends with ".md" then set the clipboard to text 1 thru -4 of docName else beep end if else beep end if end tell end tell ------------------------------------------------------------
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden