Page 1 of 1

Getting json from API on a thread.

Posted: 04 May 2021, 07:32
by murataygun
My script got bigger and bigger. Running timers to check windows, popups etc. Also I check an API for user settings, global variables. I want to check the API on a differend thread but have some problems;

- my script is too long for continuation section. Because it hast http functions.
- cant escape characters like " or %

... and i cant find any tutorial about how use complicated scripts on threads. All i find is showing message boxes and hearing helloes from other threads.

I thing we need some serious tutorials about this beautiful addon.

Re: Getting json from API on a thread.

Posted: 08 May 2021, 10:36
by swagfag
murataygun wrote:
04 May 2021, 07:32
- my script is too long for continuation section.
then use several continuation sections(or use v2 which has infiniteprobably-long-enough continuation sections when/if _H ever catches up to it)
Because it hast http functions.
then put them in a library file and #Include it(but u dont even have to do that - see point above)
- cant escape characters like " or %
literally no idea what ure talking about here. why not? why wouldnt u be able to escape characters?
cant find any tutorial about how use complicated scripts on threads. All i find is showing message boxes and hearing helloes from other threads.
if uve seen the msgbox, uve seen escaping. if u understand escaping in regular ahk and regular scripts, u understand it in _H as well. u dont need a 10-mile long tutorial to teach u that. just apply the same known rules to whatever escape depth ure currently working on.

Re: Getting json from API on a thread.

Posted: 09 May 2021, 14:24
by HotKeyIt
Try using CreateScript