• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Exporting to Grapher
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exporting to Grapher


  • Subject: Re: Exporting to Grapher
  • From: Nik Youdale <email@hidden>
  • Date: Mon, 19 Dec 2005 07:56:11 +1100

Hmmmm... I was really hoping there would be something i could use...damn.

Is GUI scripting a script in which you tell certain buttons to be pressed and text typed into a text field and that sort of thing? Just the automation of what you would normally do manually with a mouse and keyboard?

I don't know much about applescript, but i had a bit of a look around on the net and found some code which i modified a bit. Is this sort of thing 'GUI scripting'?

tell application "Grapher"
activate
end tell

tell application "System Events"
tell process "Grapher"
set frontmost to true
end tell

keystroke return
key down command
keystroke "a"
key up command
keystroke (delete)
keystroke "y = (x^2)+2x-5"
keystroke return

end tell

This code works fine when grapher is not open, but when it is open, it simply replaces what was in the grapher window with another equation. Is there some apple script code to tell if an application is currently running, and then if so, do the following commands?

Also, I was looking in the frameworks folder, but found nothing that sounds like it was a graphing thing, but then i looked in the private frameworks folder and found a framework called GraphKit. Now I'm not sure whether this framework supports the graphing of mathematical functions, or whether it is just for drawing graphs and tables like the ones in pages. I read somewhere that this framework is currently only available for apple developers, so maybe its just gonna be a bit of a waiting game for them to either release that publically, or add some scripting capabilities to Grapher.

Where does one submit a bug report or feature request to?

Cheers

-Nik

On 19/12/2005, at 4:42 AM, Daniel Jalkut wrote:

Your best bet for this kind of thing is usually AppleScript. Unfortunately, it looks like Grapher is not scriptable.

If this is a must-have feature you might be able to use GUI Scripting to achieve the result you desire. I think the result will be clumsy and difficult to implement in light of the complications of navigating the "just launched" dialog, waiting for it to finish launching, etc.

Not great news, huh? I would definitely write a bug report about this asking Apple to make Grapher scriptable.

Daniel

On Dec 17, 2005, at 5:20 PM, Nik Youdale wrote:

Hi,

I am fairly new to cocoa, and I'm trying to build an application that could take advantage of Apple's Grapher included with Tiger. In a nutshell, what i want to do is type an equation in a textField, and press a button to have Grapher open and graph that equation. Is there any such way of doing this? I looked for automator actions for Grapher as i thought this may help but could not find any.

Cheers

- Nik
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
sweater.com

This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: Exporting to Grapher
      • From: Joseph Heck <email@hidden>
    • Re: Exporting to Grapher
      • From: Wain <email@hidden>
References: 
 >Exporting to Grapher (From: Nik Youdale <email@hidden>)
 >Re: Exporting to Grapher (From: Daniel Jalkut <email@hidden>)

  • Prev by Date: Re: Using Zip executable in Cocoa Application
  • Next by Date: Re: Exporting to Grapher
  • Previous by thread: Re: Exporting to Grapher
  • Next by thread: Re: Exporting to Grapher
  • Index(es):
    • Date
    • Thread