Skip to content

Instantly share code, notes, and snippets.

@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 April 18, 2024 00:05
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"
@tdalon
tdalon / Jira_EditEpic.ahk
Last active July 28, 2023 14:40
Jira Quick Set Epic with AutoHotkey
Jira_EditEpic(IssueKey, EpicKey:="", EpicLinkCfId:="") {
; suc := Jira_EditEpic( IssueKey, EpicKey, EpicLinkCfId:="")
JiraRootUrl := Jira_IssueKey2RootUrl(IssueKey)
If (EpicLinkCfId ="") {
EpicLinkCfId := Jira_GetCfId(JiraRootUrl,"Epic Link")
}
If (EpicKey ="") {
EpicKey := Jira_IssueKey2EpicKey(IssueKey,"",JiraRootUrl)
}