• Become a Power user Intro to AutoHotkey Intermediate AutoHotkey Intermediate Objects GUIs are Easy w/AutoHotkey Painlessly switch from V1 to V2

AutoHotkey webinar: Connect to running scripts from Explorer Context Menu

Video Hour 1:  High Level: Connect to running scripts from Explorer Context Menu

  1. Context menus at work
    1. Quick Access Popup real life example
  2. Pieces of the puzzle (Here is a link to the below files)
    1. Receiver (script or compiled): Receiver.ahk
    2. Messenger (compiled): Messenger.exe
    3. Testing at command line: Test.bat
    4. Setup context menus: RegEdit import InstallContextMenus.reg
    5. Remove context menus: RemoveContextMenus.bat
    6. Questions

Video Hour 2: Coding and Q&A

Script Highlight: Random code generator.ahk by Maestrith (Author of AHK Studio)

  • Generate a list of random characters
  • Control what is in the unique list
  • How many unique “Keys” are generated
#SingleInstance,Force
Random:=[],Dup:=[],Items:=[]
for a,b in StrSplit("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") ;put whatever characters you want in here
	Random.Push(b) ;Add each character to Random Array
InputBox,Count,How Many Codes,How Many Codes do you want?
InputBox,Length,How Long For Each Code,How Long?
While(Items.MaxIndex()<Count){ ;Keep iterating until you have enough "keys"
	Out:=""  ;Clear out variable
	while(StrLen(Out)<Length){
		Random,Digit,0,% Random.MaxIndex() ;keep max lenght of random at right level
		Out.=Random[Digit] ;append the Random digit to out.
	}
	if(!Dup[Out])
		Items.Push(Out),Dup[Out]:=1 ;Add key to object
}
for a,b in Items ;Iterate over list
	Total.=b "`n" ;Add to total with new line

msgbox % Clipboard:=Total

AutoHotkey Web service API syntax writer- Automate writing your WinHTTP Requests with my syntax writer

AutoHotkey API syntax writer

In this video I walk through how to use my AutoHotkey API Syntax Writer.  If you’re new to APIs, be sure to check out our Webinar on API / Web Services or this page for a lot of examples of connecting to API services.

Please remember that, after launching the script, you’ll need to hold down the control key and left mouse-click to activate the menu options.AutoHotkey Merchandise-White Stress ball

Here is the video walking through how to use the tool.

 

Example Webservice / API call- 4 GoogleMaps API services

GoogleMaps API services

In the following video I work through connecting for four separate APIs which are all under GoogleMaps.  It is very easy to connect to them with AutoHotkey.  Simply get your own token and then adapt the below code to your needs!

If you’re new to API calls, be sure to get our API Syntax Writer

Video reviewing the four GoogleMaps APIs.

GoogleMaps Directions API

GoogleMaps GeoCode API

Example Webservice / API call- Connecting to Zoom & extracting info

For the the AutoHotkey Webinars we use Zoom which is a great, robust, inexpensive tool for hosting online meetings/webinars.  They have a free version which allows you to connect with people for up to 45 minutes!

Below I walk through the following code where I demonstrate how I extract information about users & their meetings.   This is a great example of how many vendors offer APIs to connect to their tools.

IniRead, API_Token ,Auth.ini,API, Token
IniRead, API_Key   ,Auth.ini,API, Key
IniRead, API_Secret,Auth.ini,API, Secret

;~  EndPoint:="https://api.zoom.us/v1/user/list" ;get list of users under your account
;~  EndPoint:="https://api.zoom.us/v1/meeting/list" ;get list of meetings for a given user
EndPoint:="https://api.zoom.us/v1/meeting/get" ;get specific meeting info
;~  QueryString:=QueryString_Builder({"api_key":API_Key,"api_secret":API_Secret,"data_type":"XML","host_id":"pPzEua3eSDerCD2WO3JbUg"})
QueryString:=QueryString_Builder({"api_key":API_Key,"api_secret":API_Secret,"data_type":"XML","id":"693773857","host_id":"pPzEua3eSDerCD2WO3JbUg"})

;********API call**********************
HTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1") ;Create COM Object
HTTP.Open("POST", EndPoint . QueryString) ;GET & POST are most frequent, Make sure you UPPERCASE
HTTP.Send() ;If POST request put data in "Payload" variable
Response_data:= HTTP.ResponseText ;Save the text that is returned
SciTE_Output(Response_data) ;Text,Clear=1,LineBreak=1,Exit=0

;***********query string builder******************* 
QueryString_Builder(kvp){
for key, value in kvp
  queryString.=((A_Index="1")?(url "?"):("&")) key "=" value
return queryString
}

Video walking through developing the Zoom API call