Try #Include

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Loop
Posts: 169
Joined: 07 Jan 2019, 14:51

Try #Include

Post by Loop » 18 Oct 2021, 10:02

Hello, is this possible?

Code: Select all

Try #Include, GDIP_All.ahk
Catch UrlDownloadToFile, https://github.com/Drugoy/Autohotkey-scripts-.ahk/blob/master/Libraries/Gdip_All.ahk, Gdip_All.ahk

If !pToken := Gdip_Startup()
{
	MsgBox, 48, gdiplus error!, Gdiplus failed to start. Please ensure you have gdiplus on your system
	ExitApp
}Else
MsgBox,64, Success, The connection was successful

Try to include library, if not, then download it from the Internet
Thanks

User avatar
mikeyww
Posts: 26891
Joined: 09 Sep 2014, 18:38

Re: Try #Include

Post by mikeyww » 18 Oct 2021, 10:08

You could run a separate script that first uses FileExist to see if the library is not there, downloading as needed. That script can then run this one.

Loop
Posts: 169
Joined: 07 Jan 2019, 14:51

Re: Try #Include

Post by Loop » 18 Oct 2021, 11:18

You are brilliant, you have always a solution ready!

Post Reply

Return to “Ask for Help (v1)”