Comments on: Search a String: Offset http://foolsworkshop.com/applescript/2008/05/search-a-string-offset/ AppleScript Studio blog with tips, scripts, and tutorials Fri, 08 Feb 2013 10:36:25 +0000 hourly 1 https://wordpress.org/?v=4.5.3 By: has http://foolsworkshop.com/applescript/2008/05/search-a-string-offset/comment-page-1/#comment-5 Sat, 24 May 2008 09:03:00 +0000 http://foolsworkshop.com/applescript/2008/05/search-a-string-offset/#comment-5 “I can’t seem to get that call method command to compile in a test application.”

If cutting and pasting, beware WordPress’s curly quotes. AppleScript requires straight double quotes for string literals.

]]>
By: K. M. Lawson http://foolsworkshop.com/applescript/2008/05/search-a-string-offset/comment-page-1/#comment-4 Wed, 21 May 2008 01:17:21 +0000 http://foolsworkshop.com/applescript/2008/05/search-a-string-offset/#comment-4 Intersting, I can’t seem to get that call method command to compile in a test application.

]]>
By: K. M. Lawson http://foolsworkshop.com/applescript/2008/05/search-a-string-offset/comment-page-1/#comment-3 Tue, 20 May 2008 14:26:08 +0000 http://foolsworkshop.com/applescript/2008/05/search-a-string-offset/#comment-3 I will have to look into some more of thos NSString methods within Cocoa! Thanks for passing that info along!

]]>
By: has http://foolsworkshop.com/applescript/2008/05/search-a-string-offset/comment-page-1/#comment-2 Tue, 20 May 2008 10:47:35 +0000 http://foolsworkshop.com/applescript/2008/05/search-a-string-offset/#comment-2 Text manipulation is definitely not one of AppleScript’s strong points, and its out-of-the-box support for it really sucks. However, if you’re working in Studio you can easily take advantage of Cocoa’s own NSString methods and third-party text processing frameworks such as RegexKit. For example, to uppercase an AppleScript string:

set myText to call method “uppercaseString” of myText

For non-Studio-based projects, your best bet would be to use a Unicode-aware scriptable text editor, e.g. TextWrangler, or scripting addition/scriptable faceless background application, e.g. TextCommands.

HTH

]]>