MozillaZine

Camino AppleScript support

Talk about the native Mac OS X browser.

Moderator: Camino Developers

hardcoreUFO

User avatar
 
Posts: 230
Joined: March 19th, 2004, 9:14 am
Location: Dunedin, NZ
October 19th, 2007, 5:14 am

Post Posted October 19th, 2007, 5:14 am

Now if AppleScript in Camino supported "do javascript" there are some nifty things that could be done with this. Is there an update to AppleScript support in the works?

smorgan
Camino Developer
 
Posts: 2430
Joined: March 16th, 2004, 1:50 pm
October 19th, 2007, 6:28 am

Post Posted October 19th, 2007, 6:28 am

hardcoreUFO wrote:Now if AppleScript in Camino supported "do javascript" there are some nifty things that could be done with this.

One of the things that could be done is that any application could steal all of your saved Camino passwords via AppleScript, so we have no plans to implement do javascript unless we can find a solution for that issue.

8-bit

User avatar
 
Posts: 755
Joined: October 19th, 2007, 5:19 pm
Location: Saitama Super Arena, Japan. Ringside
October 19th, 2007, 8:53 pm

Post Posted October 19th, 2007, 8:53 pm

smorgan wrote:One of the things that could be done is that any application could steal all of your saved Camino passwords via AppleScript, so we have no plans to implement do javascript unless we can find a solution for that issue.

Ouch. Not cool.

Hey, that's me up above:
------------------------------
Lost User 208289
New Member
Joined: 31 Dec 1969

Now how can I still be a new user when I joined in 1969? How long does it take? :p
* Want to learn more about Google's 100% opt-out policy? Details Here ;)
Save the music: http://www.turnmeup.org
A dramatic example of sonically "bricking" the shape of an album: Here. Why? The LOUDNESS wars.

hardcoreUFO

User avatar
 
Posts: 230
Joined: March 19th, 2004, 9:14 am
Location: Dunedin, NZ
October 23rd, 2007, 8:09 am

Post Posted October 23rd, 2007, 8:09 am

smorgan wrote:
hardcoreUFO wrote:Now if AppleScript in Camino supported "do javascript" there are some nifty things that could be done with this.

One of the things that could be done is that any application could steal all of your saved Camino passwords via AppleScript, so we have no plans to implement do javascript unless we can find a solution for that issue.


Is there more robust Applescript support planned for Camino, though? An obvious one, for example, is to be able to take the contents of a page and do something with it, such as export it to another program.

Uncle Asad
Camino Developer

User avatar
 
Posts: 3357
Joined: July 24th, 2004, 1:38 pm
Location: بين العالمين
October 23rd, 2007, 8:34 am

Post Posted October 23rd, 2007, 8:34 am

Yes. We looked at providing access to page source this summer, but right now Camino gets view-source in a way that's completely opaque to it, so getting access to page contents is going to require digging into Gecko's internals....
Mac OS X 10.3.9 • PowerBook G4 17" 1.33 GHz | Mac OS X 10.5.x • MacBook Pro 15" 2.2 GHz
Snow7's Camino Forum FAQSearch the Forum  Camino. HelpTroubleshoot Camino

stardomains
 
Posts: 119
Joined: October 27th, 2008, 9:50 pm
May 15th, 2009, 7:22 pm

Post Posted May 15th, 2009, 7:22 pm

Is there still no way to do Javascript with Applescript in Camino? I want to put my bookmarklets that go to the top or bottom of a webpage into a toolbar button instead.

javascript:scroll(0,document.getElementsByTagName(%22body%22)%5B0%5D.scrollHeight);
javascript:scroll(0,0)

If not, does anyone know of a pure Applescript way to do this with Camino?

stardomains
 
Posts: 119
Joined: October 27th, 2008, 9:50 pm
May 15th, 2009, 10:24 pm

Post Posted May 15th, 2009, 10:24 pm

stardomains wrote:Is there still no way to do Javascript with Applescript in Camino? I want to put my bookmarklets that go to the top or bottom of a webpage into a toolbar button instead.

javascript:scroll(0,document.getElementsByTagName(%22body%22)%5B0%5D.scrollHeight);
javascript:scroll(0,0)

If not, does anyone know of a pure Applescript way to do this with Camino?


Answered myself:

Code: Select all
activate application "Camino"
tell application "System Events"
   key code 125 using command down
end tell


Code: Select all
activate application "Camino"
tell application "System Events"
   key code 126 using command down
end tell


Image

Macskeeball

User avatar
 
Posts: 244
Joined: October 20th, 2007, 8:01 pm
May 16th, 2009, 6:47 am

Post Posted May 16th, 2009, 6:47 am

Slightly shorter ways to do the same thing.

Code: Select all
activate application "Camino"
tell application "System Events" to key code 125 using command down


Code: Select all
activate application "Camino"
tell application "System Events" to key code 126 using command down
freelance tech writer

edrush
 
Posts: 1
Joined: November 4th, 2009, 1:19 pm
November 4th, 2009, 1:32 pm

Post Posted November 4th, 2009, 1:32 pm

Where can I find a list of AppleScript commands supported by Camino? For instance, how would I open a succession of URLs, starting a new page for the first one and adding tabs for the others?

thom-22

User avatar
 
Posts: 268
Joined: January 18th, 2007, 1:15 pm
Location: San Diego
November 4th, 2009, 2:58 pm

Post Posted November 4th, 2009, 2:58 pm

edrush wrote:Where can I find a list of AppleScript commands supported by Camino?

Launch AppleScript Editor, choose "Open Dictionary..." from the File menu and navigate to Camino.app. (This is how you find the list for any application.)

edrush wrote:For instance, how would I open a succession of URLs, starting a new page for the first one and adding tabs for the others?

The "open location" command will always open the specified URL in a new tab or window (depending on how your Camino prefs are set).

Code: Select all
tell application "Camino"
  open location "http://www.apple.com"
  open location "http://caminobrowser.org"
  -- repeat as desired
end tell
iMac Intel Core 2 Duo 3.06 GHz, 4GB RAM, Mac OS X 10.6.2 | Lisa's Applescripts for Camino

Uncle Asad
Camino Developer

User avatar
 
Posts: 3357
Joined: July 24th, 2004, 1:38 pm
Location: بين العالمين
November 4th, 2009, 5:10 pm

Post Posted November 4th, 2009, 5:10 pm

In addition to what thom-22 mentioned, we also have a page on the wiki where we describe changes between versions and some limitations of the support.
Mac OS X 10.3.9 • PowerBook G4 17" 1.33 GHz | Mac OS X 10.5.x • MacBook Pro 15" 2.2 GHz
Snow7's Camino Forum FAQSearch the Forum  Camino. HelpTroubleshoot Camino

Return to Camino


Who is online

Users browsing this forum: No registered users and 5 guests