Sometimes, when I try to run a script, it just opens in the scripting window. Why?



  • I've set a few small scripts to run on keyboard shortcuts.

    Sometimes, they run as expected. Other times, instead of running the script, they open the script in the scripting window.

    Why do some scripts get the menu option of "Open <script>.py," while others don't?

    d7e67eb5-4895-4b0c-bf58-7f2a26ce0463-image.png

    Could I be doing something to trigger this unintentionally? Is there a way to control this behavior?



  • It may have something to do with the option key. I was having that issue, too. When you're in that menu, and you hold option, it opens the script as opposed to running it.

    When I had option in my # shortCut: syntax in the script, I think it was sometimes opening the script. Try a different modifier other than ?

    @frederik If this is the problem, is there a way to make # shortCut: syntax ignore the Open modification?


  • admin

    I really find the short alt, to open the script in a scripting window, very useful. But I see that an overwrite by # shortCut: or with in the prefs is not really helping out, also cause you need the alt modifier if you have lots of shortcuts.

    I think @rbugden proposal is a good idea: prevent the default alt open alternate menu item when an alt is in # shortCut or the prefs.


  • admin

    investigating: or this happens also when the shortcut is being used somewhere else...



  • Ahhh yes, I use alt in basically every shortcut I create, so I don't have to worry about overriding others.

    Maybe there could be a setting that would enable/disable this feature? If I want to edit a script, I don't find it that cumbersome to navigate to it in the scripting window.