Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
I want to create an AppleScript that shows people who are unfamiliar with computers how to do something in a given app - for example, how to create WordArt in Word. Here's how the AppleScript program would work:

1) The AppleScript program would place a transparent image over the thing the user has to click. The best way to do this would probably be to find the location of the center of the thing the user has to click, then set the location of the center of the image to that location.
2) The AppleScript program waits for the user to click that button.
3) The AppleScript program then tells the user what to do next.
 

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
This code seems to log the location of a menu item in Safari, maybe relative to the menu bar in which the item is located:
Code:
tell application "Safari" to activate
tell application "System Events"
	tell process "Safari"
		set theItem to menu item "New Window" of menu "File" of menu bar 1
		tell theItem
			get value of attribute "AXPosition"
		end tell
	end tell
end tell
 

960design

macrumors 68040
Apr 17, 2012
3,700
1,569
Destin, FL
I want to create an AppleScript that shows people who are unfamiliar with computers how to do something in a given app - for example, how to create WordArt in Word. Here's how the AppleScript program would work:

1) The AppleScript program would place a transparent image over the thing the user has to click. The best way to do this would probably be to find the location of the center of the thing the user has to click, then set the location of the center of the image to that location.
2) The AppleScript program waits for the user to click that button.
3) The AppleScript program then tells the user what to do next.
Sounds like a fantastic idea! Let us know when you get something together.
 

superscape

macrumors 6502a
Feb 12, 2008
937
223
East Riding of Yorkshire, UK
I still think you're going to struggle.

You'd need Word (in your example) to provide some kind of user interaction suite specifically for the purpose. It'd need to be able to create UI items within the app itself and somehow connect the UI items back to your Applescript. Much like AppleScriptObjC does with Cocoa. Word doesn't have a user interaction suite that does that and I'm not aware of any app that does (although I may be wrong).
 

960design

macrumors 68040
Apr 17, 2012
3,700
1,569
Destin, FL
I still think you're going to struggle.

You'd need Word (in your example) to provide some kind of user interaction suite specifically for the purpose. It'd need to be able to create UI items within the app itself and somehow connect the UI items back to your Applescript. Much like AppleScriptObjC does with Cocoa. Word doesn't have a user interaction suite that does that and I'm not aware of any app that does (although I may be wrong).
You are not 'wrong', everything you said is correct and the 'easy way'. Applescript can use GUI scripting to provide the workflow and simple dialogs to access / control any program. Combined with Cocoa or Java you could provide a much more interesting user experience / education.

PS. It may be better to recreate the interfaces in HTML5. Then provide the tutorial 'on-top' of that. This would provide more control and more access to potential customers / users. They could 'learn' Solaris on a chromebook or Nook for example, instead of actually having to have access to a Solaris environment.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.