Skip to content

Instantly share code, notes, and snippets.

;*******************************************************
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY
; Right now you can get a coupon code here: https://the-Automator.com/Learn
;*******************************************************
~LButton::
if (a_timesincepriorhotkey != -1 && a_timesincepriorhotkey<200)
cnt += 1
else if (a_timesincepriorhotkey > 400)
cnt := 0
;*******************************************************
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY
; Right now you can get a coupon code here: https://the-Automator.com/Learn
;*******************************************************
#SingleInstance, force
#Include, lib\Chrome\Chrome.ahk ;https://github.com/G33kDude/Chrome.ahk/releases
; verify if the profile folder exists
; if not, create it
if !FileExist("profile")
;*******************************************************
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY
; Right now you can get a coupon code here: https://the-Automator.com/Learn
;*******************************************************
HTTP:=ComObjCreate("WinHttp.WinHttpRequest.5.1")
AHKPastebin(Content,Name:="",Notify:=1,Run:=0){
HTTP.Open("POST","https://p.ahkscript.org/", False)
HTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
HTTP.Send("code=" UriEncode(Content) "&name=" UriEncode(Name) "&channel=#ahkscript")
if HTTP.Status()!=200{ ;If not okay
;*******************************************************
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY
; Right now you can get a coupon code here: https://the-Automator.com/Learn
;*******************************************************
;http://www.autohotkey.com/board/topic/80697-long-keypress-hotkeys-wo-modifiers/ Author: Bon
$Escape:: ; Long press (&gt; 0.5 sec) on Esc closes window
KeyWait, Escape, T0.5 ; Wait up to 0.5 sec for key release (suppress auto-repeat)
If ErrorLevel ; timeout, so long press
PostMessage, 0x112, 0xF060,,, A ; ...use PostMessage to close the active window
;*******************************************************
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY
; Right now you can get a coupon code here: https://the-Automator.com/Learn
;*******************************************************
;https://ahdictionary.com/word/hundredsmart.html
File_Path:="B:\Custom\Win\Desktop\100 Words to Make you sound smarter.txt"
FileRead,Var,% File_Path
;~ Resizable_GUI(var,300,900)
Loop,read, % File_Path
mail := ComObjActive("Outlook.Application").GetNameSpace("MAPI").GetDefaultFolder[6] ; Access the Session NameSpace
;~ mail := ComObjActive("Outlook.Application").GetNameSpace("MAPI").GetDefaultFolder[0] ; Access the Session NameSpace
myDestFolder := mail.Folders("CCY")
numb := myDestFolder.Items.Count
MsgBox % numb
Loop % mail.Items.Count
{
; if Instr(mail.Items[A_Index].SenderName,"JoeTazz") {
if Instr(mail.Items[A_Index].Subject,"commented on") {
;*******************************************************
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY
; Right now you can get a coupon code here: https://the-Automator.com/Learn
;*******************************************************
Selection := ComObjActive("Outlook.Application").ActiveExplorer().Selection ;Connect to Outlook and store list of selected emails
For a,b in Selection { ;Loop over selected emails
oAtt:=selection.item(A_Index).Attachments ;For each email, create object storing the attachments
for k, v in oAtt ;use For loop over attachments
k.SaveAsFile("C:\temp\" . k.DisplayName) ;This will write the files to the C:\temp\ folder. Update for your needs.
;*******************************************************
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY
; Right now you can get a coupon code here: https://the-Automator.com/Learn
;*******************************************************
Text:="|&lt;YouTube Skip Ads&gt;*89$62.zzzzzzzzzzy7btzzyTyTzStyTzzbzbzbaTzzzkztztzb9cTwDUQDTtiNnzPnaNlyHaQzaRtjT7VtbjtbSNzyMSNvyxrb3zqHaSz0BtyNxatbDrvSPrSNaNnxynaRsCQa1yTa5kzzzzbzzzzzzzzztzzzzzzzzzyTzzzzzs"
loop { ;keep looping over
Sleep,500 ;sleep for 1/2 a second
ok:=FindText(0,0,150000,150000,0,0,Text) ;See if can find the image
if Ok ;if it is found, do the next line
FindText_Control_Click(Ok,X_Adj:=0,Y_Adj:=0,ahkEXE:="chrome.exe") ;Send control click to the position (note, doesn't move mouse)
;*******************************************************
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY
; Right now you can get a coupon code here: https://the-Automator.com/Learn
;*******************************************************
#Include <Chrome> ;Remember to put Chrome in your library folder
#SingleInstance,Force
;**************************************
page:=Chrome.GetPageByTitle("Joe","startswith") ;This will connect to the second index of a specific tab
If !IsObject(page){
MsgBox % "That wasn' t object / the page wasn't found"
;*******************************************************
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY
; Right now you can get a coupon code here: https://the-Automator.com/Learn
;*******************************************************
; Original post from rodfell Oct 2007 https://autohotkey.com/board/topic/41463-simple-dual-monitor-window-switch/
;***********adjust next two lines to the monitors you wish to toggle between*******************
SysGet, Mon1, Monitor, 1 ; Grab monitor number 1 create a Mon1 var
sysGet, Mon2, Monitor, 2 ; Grab monitor number 2 create a Mon2 var
;make sure you place the two above monitor lines at top of script
;************************Toggle between monitors*******************************.