Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > apple script question

apple script question
Thread Tools
Fresh-Faced Recruit
Join Date: Nov 2007
Status: Offline
Reply With Quote
Nov 17, 2007, 12:03 PM
 
anyone know how to make apple script listen for mouse events and simulate key strokes?

thanks
     
Sal
Dedicated MacNNer
Join Date: Sep 2000
Location: Cupertino, CA USA
Status: Offline
Reply With Quote
Nov 19, 2007, 12:39 AM
 
Try this:

<http://prefabsoftware.com/uibrowser/>
     
Baninated
Join Date: Oct 2002
Location: In yer threads
Status: Offline
Reply With Quote
Nov 19, 2007, 04:08 AM
 
Originally Posted by jinxjinx View Post
anyone know how to make apple script listen for mouse events and simulate key strokes?

thanks
You mean how it used to have a record feature?

IMHO Applescript is being slowly moved out in favor of Automator. And now Automator has this "record" feature in 10.5
     
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Nov 19, 2007, 10:15 AM
 
Where do you get the idea that AppleScript is on the way out? AppleScript and Automater do different things: AppleScript is a full scripting language that just got a number of important and significant updates in 10.5, Automator is a linear system that can use AppleScript and other modules to glue together a non-forking workflow.

If you just need to do a simple process, use Automator. If you need something with any logic at all in it, use AppleScript.
     
Sal
Dedicated MacNNer
Join Date: Sep 2000
Location: Cupertino, CA USA
Status: Offline
Reply With Quote
Nov 19, 2007, 03:52 PM
 
Leopard is a big release for AppleScript! Check out www.apple.com/AppleScript for details. It is the native scripting language of Mac OS X and will continue to be advanced and improved. Thanks, Sal
     
Baninated
Join Date: Oct 2002
Location: In yer threads
Status: Offline
Reply With Quote
Nov 20, 2007, 05:31 AM
 
Well color me wrong. Record now does work in the Finder.

I apologize.
     
zro
Mac Elite
Join Date: Nov 2003
Location: The back of the room
Status: Offline
Reply With Quote
Nov 20, 2007, 08:38 AM
 
That reminds me, under 10.5 I seem to no longer be able to specify text item delimiters without having '.' (dot) be one of them.
     
Sal
Dedicated MacNNer
Join Date: Sep 2000
Location: Cupertino, CA USA
Status: Offline
Reply With Quote
Nov 23, 2007, 09:59 PM
 
This works fine for me in 10.5.1:

set this_string to "Sal Sue Bob Carl"
set AppleScript's text item delimiters to " "
set these_names to every text item of this_string
set AppleScript's text item delimiters to ""
these_names
--> returns: {"Sal", "Sue", "Bob", "Carl"}
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:29 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2