从URL调用ahk脚本(github gist) [英] Call ahk script from url (github gist)

查看:97
本文介绍了从URL调用ahk脚本(github gist)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从https调用/加载ahk脚本.像这一个.我想将此文件保留在github上进行公开编辑,并且可以从多个用户处调用它,而无需先下载它..

Is there a way to call/load an ahk script from https. Like this one. I'd like to keep this file for public editing on github and it would be called from multiple users without the need to download it first..

推荐答案

如何下​​载:

UrlDownloadToFile, https://gist.github.com/gimoya/5821469/raw/034b2766bbcbe70e2a8e93b72d1ec8723351a8f8/Veg%C3%96K-Abk%C3%BCrzungen, hotstrings.ahk
if(ErrorLevel || !FileExist("hotstrings.ahk") ) {
    msgbox, Download failed!
    ExitApp
}
Run, hotstrings.ahk

您可能想为下载的文件添加一些检查例程,以确保该文件在语法上正确无误,并且大多数情况下无害.也就是说,您不能相信来自互联网的任何信息.解决此问题的一种更安全的方法是将您的热字符串检索为XML或JSON,并自行动态构建它们.盲目执行下载的代码会带来很大的风险,尤其是当多个用户可以随意对其进行编辑时.

You may want to add some check routines for the downloaded file to make sure, that it's syntactically correct and most of all not harmful. That is, you can't trust anything coming from the internet. A more secure way to apporach this would be to retrieve your hotstrings as XML or JSON and build them dynamically on your own; blindly executing downloaded code is very risky, especially when multiple users are able to edit it arbitrarily.

这篇关于从URL调用ahk脚本(github gist)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆