Educating Quotes with Automator or Applescript


hi there

know if possible put application/workflow batch smarten quotes on load of textedit files? i'll need often.

way see it, there seem 2 main obstacles:
1) don't know how automator application take bunch of files, open + run workflow on them, save + close them, move on next file in list.
2) can't automator open text file, smarten quotes (which can manually easily) , save it.

either 1 enable me learn load more things. i'm confident @ experimenting automator , applescript, has got me stumped.

p.s. clarify: can drop file 'smartquote1.txt' on application, have open it, find text:

"help"
'help'
i'm blowin' bubbles ​

, replace with

“help”
‘help’
i’m blowin’ bubbles​

before saving , closing it.

- have found reading through these threads helpful in past, hope i've pasted in right place, &c.

tardy
 

  1. try dispense disk items incrementally action
    info : http://www.macosxautomation.com/automator/actions.html#dispense-disk-items , http://www.peachpit.com/articles/article.aspx?p=1327771&seqnum=2

can use gui scripting it's ugly , error prone. here's example :

code:
set myfiles choose file default location (path desktop) of type {"public.rtf"} multiple selections allowed without invisibles    repeat 1 number of items in myfiles  	set myfile item of myfiles  	tell application "textedit"  		activate  		set mydocument open myfile  		my doguistuff()  		save mydocument  		close mydocument  	end tell  end repeat    on doguistuff()  	  	tell application "system events"  		tell process "textedit"  			keystroke "a" using command down  			delay 0.7  			if exists menu item "show substitutions" of menu 1 of menu item "substitutions" of menu 1 of menu bar item "edit" of menu bar 1  				click menu item "show substitutions" of menu 1 of menu item "substitutions" of menu 1 of menu bar item "edit" of menu bar 1  			end if  			repeat until exists window "substitutions"  			end repeat  			click button "replace in selection" of window "substitutions"  			-- saving , closing document keystrokes  			--keystroke "s" using command down  			--keystroke "w" using command down  		end tell  	end tell  	  end doguistuff  
 


Forums Macs Mac Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

Comments

Popular posts from this blog

Carrier post Error specific

How to increase vRAM for HD3000 graphics

Carrier [Information] AT&T NEXT