• 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: driving LibreOffice.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: driving LibreOffice.


  • Subject: Re: driving LibreOffice.
  • From: Yvan KOENIG <email@hidden>
  • Date: Sat, 20 Aug 2016 17:49:12 +0200

Thanks for trying David .

But the sentence  "when I must click in a checkbox I found no other tip than using the brave old cliclick" ment that I already tested the official schemes:

click checkbox 2
as well as 
perform action AXpress of checkbox 2

none does the job :(

LibreOffice is not a standard application, it doesn't stick to Apple's rules.
I'm already glad to be able to drive the entire task with the help of cliclick but as I'm curious I wish to know if there is an alternate scheme which I am not aware of.

Yvan KOENIG running El Capitan 10.11.6 in French (VALLAURIS, France) samedi 20 août 2016 17:24:56




Le 20 août 2016 à 16:26, David Gregg <email@hidden> a écrit :

Yvan,

Here is an example from clicking on a checkbox in the Mail Preferences window.

tell application "System Events" to tell process "Mail"
set frontmost to true
keystroke "," using command down -- open "Preferences" window
repeat until exists window 1
end repeat
tell window 1
click button 1 of toolbar 1 -- make sure first tab active
tell group 1 of group 1
if value of checkbox 1 = 1 then -- [0 unchecked, 1 checked] -- "Play sounds for other mail actions" checkbox in English version
click checkbox 1
end if
end tell
end tell
end tell

Generally I tend to use a variable set to the value of the checkbox that I would like and then just compare against that value to cover off either case, eg.

set playSoundsChkBx to 1
set playSoundsChkBxValue to 0

then in the code:

if value of checkbox playSoundsChkBx ≠ playSoundsChkBxValue then
click checkbox playSoundsChkBx
end if

====================================

So in your case it looks like the statement should be:

if value of checkbox 2 = 0 then
click checkbox 2
end if

Hope this helps.

David

On Aug 20, 2016, at 7:23 AM, Yvan KOENIG <email@hidden> wrote:

Hello, not so common event, today I ask a question.

An user asked me for a script exporting more than 10,000 AppleWorks documents as PDF files.

I have a script doing the job but as it requires the application AppleWorks, it must run on an old machine which is really slow.

As LibreOffice is able to open the AppleWorks file, I'm working upon a code doing the job with this free app running on modern machines.

I have a working script but I'm not satisfied by a detail : when I must click in a checkbox I found no other tip than using the brave old cliclick.

I publish the script here hoping that some of you ( maybe Bill Cheeseman )will be able to find a neater scheme.

…



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >driving LibreOffice. (From: Yvan KOENIG <email@hidden>)
 >Re: driving LibreOffice. (From: David Gregg <email@hidden>)

  • Prev by Date: Re: driving LibreOffice.
  • Next by Date: Re: driving LibreOffice.
  • Previous by thread: Re: driving LibreOffice.
  • Next by thread: Re: driving LibreOffice.
  • Index(es):
    • Date
    • Thread