Advertisement
LogicDaemon

Load Gist.ahk

Mar 24th, 2021
1,478
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv
  2.  
  3. gistID := "65d5311f8634a835a1f69bc3961af975"
  4.  
  5. resp := {}
  6. If (!HTTPReq("GET", "https://api.github.com/gists/" . gistID,, rawresp, "Accept: application/vnd.github.v3+json"))
  7.     Throw Exception("Failed to download gist",, "gist ID: " gistID )
  8.  
  9. resp := JSON.Load(rawresp)
  10.  
  11. For fname, fattr in resp.files {
  12.     MsgBox % fattr.content
  13. }
  14.  
  15. return
  16.  
  17. #include <JSON>
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement