You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.7 KiB
Plaintext
61 lines
1.7 KiB
Plaintext
1 year ago
|
;---ENVIRONMENT---------------------------------------------------------------------
|
||
|
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
|
||
|
;#Warn ; Enable warnings to assist with detecting common errors.
|
||
|
;DetectHiddenWindows, On
|
||
|
#SingleInstance, Force
|
||
|
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
|
||
|
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
|
||
|
;SetKeyDelay, 500
|
||
|
CoordMode, ToolTip, Screen
|
||
|
CoordMode, Mouse, Screen
|
||
|
;#NoTrayIcon
|
||
|
;Menu, Tray, Icon, ..\Icons\ICONNAMEHERE
|
||
|
|
||
|
;---Notes/Extra Info/#Includes------------------------------------------------------
|
||
|
|
||
|
|
||
|
;---VARIABLES-----------------------------------------------------------------------
|
||
|
|
||
|
|
||
|
;---MAIN SCRIPT---------------------------------------------------------------------
|
||
|
/*
|
||
|
; Example Code:
|
||
|
#include URLDownloadToVar.ahk
|
||
|
URL = https://www.bitchute.com/video/WdxitRyWLZQ/
|
||
|
URLContents := URLDownloadToVar(URL)
|
||
|
TextFileName := yyyy . MM . dd . "_URLToVarDownload"
|
||
|
FileAppend, URLContents, %A_ScriptDir%/%TextFileName%.txt
|
||
|
run, %A_ScriptDir%/%TextFileName%.txt
|
||
|
|
||
|
*/
|
||
|
|
||
|
/*
|
||
|
; Example 2
|
||
|
#SingleInstance,Force
|
||
|
url=https://api.coindesk.com/v1/bpi/currentprice.json ; Plce URL here
|
||
|
Gui,Add,Edit,w800 h500,% URLDownloadToVar(url)
|
||
|
Gui,show,
|
||
|
return
|
||
|
|
||
|
*/
|
||
|
|
||
|
; Example 2
|
||
|
/*#SingleInstance,Force
|
||
|
url=https://fdrpodcasts.com/api/?method=QueryPodcasts&keyword=4500 ; Plce URL here
|
||
|
url := URLDownloadToVar(url)
|
||
|
url := StrReplace(URL, "\/", "/")
|
||
|
|
||
|
Msgbox % "url: " url
|
||
|
|
||
|
Gui,Add,Edit,w800 h500,% URLDownloadToVar(url)
|
||
|
Gui,show,
|
||
|
return
|
||
|
|
||
|
*/
|
||
|
|
||
|
URLDownloadToVar(url){
|
||
|
hObject:=ComObjCreate("WinHttp.WinHttpRequest.5.1")
|
||
|
hObject.Open("GET",url)
|
||
|
hObject.Send()
|
||
|
return hObject.ResponseText
|
||
|
}
|