Jump to content

Recommended Posts

Posted (edited)

The script was working fine until this happen:

"C:\Program Files (x86)\AutoIt3\Include\GuiRichEdit.au3" (862) : ==> Variable used without being declared.:
Local $hRichEdit = _WinAPI_CreateWindowEx($iExStyle, $__g_sRTFClassName, "", $iStyle, $iLeft, $iTop, $iWidth, $iHeight, $hWnd, $nCtrlID)
Local $hRichEdit = _WinAPI_CreateWindowEx($iExStyle, ^ ERROR

And please note that GUIRichEdit.au3 is not my script......

(I can't post my code here b/c I don't others who use my software can look at it)

EDIT:

I can PM the code to you if you want to look at it that badly

Edited by TheDcoder

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Posted

If it is not your script and you can't post it here, then you have limited options. The error occurs on line 862 because a variable should have been declared somewhere prior to reaching line 862. It could be on line 1342.

  • Moderators
Posted

TheDcoder,

That variable is declared within the RichEdit UDF when you run the _GUICtrlRichEdit_Create function, which in turn calls the __GCR_Init function to set a whole bunch of such variables. It is referenced in all of the public UDF functions - do you try calling a UDF function before actually creating a RuchEdit control? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

  On 3/5/2015 at 8:55 AM, Melba23 said:

do you try calling a UDF function before actually creating a RuchEdit control? :huh:

M23

How can I call the UDF? :huh:

Wild Guess:

#include <GuiRichEdit.au3>

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

  • Moderators
Posted

TheDcoder,

Looking in more detail at the RichEdit UDF I see that the line which gives you the error is immediately after the __GCR_Init function which should declare it - so my earlier suspicion was baseless. :wacko:

By all means PM me the code again so I can take a look inside. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...