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

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.