scripting bbedit "insert timestamp" menu item
scripting bbedit "insert timestamp" menu item
- Subject: scripting bbedit "insert timestamp" menu item
- From: Rowland Carson via AppleScript-Users <email@hidden>
- Date: Thu, 30 May 2019 18:05:56 +0100
I use BBEdit for all my PHP scripting work and have some Applescripts to make
life easier in some oft-repeated tasks, making frequent use of GREP search &
replace for cleaning up things and inserting URLs etc for often-used entities.
I now want to create a new AppleScript that makes use of a BBEdit menu item. In
the past, I’ve used the “record script” feature to discover how to do things
like that, but that feature seems to have disappeared.
In most PHP scripts I have a line near the top such as:
$last_update = "2019-05-30, 15:55”;
At the commit of every edit, I scroll up to the top of the file, select the
string between the quotes and choose Edit/Insert/Short time stamp. It would
save me a little time if I could automate that step in AppleScript. Obviously I
can find the required string using GREP, but then I am stuck. I cannot see
anywhere in the BBEdit scripting dictionary a way to call the required menu
item directly. I seem to recall that there is a way to choose a specific menu
item, but I can’t remember how to do it. I’m also slightly nervous that if the
BBEdit menu structure changes it would probably foul up that type of script.
Any suggestions?
in friendship
Rowland
| Rowland Carson ... that's Rowland with a 'w' ...
| <email@hidden> http://www.rowlandcarson.org.uk
| Skype, Twitter: rowland_carson Facebook: Rowland Carson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden