Sign in to follow this  
Followers 0
Fullerene

Error with $WS_POPUP

9 posts in this topic

I have a novice question.

When using KODA editor, it generated the following code:

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=

$Form1 = GUICreate("Form1", 542, 319, 209, 110, $WS_POPUP, 0)

$no = GUICtrlCreateEdit("", 56, 16, 433, 241)

GUICtrlSetData(-1, "no")

GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $Form1

EndSwitch

WEnd

I tried to run this piece of code but experience an error:

Posted Image

How can one fix the problem? Should any one file except <GUIConstants.au3> be included?

Thanks.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You need to include WindowsConstants.au3 for that constant. A nice trick which is visibly available when you compile your script is to let AutoIt to automatically include that files by examine any not defined constant or variable. You can of-course just add it at the header and run Ctrl+F5 or just F5:

#AutoIt3Wrapper_Add_Constants=y
Edited by Authenticity

Share this post


Link to post
Share on other sites

You need to include WindowsConstants.au3 for that constant. A nice trick which is visibly available when you compile your script is to let AutoIt to automatically include that files by examine any not defined constant or variable. You can of-course just add it at the header and run Ctrl+F5 or just F5:

Thanks. The header works fine.

I also tried to add

#AutoIt3Wrapper_Add_Constants=y

to the script but it gives the same error after compilation. Please let me know where I'm wrong here.

Share this post


Link to post
Share on other sites

I think you need to update your versions of Koda and SciTE.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Thanks. The header works fine.

I also tried to add

#AutoIt3Wrapper_Add_Constants=y

to the script but it gives the same error after compilation. Please let me know where I'm wrong here.

You need to have the full SciTE4AutoIt3 version installed for this to work.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

You need to have the full SciTE4AutoIt3 version installed for this to work.

Jos

Thanks, now everything is pretty clear.

Share this post


Link to post
Share on other sites

I think you need to update your versions of Koda and SciTE.

I currently use KODA of version 1.7.0.1. Do you mean it's better to switch to the

Latest beta version (from 2008-10-03)

?

I will try.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I currently use KODA of version 1.7.0.1. Do you mean it's better to switch to the

?

I will try.

Don't hesitate and use latest Beta version, currently it's version 1.7.2.1

links to latest Koda:

http://www.autoitscript.com/forum/index.php?showtopic=32299

http://koda.darkhost.ru/page.php?id=download

http://koda.darkhost.ru/page.php?id=history

Edited by Zedna

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0