JohnBailey Posted July 31, 2007 Share Posted July 31, 2007 Is this the best method If Not $WM_NOTIFY Then Global Const $WM_NOTIFY = 0x004E If Not $WM_KEYDOWN Then Global Const $WM_KEYDOWN = 0x0100 If Not $NM_FIRST Global Const $NM_FIRST = 0 If Not $NM_CLICK Global Const $NM_CLICK = ($NM_FIRST - 2) If Not $NM_DBLCLK Global Const $NM_DBLCLK = ($NM_FIRST - 3) If Not $NM_RCLICK Global Const $NM_RCLICK = ($NM_FIRST - 5) If Not $NM_RDBLCLK Global Const $NM_RDBLCLK = ($NM_FIRST - 6) If Not $LVN_ENDLABELEDITA Global Const $LVN_ENDLABELEDITA = (-106) Of course, it gives a warning about not being defined, but this shouldn't cause problems. Correct? A decision is a powerful thing Link to comment Share on other sites More sharing options...
Developers Jos Posted July 31, 2007 Developers Share Posted July 31, 2007 Use IsDeclared() SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
JohnBailey Posted July 31, 2007 Author Share Posted July 31, 2007 Of course, it gives a warning about not being defined, but this shouldn't cause problems. Correct?Ok, it does cause problems. Is there an easy way to do this? A decision is a powerful thing Link to comment Share on other sites More sharing options...
JohnBailey Posted July 31, 2007 Author Share Posted July 31, 2007 OH!!! duh!!! Thank you I've never thought to use that, but I've seen it in the manual a hundred times. Gosh, thank you JdeB A decision is a powerful thing Link to comment Share on other sites More sharing options...
JohnBailey Posted July 31, 2007 Author Share Posted July 31, 2007 If Not IsDeclared ("WM_NOTIFY") Then Global Const $WM_NOTIFY = 0x004E If Not IsDeclared ("NM_FIRST") Then Global Const $NM_FIRST = 0 If Not IsDeclared ("NM_CLICK") Then Global Const $NM_CLICK = ($NM_FIRST - 2) If Not IsDeclared ("NM_DBLCLK") Then Global Const $NM_DBLCLK = ($NM_FIRST - 3) If Not IsDeclared ("WM_COMMAND") Then Global Const $WM_COMMAND = 0x0111 If Not IsDeclared ("EN_CHANGE") Then Global Const $EN_CHANGE = 0x300 If Not IsDeclared ("EN_SETFOCUS") Then Global Const $EN_SETFOCUS = 0x100 If Not IsDeclared ("EN_KILLFOCUS") Then Global Const $EN_KILLFOCUS = 0x200 If Not IsDeclared ("CBN_EDITCHANGE") Then Global Const $CBN_EDITCHANGE = 5 If Not IsDeclared ("CBN_SELCHANGE") Then Global Const $CBN_SELCHANGE = 1 If Not IsDeclared ("CBN_EDITUPDATE") Then Global Const $CBN_EDITUPDATE = 6 If Not IsDeclared ("CBN_KILLFOCUS") Then Global Const $CBN_KILLFOCUS = 4 If Not IsDeclared ("CBN_SETFOCUS") Then Global Const $CBN_SETFOCUS = 3 gives me \Auto-It files\Recon - Interface GUI.au3(40,34) : ERROR: $WM_NOTIFY previously declared as a 'Const' Global Const $WM_NOTIFY = 0x004E ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ \Auto-It files\Recon - Interface GUI.au3(42,63) : ERROR: $NM_FIRST previously declared as a 'Const' If Not IsDeclared ("NM_FIRST") Then Global Const $NM_FIRST = 0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ \Auto-It files\Recon - Interface GUI.au3(43,77) : ERROR: $NM_CLICK previously declared as a 'Const' If Not IsDeclared ("NM_CLICK") Then Global Const $NM_CLICK = ($NM_FIRST - 2) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ \Auto-It files\Recon - Interface GUI.au3(44,79) : ERROR: $NM_DBLCLK previously declared as a 'Const' If Not IsDeclared ("NM_DBLCLK") Then Global Const $NM_DBLCLK = ($NM_FIRST - 3) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ \Auto-It files\Recon - Interface GUI.au3(245,58) : ERROR: WM_Notify_Events() already defined. Func WM_Notify_Events($hWndGUI, $MsgID, $wParam, $lParam) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ \Auto-It files\Recon - Interface GUI.au3 - 5 error(s), 0 warning(s) A decision is a powerful thing Link to comment Share on other sites More sharing options...
Developers Jos Posted July 31, 2007 Developers Share Posted July 31, 2007 Look here for some more details on this : http://www.autoitscript.com/forum/index.ph...ost&p=75672 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
martin Posted July 31, 2007 Share Posted July 31, 2007 Look here for some more details on this : http://www.autoitscript.com/forum/index.ph...ost&p=75672I have previously tried the idea that Valik mentioned,If Not IsDeclared("WS_CLIPSIBLINGS") Then Assign("WS_CLIPSIBLINGS", 0x04000000, 2)but the problem with this is that you get complaints that $WS_CLIPSIBLINGS is not declared wherever it appears in the script. Admittedly you can choose to ignore the warnings, but it is a shortcoming I think. 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. Link to comment Share on other sites More sharing options...
JohnBailey Posted July 31, 2007 Author Share Posted July 31, 2007 I want to "obey proper syntax." I just don't understand why it's wrong. A decision is a powerful thing Link to comment Share on other sites More sharing options...
Developers Jos Posted July 31, 2007 Developers Share Posted July 31, 2007 I want to "obey proper syntax." I just don't understand why it's wrong.Well it isn't really wrong and it will work fine when you run it with AutoIt3..It is Au3Check that get totally confused by it and there is not much we can do there ... SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
JohnBailey Posted July 31, 2007 Author Share Posted July 31, 2007 oh, so the issue is that Au3Check believes it to be incorrect. When I compile it, the script will run just fine. I'll try it out. Thanks A decision is a powerful thing Link to comment Share on other sites More sharing options...
JohnBailey Posted August 17, 2007 Author Share Posted August 17, 2007 (edited) Ok, it does work when compiled (just had to fix the order of the includes). The 'Error' really isn't an error. I just wish I didn't get the error either How do you cool-kids do this? Edited August 17, 2007 by JohnBailey A decision is a powerful thing Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now