Errors from Documentation

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Errors from Documentation

Re: Errors from Documentation

by Galaxis » 01 May 2018, 21:22

Swagfag,
Im using version 2. Thanks for that response! You solved my problem. I'll use version 1 instead. =)

Re: Errors from Documentation

by swagfag » 01 May 2018, 19:49

which ahk_h version are u using? there is no % to force expressions in v2

Errors from Documentation

by Galaxis » 01 May 2018, 19:07

I get errors, when pasting this code from the example documentation

Code: Select all

NewThread("Msgbox `% variable:=`"Thread`"")
Image

The following code from the documentation does not show a message in the Message box. I just want to get a general idea of how multithreading works. I just switched to AHK_H a few days ago, simply for its multithreading. But there are errors left and right, when I copy/paste examples from the documentation.

Code: Select all

Command  Example: NewThread "MsgBox Message from thread."   
Function Example: ThreadID := NewThread("MsgBox Message from thread.")

The message boxes are emtpy. No text

Code: Select all

ahkdll:=AhkThread("Msgbox `% variable:=`"Thread`"") ; Loads the AutoHotkey module and starts the script.
While !ahkdll.ahkgetvar.variable
  Sleep 50 ; wait until variable has been set.
MsgBox % ahkdll.ahkgetvar.variable ; Display content of variable in thread
ahkthread_free(ahkdll),ahkdll:="" ; Stop execution in thread and free resources.
Image

Any advice would be appreciated. Thanks!

Top