Skip to main content
Home

Main navigation

  • Apps
  • Forum
  • Blog
    • Podcast
    • Guides
    • Hardware & Accessory Reviews
    • Bug Tracker
    • Developer Resources
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. macOS and Mac Apps

Quick dice rolling script for voiceover on Mac

By The Oliver Kennett, 23 June, 2018

Forum
macOS and Mac Apps

Hey guys...

I'm a table top gamer and run games. A big part of that is dice rolling and though there are several apps for IOS to roll dice, there doesn't seem to be much for Mac, which is where I keep all my notes, character sheets and encounters when running a game, so I created a quick and easy dice roller with voiceover output which I thought I'd share with the community...

1. We start in apple scripts which is in your utility folder in the finder. Open it up and create a new file.

2. Copy and paste the following:

set RN to (random number from 1 to 20)
tell application "VoiceOver" to output RN

Note: You can change the range of random numbers, I've gone with 1 to 20 as I use it for D&D.

3. Save the file. I named mine "Voiceover Dice Roller" which is how I will continue to refer to it but you can use any name, and save it to a location you can remember for the next step.

4. Now for voiceover... Open the voiceover utility, VO and F8, and under the general tab, make sure "Allow voiceover to be controlled with apple script" is checked. This won't work otherwise.

5. Move to the Commanders tab, switch to the keyboard sub tab, and make sure "Enable keyboard commander" is on. You will find a list of shortcut keys that you can use with the right option key, for example, right option key with T gives you the time.

6. Now add a new shortcut key, select which letter or key it's going to be, I went for "R" as it's the first letter in roll... Clever Ollie... Then click the popup menu, go to custom and in the sub menu there is "Run apple script". Hit this and then find the apple script you created earlier. Select it and boom, you're done.

Now, assuming you used the same shortcut key as me, hit right option and the R key and voiceover will give you a random number between 1 and 20, or what ever range you set.

Hope this helps, and happy rolling.

Any questions about playing Dungeons&Dragons with sight loss, just drop me a line on twitter @OliverKennett and I'd be more than happy to talk you through it. It's a wonderful game to play for everyone, sighted or not. All you need is imagination.

Options

  • Log in or register to post comments

More Like This

Looking for an app to create a list I can reorder on the fly... (Forum Topic)
Any apps with good verbal descriptions of pilates/yoga positions? (Forum Topic)
Note for UK users of apple devices and the new paramount plus service... No audio description. (Forum Topic)
Please help! Trying to solo a single interviewee in multitrack recording on Amadeus Pro (Forum Topic)
What do you find is the most accessible and feature rich podcast host on the web (Forum Topic)
Uploading your own audio to the Anchor App (Forum Topic)
Boom: Bass Booster & Equalizer (iOS and iPadOS App Directory)
What are the alternatives to apple watch including smart watches and other wearables? (Forum Topic)

Site Information

  • About
  • Club AppleVis
  • FAQ
  • Contact

Unless stated otherwise, all content is copyright AppleVis. All rights reserved. © 2023 | Accessibility | Terms | Privacy