MaddTheSane / Simple-Comic

macOS comic viewer
MIT License
260 stars 22 forks source link

Apple Script compatibility for Simple Comic #83

Closed DavidPhillipOster closed 2 years ago

DavidPhillipOster commented 2 years ago

Allow AppleScripts (Script Editor and Automator) to open and close documents, move and resize their windows, get the count of pages, and get and set the current page. (Helps with automated testing.)

example:

tell application "Simple Comic"
    if exists window 1 then
        set numPages to count of pages of document of window 1
        set current page of document of window 1 to numPages - 2
    end if
end tell
MaddTheSane commented 2 years ago

Cherry-picked commit b0063bf4bbe18b7839fe84e0955e2357bff3dce8.

You might want to create separate branches for new features and pull requests, and perhaps also rebase.

DavidPhillipOster commented 2 years ago

Thank you. Will do.

DavidPhillipOster commented 2 years ago

Ah! It looks like you want me to delete my fork of Simple-Comic, fork it again, and put my changes in a branch. I realized this only after I'd reused my existing fork, but I did put my changes in a Find branch. Thank you for bearing with me as I learn to be a better contributor.

nickv2002 commented 2 years ago

@MaddTheSane would it be easier/better to give @DavidPhillipOster contributor access to this repo so he can just create branches here?

DavidPhillipOster commented 2 years ago

I don't think that's necessary: In the future, after you merge a pull request from me, I'll just delete my entire forked repository and re-create it. That should keep your git log clean. If you say so, you can let me know in https://github.com/MaddTheSane/Simple-Comic/pull/84 and I'll do it over again that way.