getsenic / nuimo-app-osx-actions

16 stars 6 forks source link

Add Actions for VLC, iTunes, Pixelmator, Sublime Text. Add Volume control to Spotify #12

Closed ejwill closed 8 years ago

ejwill commented 8 years ago

Add play/pause, previous/next track, volume increase/decrease to VLC and iTunes. Created default.json for both VLC and iTunes. See Pixelmator and Sublime file names for what actions are covered. Added volume increase/decrease control to Spotify and updated Spotify default.json. I uploaded Pixelmator and Sublime as script files, all others are text files.

larsblumberg commented 8 years ago

Thanks a lot for your Pull Request! Can you please submit all script files with .scpt extension? Some of your files are saved as compiled AppleScripts – can you please save them in plain text? You can open the files with a text editor and paste the raw AppleScript code if needed.

ejwill commented 8 years ago

@larsblumberg updated the file types

ejwill commented 8 years ago

added actions for Chrome, Firefox, and Safari. They all have the same actions now. I did get scrolling to work but it might need tweaks

larsblumberg commented 8 years ago

Dear @ejwill, the .scpt files are stored in binary format – Can you please save them in plain text format? Otherwise we cannot read the AppleScript source code to review it. Thank you!

ejwill commented 8 years ago

@larsblumberg so how do you want me to save the files then as .applescript since the files have to be in .scpt to work with Numio right? Do you want me to upload them as .applescript then you change them to .scpt or me to save them as .applescript?

larsblumberg commented 8 years ago

Right now the Nuimo for OS X App only looks for .scpt files. I suggest you to save your .scpt files with a text editor to save them in plain text. AppleScript Editor seems to save these files in compiled format. For security reasons, we don't accept compiled files to be uploaded.

ejwill commented 8 years ago

@larsblumberg updated all of the script files to be human readable. Sorry for all the commits.

hansmbakker commented 8 years ago

Great work!

One comment: I see in https://github.com/getsenic/nuimo-app-osx-actions/pull/12/files#diff-d34500519472862474d2d399be9afa01R7 that you removed the go back/forward actions from chrome's defaults, but left two pairs of "select previous/next tab".

I'd suggest that Senic decides which defaults there are, and to have them consistent with similar other apps, and I'd suggest not to have duplicated assignments by default removing other (more often used) from the defaults.

ejwill commented 8 years ago

@larsblumberg made an update to Spotify increase and decrease volume to handle sound volume at 90 and 10 respectively. Also, is there any way to show an icon on the device when performing and actions such as increase/decrease volume

ejwill commented 8 years ago

@wind-rider I thought next/previous tab was better suited as a default than forward/back. Could put the go forward/backward on the fly commands.

larsblumberg commented 8 years ago

@ejwill: Thanks a lot for your effort – I've figured out a few issues – can you please discuss/improve them? Thanks! Lars

ejwill commented 8 years ago

@larsblumberg I believe I fixed most of the issues you brought up. The only issue I was not able to fix was to figure out how to interact with Sublime Text through the menu. I tried tell process "Sublime Text" click menu item "Toggle Comment" of menu 1 of menu item item "Comment" of menu 1 of menu item "Edit" of menu 1 end tell but it did not work. Perhaps we could do separate actions for the different language keyboards? If not we can pull Sublime Text from the pull request.

larsblumberg commented 8 years ago

Great @ejwill, thanks a lot for your update. I'll have a look into how to click menu items with AppleScripts and will let you know here.

larsblumberg commented 8 years ago

@ejwill Sorry for responding so late! Here's how to click menu items, exemplary for Sublime Text and "Toggle Comment":

tell application "System Events"
    tell process "Sublime Text"
        click menu item "Toggle Comment" of menu 1 of menu item "Comment" of menu 1 of menu bar item "Edit" of menu bar 1
    end tell
end tell

Can you please update your Sublime Text actions that use language dependent keyboard short cuts to use menu item clicks instead?

If you have time, please keep the existing formatting of all default.json – You use a different indenting then the current formatting standard. You can check the diff to see the difference.

Then we're ready to merge I guess – Thanks a lot!

ejwill commented 8 years ago

@larsblumberg take a look now. I believe I took care of all of your issues.

larsblumberg commented 8 years ago

Thank you so much for your Pull Request, we can merge it now.