Skip to content

Instantly share code, notes, and snippets.

@tdalon
tdalon / CopyMeeting.bas
Last active November 12, 2024 11:36
Outlook VBA to copy a Meeting
Sub Duplicate()
Dim Item As Object
Set Item = GetCurrentItem()
If Item Is Nothing Then
MsgBox "No Item selected"
Exit Sub
End If
If Not TypeOf Item Is Outlook.AppointmentItem Then
Exit Sub
@tdalon
tdalon / Confluence_GetVerLink.ahk
Created February 26, 2024 10:38
Confluence: Get Version Information
@tdalon
tdalon / AddNumbers.js
Created February 7, 2024 10:31
Confluence Bookmarklets for Numbered Headings
function addIndex() {
var indices = [];
jQuery(".ak-editor-content-area .ProseMirror").find("h1,h2,h3,h4,h5,h6").each(function(i,e) {
var hIndex = parseInt(this.nodeName.substring(1)) - 1;
if (indices.length - 1 > hIndex) {
indices= indices.slice(0, hIndex + 1 );
}
if (indices[hIndex] == undefined) {
indices[hIndex] = 0;
@tdalon
tdalon / PasteImageLink.ahk
Last active February 7, 2024 09:07
Paste web image link in Confluence Cloud Fabric Editor
@tdalon
tdalon / Teams_Mute.ahk
Last active November 3, 2023 13:43
Teams Mute AutoHotkey
Teams_Mute(State := 2,showInfo:=true,restoreWin:=true){
; State:
; 0: mute off, unmute
; 1: mute on
; 2*: (Default): Toggle mute state
WinId := Teams_GetMeetingWindow()
If !WinId ; empty
return
@tdalon
tdalon / Teams_SwitchTenant.ahk
Created October 23, 2023 07:15
Teams New Switch Tenant
Teams_SwitchTenant(sTenant) {
WinId := Teams_GetMainWindow()
If !WinId ; empty
return
UIA := UIA_Interface()
TeamsEl := UIA.ElementFromHandle(WinId)
If !TeamsEl.FindFirstBy("AutomationId=idna-me-control-set-status-message-trigger") { ; menu not opened
; Click on avatar
MeCtrl := TeamsEl.FindFirstBy("AutomationId=idna-me-control-avatar-trigger")
@tdalon
tdalon / Teams_BackgroundImport.ahk
Created October 20, 2023 14:41
Import Teams meeting background files in Teams New
Teams_BackgroundImport(srcDir:=""){
; https://techcommunity.microsoft.com/t5/microsoft-teams-public-preview/backgrounds/m-p/3782690
If GetKeyState("Ctrl") {
Teamsy_Help("bgi")
return
}
If !Teams_IsNew()
{
return
@tdalon
tdalon / EmailShareActiveUrl.ahk
Created October 16, 2023 07:15
Quick Share Url by Email with AutoHotkey
; IntelliSharebyEmailActiveURL Ctrl+Shift+M
#If Browser_WinActive()
^+m:: ; <--- [Browser] Share by eMail active url
EmailShareActiveUrl:
If GetKeyState("Ctrl") and !GetKeyState("Shift") {
Run, "https://tdalon.blogspot.com/2023/10/share-url-by-email.html"
return
}
sLink := Browser_GetUrl()
@tdalon
tdalon / FocusAssist.ahk
Last active August 22, 2024 03:18
AHK Script to set Focus Assist mode with an Hotkey or by script
FocusAssist(sInput){
Run, ms-settings:quiethours
; Wait for WinTitle=Settings
WinWaitActive,Settings
UIA := UIA_Interface()
WinId := WinActive("A")
UIAEl := UIA.ElementFromHandle(WinId)
@tdalon
tdalon / JiraEpics.pq
Created August 8, 2023 10:08
Import Jira Epics with PowerQuery
let
JiraRootUrl = getNamedCellValue("JiraRootUrl"),
ProjectKey = getNamedCellValue("ProjectKey"),
Source = Json.Document(Web.Contents(JiraRootUrl & "/rest/api/2/search?jql=project=" & ProjectKey & " AND issuetype = Epic AND labels in ('process_improvement')")),
issues = Source[issues],
#"Converted to Table" = Table.FromList(issues, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", { "fields","key"}, { "Column1.fields","EpicKey"}),
#"Expanded Column1.fields" = Table.ExpandRecordColumn(#"Expanded Column1", "Column1.fields", {"customfield_10104"}, {"Epic Name"})
in
#"Expanded Column1.fields"