Welcome to MacBoardz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Applescript for Safari's Google searches

 
   Macintosh computer (Home) -> Apple Scripts RSS
Next:  Copying .app file  
Author Message
spacemancw

External


Since: Apr 20, 2008
Posts: 2



(Msg. 1) Posted: Sun Apr 20, 2008 10:16 am
Post subject: Applescript for Safari's Google searches
Archived from groups: alt>comp>lang>applescript (more info?)

On my old ibook with OS X 10.4 I could clear recent searches in
Safari's google search field with the following code

try
tell application "Safari"
--activate
tell application "System Events"
tell process "Safari"
tell window 1
tell tool bar 1
tell group 4
tell splitter group 1
tell text field 2
click button 1
tell button "search"
tell menu 1
click menu item "Clear Recent Searches"
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell
end tell
on error
--quit
end try

No on my new MacBook Pro with 10.5.2 this code no longer works, does
nothing

If I change line 8 to "tell group 2" from "tell group 2" it does
actually drop down the menu in that Google search field, but does
nothing with it.
Anybody know how to fix this?
Thanks

 >> Stay informed about: Applescript for Safari's Google searches 
Back to top
Login to vote
spacemancw

External


Since: Apr 20, 2008
Posts: 2



(Msg. 2) Posted: Wed May 07, 2008 5:49 am
Post subject: Re: Applescript for Safari's Google searches [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

T24gQXByIDIwLCAxOjE2oHBtLCBzcGFjZW1hbmN3IDxzcGFjZW1hLi4uQHlhaG9vLmNvbT4gd3Jv
dGU6DQo+IE9uIG15IG9sZCBpYm9vayB3aXRoIE9TIFggMTAuNCBJIGNvdWxkIGNsZWFyIHJlY2Vu
dCBzZWFyY2hlcyBpbg0KPiBTYWZhcmkncyBnb29nbGUgc2VhcmNoIGZpZWxkIHdpdGggdGhlIGZv
bGxvd2luZyBjb2RlDQo+DQo+IHRyeQ0KPiCgIKAgoCCgIHRlbGwgYXBwbGljYXRpb24gIlNhZmFy
aSINCj4goCCgIKAgoCCgIKAgoCCgIC0tYWN0aXZhdGUNCj4goCCgIKAgoCCgIKAgoCCgI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PiBJZiBJIGNoYW5nZSBsaW5lIDgg
dG8gInRlbGwgZ3JvdXAgMiIgZnJvbSAidGVsbCBncm91cCAyIiBpdCBkb2VzDQo+IGFjdHVhbGx5
IGRyb3AgZG93biB0aGUgbWVudSBpbiB0aGF0IEdvb2dsZSBzZWFyY2ggZmllbGQsIGJ1dCBkb2Vz
DQo+IG5vdGhpbmcgd2l0aCBpdC4NCj4gQW55Ym9keSBrbm93IGhvdyB0byBmaXggdGhpcz8NCj4g
VGhhbmtzDQoNClRyeWluZyBhZ2FpbiENCnRoYW5rcw==

 >> Stay informed about: Applescript for Safari's Google searches 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
applescript for search with google - Hello, I'm a newbie to Macs and Mac scripting. In TextEdit, under TextEdit>Services, there's an item called Search with Google. Does anyone know whether this is an Applescript and if so, what it says? I'm hoping to adapt it to another text editing..

AppleScript Language Guide for AppleScript 2.0 - Hello, The AppleScript Language Guide, updated for AppleScript 2.0, is now available here : <http://developer.apple.com/documentation/AppleScript/ Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html> Patrick -- Patrick Stadelmann..

Applescript RSS - Is there any way to acquire an RSS feed using Applescript? I'd like to be able to specify the RSS URL, then have Applescript consume the most recent 5 entries. Thanks, A

New AppleScript features in 10.5 - On this page <http://www.apple.com/applescript/> (which is formatted in a very un-Apple manner) there's a list of the new features in AppleScript, with each on a clickable link. Some look interesting and I don't want to torpedo any fun discussio...

Leopard, Firefox & Applescript - Can anyone tell me why a script I wrote to log in to my bank no longer works in Firefox since I installed Leopard? Can it by fixed? Thanks
   Macintosh computer (Home) -> Apple Scripts All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]