I am improving my AppleScript to export my static folder to a bib file (LaTeX). But there is one piece missing:
I cannot find a way to make the script select the folder. I was able to ascribe a shortcut to it (manual page 76), but after invoking it the selection reverts back to All references. I am curious to know if there is a way to jump to the sidebar without using the mouse. Otherwise the script won't work.
How to automate exporting of static folder
Re: How to automate exporting of static folder
We don't provide AppleEvents that manipulate the UI. But you could possibly do this with GUI scripting. Google for many links to this, here's one
http://www.macosxautomation.com/applesc ... scripting/
Jon
Sonny Software
http://www.macosxautomation.com/applesc ... scripting/
Jon
Sonny Software
Re: How to automate exporting of static folder
Ok, thanks for the link
Re: How to automate exporting of static folder
BTW, I assume you know the groups that the folder contains. You an easily script exporting the references from each group in that folder.
Jon
Sonny Software
Jon
Sonny Software
Re: How to automate exporting of static folder
Don't recall, will try to look for info about this on the manual
Re: How to automate exporting of static folder
Here is an updated script for those wanting to export folder references to a bib file quickly. This is for LaTeX users:
1. First choose your destination for the bib file in Biblio -> Bibliography
2. Ascribe a shortcut for your static folder (in the script mine is comm+1)
3. Type the name of your static folder into the script
4. Within All references, select the reference you want to copy to your static folder
5. Run the script below: it will copy your last reference to the static folder, then it will update everything to the bib file.
Run this script:
1. First choose your destination for the bib file in Biblio -> Bibliography
2. Ascribe a shortcut for your static folder (in the script mine is comm+1)
3. Type the name of your static folder into the script
4. Within All references, select the reference you want to copy to your static folder
5. Run the script below: it will copy your last reference to the static folder, then it will update everything to the bib file.
Run this script:
Code: Select all
tell application "Bookends"
activate
delay 1
end tell
tell application "System Events"
tell process "Bookends"
keystroke "1" using (command down)
delay 1
key code 123 using {control down, option down, command down}
delay 2
keystroke "TYPE HERE THE NAME OF YOUR STATIC FOLDER"
delay 1
keystroke "h" using {option down, shift down, command down}
delay 1
keystroke "a" using {option down, shift down, command down}
delay 1
end tell
end tell
tell application "System Events"
tell process "Bookends"
keystroke "b" using {shift down, command down}
delay 1
keystroke return
delay 1
keystroke return
delay 1
keystroke "r" using {command down}
delay 1
end tell
end tell
Re: How to automate exporting of static folder
Just made a post with a different script here: viewtopic.php?f=2&t=4105&p=19158#p19158
Re: How to automate exporting of static folder
I have produced a more streamlined macro, this time with Keyboard Maestro 8. This is better than my Apple Script above. There are two things you have to do: 1) assign a folder destination in Biblio - Bibliography; 2) Change name of static folder, in this case "Thesis".
This thing works like magic, saves time!
This thing works like magic, saves time!
- Attachments
-
- Screen Shot 2017-09-28 at 9.22.32 PM.png (136.62 KiB) Viewed 22916 times
Re: How to automate exporting of static folder
Hi Nhaps,Nhaps wrote: ↑Thu Sep 28, 2017 10:06 pm I have produced a more streamlined macro, this time with Keyboard Maestro 8. This is better than my Apple Script above. There are two things you have to do: 1) assign a folder destination in Biblio - Bibliography; 2) Change name of static folder, in this case "Thesis".
This thing works like magic, saves time!
are u still using this script?
I was looking for a similar solution that can run regularly to export recently modified references (using Keyboard Maestro)-
Re: How to automate exporting of static folder
These scripts were written before Bookends had an AppleScript dictionary and true AS support. You can now access the contents of a group directly without bothering with the UI.
Jon
Sonny Software
Jon
Sonny Software