This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let | |
// Get total | |
Source = Json.Document(Web.Contents(JiraRootUrl&"/rest/api/2/search?jql=filter="&JiraFilterId&"&maxResults=1&fields=["&JiraFields&"]")), | |
total = Source[total], | |
GetChunk = (previousTable, maxResults as number) as table => | |
let | |
startAt = if previousTable = null then 0 else Table.RowCount(previousTable) + 1, | |
maxRes = if (maxRows - startAt < maxResults) then maxRows - startAt else maxResults, | |
MergedTable = if (startAt > total) or ((maxRows>0) and (startAt > maxRows)) then previousTable else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' https://tdalon.blogspot.com/2020/10/outlook-email-to-tasks-calendar.html | |
Public Sub CopyToTasksCalendar() | |
' Calls GetCurrentItem | |
Dim objAppt As Outlook.AppointmentItem | |
Dim Item As Object ' works with any outlook item | |
' OPTIONS | |
Dim bAskAttach As Boolean | |
bAskAttach = False ' Change to True if you want to be asked to attach. Preferred: False and keep link |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Function GetPassword() As String | |
' Get password from file stored in user profile as Proof of concept. Do not do in your work organization (Password shall be encrypted) | |
File = Environ("userprofile") & "\password.txt" | |
'Read output tmp File | |
Set FSO = CreateObject("Scripting.FileSystemObject") | |
Set ts = FSO.OpenTextFile(File, 1) | |
Password = ts.ReadLine | |
ts.Close | |
Password = Trim(Password) | |
GetPassword = Password |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Teams_GetMainWindow(){ | |
; See implementation explanations here: https://tdalon.blogspot.com/get-teams-window-ahk | |
; Syntax: hWnd := Teams_GetMainWindow() | |
WinGet, WinCount, Count, ahk_exe Teams.exe | |
If (WinCount = 0) | |
GoTo, StartTeams | |
If (WinCount = 1) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Source: https://www.autohotkey.com/boards/viewtopic.php?f=6&t=17228 | |
#SingleInstance,Force | |
global settings:=new xml("Workspace") | |
if(FileExist("workspaces.ico")) | |
Menu,Tray,Icon,Workspaces.ico | |
Gui() | |
return | |
show: | |
WinShow,% hwnd([1]) | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NotifyTrayClick(P*) { ; v0.41 by SKAN on D39E/D39N @ tiny.cc/notifytrayclick | |
Static Msg, Fun:="NotifyTrayClick", NM:=OnMessage(0x404,Func(Fun),-1), Chk,T:=-250,Clk:=1 | |
If ( (NM := Format(Fun . "_{:03X}", Msg := P[2])) && P.Count()<4 ) | |
Return ( T := Max(-5000, 0-(P[1] ? Abs(P[1]) : 250)) ) | |
Critical | |
If ( ( Msg<0x201 || Msg>0x209 ) || ( IsFunc(NM) || Islabel(NM) )=0 ) | |
Return | |
Chk := (Fun . "_" . (Msg<=0x203 ? "203" : Msg<=0x206 ? "206" : Msg<=0x209 ? "209" : "")) | |
SetTimer, %NM%, % (Msg==0x203 || Msg==0x206 || Msg==0x209) | |
? (-1, Clk:=2) : ( Clk=2 ? ("Off", Clk:=1) : ( IsFunc(Chk) || IsLabel(Chk) ? T : -1) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#SingleInstance force | |
SetTitleMatchMode, 2 | |
ComposeTitle = Compose Mail - | |
If WinExist(ComposeTitle . " ahk_exe chrome.exe") { | |
WinActivate | |
return | |
} | |
; Loop on all Chrome Windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; See related blog post https://tdalon.blogspot.com/2021/02/ahk-create-gist.html | |
#Include <Jxon> | |
#SingleInstance force | |
Token := PowerTools_GetSetting("GitHubToken") | |
If (Token="") | |
return | |
WinGetTitle, Title , A ;Get active window title | |
RegExMatch(Title,"(.*\\)?([^\\]*)\.([^\s]*)",filename) ;Try to isolate the file name from Window title with RegEx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Teams_GetMeetingWindow(){ | |
; See implementation explanations here: https://tdalon.blogspot.com/get-teams-window-ahk | |
WinGet, Win, List, ahk_exe Teams.exe | |
TeamsMainWinId := Teams_GetMainWindow() | |
TeamsMeetingWinId := PowerTools_RegRead("TeamsMeetingWinId") | |
WinCount := 0 | |
Select := 0 | |
Loop %Win% { | |
WinId := Win%A_Index% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Teams_MuteApp(sCmd:= ""){ | |
Switch sCmd | |
{ | |
Case "s","sw","switch": | |
sCmd = /Switch | |
Case "on","1": | |
sCmd = /Mute | |
Case "off","0": | |
sCmd = /Unmute | |
Default : |