I need to go to a location on a browser page select the text (customer name)
go to word and select xxx (where the customer name is to go in this standard letter)
and paste the contents
any help would be greatly appreciated
get UI Browser.
Use that to get the HTML element IDs for the text areas you want.
Then do something like:
tell application "System Events" to tell process "Google Chrome"
set customerName to the value of text field 4 of group 1 of window 1
tell application "System Events" to tell "Microsoft Word"
you could also do it without using keystrokes by getting the elementID of the document text area in Word and then setting the value of that element to customerName.
in google chrome I inspected the element it is
I have no idea how to select the xxx in my word document
Welcome to Sea Breeze.
could you help me write those 2 please and insert them in here, happy to donate for your trouble
tell application "Google Chrome"
tell application "System Events" to keystroke "c" using command down
tell application "Microsoft Word"
tell application "System Events" to keystroke "v" using command down
tell application "System Events" to keystroke "p" using command down
I am at work, so I can't really test anything out at the moment.... maybe someone else on the forums will have better input.
Microsoft Word (which I don't use) incorporates its own Applescript dictionary with relevant commands. You could read the dictionary in your applescript editor. There are also various examples of applescripts to replace text that you could search on google.
Karl Thomas Hove wrote:
I thought you gurus would be all over this, do anyone know applescript?
There is a AppleScript specific discussion forum:MacBook Pro (15-inch Mid 2010), OS X Mountain Lion (10.8.2), 2.4GHz IntelCorei5 320GB HD 8GB RAM