BUG?msgbox(func()) is ok, msgbox(res := func()) changed

Get help for the alpha version of AutoHotkey v2 here. Please state the v2 version you are working with in the title when making a new topic.
User avatar
hyaray
Posts: 32
Joined: 20 Jun 2015, 01:37

BUG?msgbox(func()) is ok, msgbox(res := func()) changed

05 Feb 2020, 12:04

RemoteTreeView_v2.ahk
(43.78 KiB) Downloaded 63 times

Code: Select all

msgbox(MyTV.GetText(hItem)) ;✓
msgbox(txt := MyTV.GetText(hItem)) ;╳
I use class RemoteTreeView to get items in SysTreeView321,
set value to var, the value changed, this puzzled me a lot :headwall: :headwall:
I use v2 a102,
attachments is gif and ahk scripts(hotkey is F9), uses code of 280 line value changed.
Thanks very much for help!!
Attachments
1.gif
1.gif (319.88 KiB) Viewed 2189 times
_3D_
Posts: 277
Joined: 29 Jan 2014, 14:40

Re: BUG?msgbox(func()) is ok, msgbox(res := func()) changed

06 Feb 2020, 06:30

Try this:

Code: Select all

mytv() => 'value'
MsgBox(mytv())
MsgBox(x:= mytv())
If problem still persist so it is BUG. Else ...
It is 1000 lines code try to isolate just this part that you use and make tests.

EDIT:
I looked text and "houses" in video - probably somewhere in code is missing buffer clear or low buffer size - so new text placed incorrect.
AHKv2.0 alpha forever.
User avatar
hyaray
Posts: 32
Joined: 20 Jun 2015, 01:37

Re: BUG?msgbox(func()) is ok, msgbox(res := func()) changed

07 Feb 2020, 00:09

Thanks very much!
maybe the buffer error? But I still don't know how to deal this.
My own code only 30 lines(start with F9::)
v2 has few users, will this problem be solved :wtf: :wtf:
just me
Posts: 7166
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: BUG?msgbox(func()) is ok, msgbox(res := func()) changed

07 Feb 2020, 07:02

v2 is alpha, so you should try the latest version before 'reporting' bugs (though you'll find that your script will not run any more).
User avatar
aseiot
Posts: 60
Joined: 05 Mar 2017, 04:25

Re: BUG?msgbox(func()) is ok, msgbox(res := func()) changed

07 Feb 2020, 22:20

Try to change the code in RemoteTreeView.GetText() method at line 625 from

Code: Select all

return txt
to

Code: Select all

return StrGet(&txt)

Return to “AutoHotkey v2 Help”

Who is online

Users browsing this forum: Google [Bot] and 9 guests