From 324d5a177a95f8112da9a7616411fa67dba4b64a Mon Sep 17 00:00:00 2001 From: yuriy Date: Sun, 20 Aug 2023 00:48:05 -0400 Subject: [PATCH] code cleanup --- URLDownloadToVar.ahk | 55 -------------------------------------------- 1 file changed, 55 deletions(-) diff --git a/URLDownloadToVar.ahk b/URLDownloadToVar.ahk index 2c9cc4b..3871921 100644 --- a/URLDownloadToVar.ahk +++ b/URLDownloadToVar.ahk @@ -1,58 +1,3 @@ -;---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)