Jean, yes for sure AppleScript is an answer and it works fine with your 
script. (When AppleScript has not been used before, configure in 
privacy&security settings that the script-menu is allowed to exec 
commands.) 

Many thanks for this solution. Very much appreciated.

jj schrieb am Freitag, 24. November 2023 um 09:24:12 UTC+1:

> Hi Peter,
>
>  1. Activate the system AppleScript Menu in the menubar
>       • Launch the Script Editor at Applications/Utilities/Script 
> Editor.app
>       • In Script Editor's settings, check the 'Show Script menu in menu 
> bar' checkbox
>       • Now you should have a permanent new Script menu on the right of 
> your  menubar
>       • In this Script menu, choose 'Open Scripts Folder' > 'Open User 
> Scripts Folder'
>       
> [image: Screenshot 2023-11-24 at 08.53.22.png]
>
> 2. Copy this AppleScript into the folder that was just opened, naming the 
> script 'Open BBEdit Notes.applescript'
>
> *use* AppleScript version "2.8"
>
> *use* *scripting additions*
>
> *tell* *application* "System Events" *to* *tell* *process* "BBEdit"
>
>    *set* frontmost *to* *true*
>
>    *click* *menu item* "Notes" *of* *first* *menu* *of* *menu bar item* 
> "Window" *of* *first* *menu bar*
>
> *end* *tell*
>
> 3. The menu item 'Open BBEdit Notes' should now appear somewhere in the 
> menubar Script menu.
>
> Now on, you will be able to open the BBEdit's Notes window from everywhere.
>
> HTH
>
> Jean Jourdain
>
> On Friday, November 24, 2023 at 12:19:25 AM UTC+1 Bruce Van Allen wrote:
>
>> Look again at setting up services. 
>>
>> > Thank you GP for answering. The shortcut for "New Note in BBEdit" with 
>> selected text is certainly useful, but it is not what I am looking for. 
>>
>> I’m re-stating GP’s suggestion to make sure you get that this wasn’t 
>> about assigning a keyboard shortcut in BBEdit to use while running BBEdit. 
>>
>> Here's what I did just now that I think gets what you want: 
>>
>> In Services Settings, I made sure the main heading “Text" is checked. 
>> Clicking its down arrow to show text services, I made sure “New Note in 
>> BBEdit” is checked. 
>>
>> Simply taking those steps now provides New Note in BBEdit in the Services 
>> menu of any* application - ** provided that I have some text selected in 
>> the front-running application whose Services menu I’ve invoked. If I choose 
>> New Note in BBEdit, it grabs the selected text and opens a BBEdit note with 
>> that text. 
>>
>> Now, back in Services Settings, when confirming that New Note in BBEdit 
>> is checked, I can also see whether a keyboard combination has been assigned 
>> to it. I can double-click at the right side of the service to add a 
>> keyboard combo if necessary. 
>>
>> Now, in any cooperating* application, if I have some text selected, by 
>> keyboard or mouse-dragging, I can hit that keyboard command and the 
>> selected text opens in a BBEdit note. 
>>
>> *Not all Mac apps cooperate - I couldn’t get this to work in Apple News, 
>> which didn’t seem to recognize that an article’s text was selected, so 
>> wouldn’t reveal the text-related Services options. 
>>
>> HTH 
>>
>> — Bruce 
>>
>> _bruce__van_allen__santa_cruz_ca_ 
>>
>>
>>
>>
>>
>> > On Nov 23, 2023, at 2:34 PM, Peter Schoo <[email protected]> wrote: 
>> > 
>> > Thank you GP for answering. The shortcut for "New Note in BBEdit" with 
>> selected text is certainly useful, but it is not what I am looking for. 
>> > 
>> > I search for a way to go to the 'Notes' window from random places, i.e. 
>> any other app or the OS, by keyboard command only. 
>> > 
>> > GP schrieb am Donnerstag, 23. November 2023 um 20:54:13 UTC+1: 
>> > While it might not be exactly what you want, the "New Note in BBEdit" 
>> service might satisfy your needs. 
>> > 
>> > In system Settings -> Keyboard -> Keyboard Shortcuts ... -> Services -> 
>> Text you can assign a keyboard shortcut to the "New Note in BBEdit" entry. 
>> In order for that service to become active where you want to use it you'll 
>> need to select a bit of text. Once you've assigned the keyboard shortcut to 
>> the service item, you can verify the assignment by selecting a bit of text 
>> then under the application menu select Services and look at the keyboard 
>> shortcut associated with the "New Note in BBEdit" item in the Services menu 
>> items list. 
>> > 
>> > On Thursday, November 23, 2023 at 4:21:30 AM UTC-8 Peter Schoo wrote: 
>> > Using BBedit 14.6, I like a lot the notes windows allowing me to take 
>> notes and manage them i.e. my half-down work in an efficient way. The 
>> 'Notes' window plays a central role. 
>> > 
>> > However, sometimes I experience the situation that, while in another 
>> application or on MosOS, I'd like to switch instantly into the 'Notes' 
>> window to add or continue on existing notes. 
>> > 
>> > Any idea how to create a keyboard shortcut or similar that allows me to 
>> bring this 'Notes' window in front and focus? 
>> > 
>> > -- 
>> > This is the BBEdit Talk public discussion group. If you have a feature 
>> request or need technical support, please email "[email protected]" 
>> rather than posting here. Follow @bbedit on Twitter: <
>> https://twitter.com/bbedit> 
>> > --- 
>> > You received this message because you are subscribed to the Google 
>> Groups "BBEdit Talk" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an email to [email protected]. 
>> > To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/bbedit/45e811cc-d967-4dc7-9a43-7860d4d93446n%40googlegroups.com.
>>  
>>
>>
>>
>>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/483e8b42-a9ce-4ce1-8ae4-ee34e13bcd67n%40googlegroups.com.

Reply via email to