Skip to content

Instantly share code, notes, and snippets.

@JoeGlines
JoeGlines / Working_Voice_Recognition2.ahk
Created December 5, 2020 18:52
Voice Recognition with AutoHotkey
;~ https://www.autohotkey.com/boards/viewtopic.php?t=35737 by scriptor2016 ; For voice recognition to work you need Microsoft SAPI installed in your PC, some versions of Windows don't support voice recognition though.
; You may also need to train voice recognition in Windows so that it will understand your voice.
#Persistent
#SingleInstance, Force
global pspeaker := ComObjCreate("SAPI.SpVoice") ;plistener := ComObjCreate("SAPI.SpSharedRecognizer")
plistener:= ComObjCreate("SAPI.SpInprocRecognizer") ; For not showing Windows Voice Recognition widget.
paudioinputs := plistener.GetAudioInputs() ; For not showing Windows Voice Recognition widget.
plistener.AudioInput := paudioinputs.Item(0) ; For not showing Windows Voice Recognition widget.
ObjRelease(paudioinputs) ; Release object from memory, it is not needed anymore.
global responses:={"run Notepad":"RunNotepad"
,"Turn volume down":"TurnVolumeDown"
,"Turn volume up":"TurnVolumeUp"
,"Turn Screen Off":"TurnScreenOff"
,"Turn Screen On":"TurnscreenOn"
,"Launch the Automator":"lta"}
;~ https://www.autohotkey.com/boards/viewtopic.php?t=35737 by scriptor2016 ; For voice recognition to work you need Microsoft SAPI installed in your PC, some versions of Windows don't support voice recognition though.
; You may also need to train voice recognition in Windows so that it will understand your voice.
#Persistent
#SingleInstance, Force
global pspeaker := ComObjCreate("SAPI.SpVoice") ;plistener := ComObjCreate("SAPI.SpSharedRecognizer")
plistener:= ComObjCreate("SAPI.SpInprocRecognizer") ; For not showing Windows Voice Recognition widget.
paudioinputs := plistener.GetAudioInputs() ; For not showing Windows Voice Recognition widget.
plistener.AudioInput := paudioinputs.Item(0) ; For not showing Windows Voice Recognition widget.
ObjRelease(paudioinputs) ; Release object from memory, it is not needed anymore.
;*******************************************************
; 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
SetBatchLines -1
SetWorkingDir %A_ScriptDir%
;~ Menu, tray, icon, B:\Progs\AutoHotkey_L\Icons\Progs\pdf.ico
@JoeGlines
JoeGlines / Writing names with gdi.ahk
Last active April 26, 2021 15:42
Jackie Sztuk script fof performing drawing
;*******************************************************
; 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
;*******************************************************
; gdi+ ahk tutorial 8 written by tic (Tariq Porter)
; Requires Gdip.ahk either in your Lib folder as standard library or using #Include
;
; Tutorial to write text onto a gui
#SingleInstance, Force
@JoeGlines
JoeGlines / Open SciTE Multiple times.ahk
Last active April 26, 2021 15:41
Add this to your user.Properties SciTE file
#*******************************************************
# 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
#*******************************************************
#**********************open SciTE multiple times*********************************
#**************Open current file in new ********************************
command.name.17.*=Open in New Window
command.mode.17.*=subsystem:2
command.shortcut.17.*=Ctrl+Shift+N
command.17.*="$(SciteDefaultHome)\SciTE.exe" -check.if.already.open=0 -save.session=0 "$(FilePath)"
;*******************************************************
; 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
;**************************************
Endpoint:="https://craft.co/proxy/dodo/query" ;this probably won't change but I prefer having it in a variable
data:=API_Call(Endpoint,"Nestle") ;Call function, lookup Nestle and return data in an AutoHotkey object which you can pick/choose what you want
m(data)
@JoeGlines
JoeGlines / Adjust Volume with Mouse.ahk
Last active April 26, 2021 15:41
Works when mouse is over Taskbar
;*******************************************************
; 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
;*******************************************************
;*******adjust volume by scrolling while mouse is over taskbar*********************************
;#If MouseIsOver("ahk_class Shell_TrayWnd") ; http://www.autohotkey.net/~Lexikos/AutoHotkey_L/docs/commands/_If.htm
#If MouseIsOver("ahk_class Shell_TrayWnd") or MouseIsOver("ahk_class Shell_SecondaryTrayWnd ;To use over taskbars on other monitors
WheelUp::Send {Volume_Up} ;Increase volume when over taskbar
WheelDown::Send {Volume_Down} ;Decrease volumen when over taskbar
#If
;*******************************************************
; 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 ;Limit one running version of this script
Endpoint:="https://www.bitstamp.net/api/transactions/"
;******************************
HTTP := ComObjCreate("WinHttp.WinHttpRequest.5.1") ;Create COM Object
HTTP.Open("GET", Endpoint QS) ;GET & POST are most frequent, Make sure you UPPERCASE