Skip to content

Instantly share code, notes, and snippets.

#SingleInstance, Force
;**************************************
Gui, +AlwaysOnTop
Gui, Color, cbaac86
Gui, Add, Text, x21 y7 w124, Customer
Gui, Add, Text, x28 y36 w124, Number
Gui, Add, Text, x38 y64 w124, Expiry
Gui, Add, Text, x45 y93 w124, Sec
Gui, Add, Text, x40 y122 w124, Name
@JoeGlines
JoeGlines / in list.ahk
Last active September 12, 2021 23:42
Put items in a format for in-list query
;*******************************************************
; 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 <default_Settings>
#SingleInstance,Force
;***********save clipboard to retore later*******************
Store:=ClipboardAll ;Store full version of Clipboard
clipboard = ; Empty the clipboard
SendInput, ^c ;changd from Send 11/23
#SingleInstance,Force
Appskey & z:: ;launch my zoom meeting
run %comspec% /c ""%A_AppData%\Zoom\bin\Zoom.exe" "--url=zoommtg://zoom.us/join?action=join&confno=8155790366&pwd=myPassword"",,hide
WinWait, Zoom Meeting
Sleep, 100
Send !v ;Alt V is typical hotkey for toggling video
return
;*******************************************************
; 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
;*******************************************************
XL:=XL_Handle(1) ;Get pointer to Excel
;***********call function*******************
loc:=XL_Find_Headers_in_Cols(XL,["email","country","Age"]) ;pass search terms as an array
MsgBox % "email: " loc["email"] . "`nCountry: " loc["country"] . "`nAge: " loc["Age"]
;********************search***Find columns based on header********************************.
;~The script needs to be run at an elevated level- this takes care of that
if (! A_IsAdmin){ ;http://ahkscript.org/docs/Variables.htm#IsAdmin
Run *RunAs "%A_ScriptFullPath%" ; Requires v1.0.92.01+
ExitApp
}
;be sure to use 32-bit AutoHotkey
ParseJSON(jsonStr){
static SC:=ComObjCreate("ScriptControl"),C:=Chr(125)
SC.Language:="JScript",ComObjError(0),SC.ExecuteStatement("function arrangeForAhkTraversing(obj){if(obj instanceof Array){for(var i=0; i<obj.length; ++i)obj[i]=arrangeForAhkTraversing(obj[i]);return ['array',obj];" C "else if(obj instanceof Object){var keys=[],values=[];for(var key in obj){keys.push(key);values.push(arrangeForAhkTraversing(obj[key]));" C "return ['object',[keys,values]];" C "else return [typeof obj,obj];" C ";obj=" jsonStr)
return convertJScriptObjToAhks(SC.Eval("arrangeForAhkTraversing(obj)"))
}ConvertJScriptObjToAhks(JSObj){
if(JSObj[0]="Object"){
Obj:=[],Keys:=JSObj[1][0],Values:=JSObj[1][1]
while(A_Index<=Keys.length)
Obj[Keys[A_Index-1]]:=ConvertJScriptObjToAhks(Values[A_Index-1])
;*******************************************************
; 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
;************************************************************
IniRead, API_Token ,Auth.ini,API, Token
;~ Endpoint:="http://api.openweathermap.org/data/2.5/weather" ; Review https://duckduckgo.com/api for documentation
Endpoint:="http://api.openweathermap.org/data/2.5/forecast/daily" ; Review https://duckduckgo.com/api for documentation
;~ QueryString:=QueryString_Builder({"zip":"75019,us","APPID":API_Token})
;~ QueryString:=QueryString_Builder({"lat":"32.9915376","lon":"-96.9799073","APPID":API_Token})
d::
if (a_timesincepriorhotkey != -1 && a_timesincepriorhotkey<200)
cnt += 1
else if (a_timesincepriorhotkey > 400)
cnt := 0
if (cnt == 0)
var := "single click"
if (cnt == 1)
var := "double click"