"+Resize" option is deleted?

Ask for help, how to use AHK_H, etc.
arcticir
Posts: 694
Joined: 17 Nov 2013, 11:32

"+Resize" option is deleted?

22 Jan 2018, 07:42

I didn't find anything updated about this command.
But the error message indicates that it was deleted.

Code: Select all

Error:  Invalid option.

Specifically: Resize


	497: g := GuiCreate()
	498: LoadLibrary("MsFtEdit.dll")
--->	499: g.Add("Custom", "ClassRICHEDIT50W +Resize" )


Other errors:
Come from WINAPI, oddly, they are not always wrong. I don't know what triggered the error.
Error: Parameter #2 of SetWindowText must be a variable.

SetWindowText(A_ScriptHwnd,"[" (A_name:="last_@r") "]")

Code: Select all

Error:  Parameter #2 of WaitForSingleObject must be a variable.
565: WaitForSingleObject(f.4, f.3=1?1000:0xFFFFFFFF)

Code: Select all

Error:  Parameter #2 of SendMessage_ must be a variable.
SendMessage_(hwnd,0x4a,1,(&r))
HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: "+Resize" option is deleted?

22 Jan 2018, 18:57

Can you post a simple script that generates that error, calling the line only does not seem to cause the error.
arcticir
Posts: 694
Joined: 17 Nov 2013, 11:32

Re: "+Resize" option is deleted?

24 Jan 2018, 02:08

Sorry, I can't extract a simple example.
I can't even reproduce it easily.

But it does exist:

Code: Select all

Error in #include file "acc.ahk":
     Parameter #2 of GetStateText must be a variable.

	Line#
	193: }
	194: {
	195: Try
	195: Return (GetRoleText(Acc.accRole(ChildId), sRole, 1+VarSetCapacity(sRole,1+2*GetRoleText(nRole, 0, 0))),sRole)
	196: }
	197: {
	198: Try
--->	198: Return (GetStateText(Acc.accState(ChildId), sState, 1 + VarSetCapacity(sState,1+2*GetStateText(nState,0,0))),sState)
	199: }
	202: {
	203: nSize := DllCall("oleacc\GetStateText", "Uint", nState, "Ptr", 0, "Uint", 0)
	204: VarSetCapacity(sState, (A_IsUnicode?2:1)*nSize)
	205: DllCall("oleacc\GetStateText", "Uint", nState, "str", sState, "Uint", nSize+1)
	206: Return sState
	207: }

The program will exit.
guest3456
Posts: 3462
Joined: 09 Oct 2013, 10:31

Re: "+Resize" option is deleted?

24 Jan 2018, 11:59

This new error that reads "must be a variable" I believe was introduced in v2-084 because of this addition:
lexikos wrote: Added load-time validation of output vars of built-in functions()

v2 changelog:
https://autohotkey.com/boards/viewtopic ... 10#p195810

git source line reference:
https://github.com/Lexikos/AutoHotkey_L ... 759bbR8732


for example:

Code: Select all

; NewStr := RegExReplace("hi world", "^hi", "hello", "", -1, 1)        ; used to work in v2-a083
  NewStr := RegExReplace("hi world", "^hi", "hello",   , -1, 1)        ; in a084 you can't use empty string there
  MsgBox(NewStr)

HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: "+Resize" option is deleted?

25 Jan 2018, 00:53

This should be fixed (thanks guest3456), can you confirm if it is working fine now?

Return to “Ask for Help”

Who is online

Users browsing this forum: No registered users and 14 guests