Jump to content

file menu customized problem


Recommended Posts

hi guy  i have a script   with   custom menu 

this is a  script 

; Script Start - Add your code below here
#include <AutoItConstants.au3>
#include <GUIConstants.au3>
#include <ComboConstants.au3>
#include <EditConstants.au3>
#include <GuiStatusBar.au3>
#include <WindowsConstants.au3>
#include <WinAPIRes.au3>
#include <GuiListView.au3>
#include <File.au3>
#include <GuiToolbar.au3>
#Include <GUIImageList.au3>
#Include <StaticConstants.au3>
#Include <ToolbarConstants.au3>
#include <WinAPIShellEx.au3>

;Local $hTimer = TimerInit()
;#include "ModernMenu.au3"
;#include "E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3" ; Only unknown constants are declared here
#include "include\ModernMenuRaw.au3" ; Only unknown constants are declared here
;#include "E:\_GESTIONALE_NEW\include\menu.au3" ; include i menu
#include "include\menu.au3" ; include i menu
#include "include\ADO.au3" ;  include function for adodb
#include "include\DB.au3" ;  include function di aggancio del db + futuribile new sql language
#include "include\Language.au3" ;  include language
#include "include\Variabili.au3" ;  include variabili globali
#include "include\distructor_gui.au3" ;  include distruttore degli elementi sopra la gui
#include "include\GUI_Configure.au3" ;  include logica della gui configure


#NoTrayIcon

Opt("GuiOnEventMode", 1)
Opt("GUICloseOnESC", 0)
Opt("GUIResizeMode", 128)
;Global $Lang[10]



_SelectLanguage_menu() ;  select language file menu
_SelectLanguage_GUI() ; select language gui
_Gui()


Func _Gui()


    $hMainGUI = GUICreate("GesT", 1692, 808, 192, 114, BitOR($GUI_SS_DEFAULT_GUI, $WS_SYSMENU, $WS_SIZEBOX, $WS_THICKFRAME))

    _Menu() ; menu fico

    ;$Group1 = GUICtrlCreateGroup("Configurazione Azienda e Documenti", 2, 12, 1686, 773)
    ;$Group1 = GUICtrlCreateGroup("Configurazione Azienda e Documenti", 0, 12, 1692, 757)
    Local $aParts[3] = [113, 150, -1]
    $StatusBar1 = _GUICtrlStatusBar_Create($hMainGUI)
    _GUICtrlStatusBar_SetParts($StatusBar1, $aParts)
    _GUICtrlStatusBar_SetText($StatusBar1, "Offline DB")
    ;_GUICtrlStatusBar_SetText($StatusBar1, "Part 2", 1)
    _GUICtrlStatusBar_SetIcon($StatusBar1, 0, _WinAPI_ExtractIcon($DLL_LOCATE, 80))

    GUISetState(@SW_SHOW)
    GUIRegisterMsg($WM_SIZE, "WM_SIZE")

    GUISetOnEvent($GUI_EVENT_CLOSE, "_close")
    GUICtrlSetOnEvent($ExitItem, "_close")
    GUICtrlSetOnEvent($Dead, "_dead") ; il morto del mese
    ;Tools
    GUICtrlSetOnEvent($CalcItem, "_calc") ; calcolatrice
    GUICtrlSetOnEvent($scan2pdf, "_scan2pdf") ; scan 2 pdf
    GUICtrlSetOnEvent($codfisc, "_codfi") ; codice fiscale
    ;Cartelle
    GUICtrlSetOnEvent($Folder_invoice, "_folder_invoice") ; fattura di vendita
    GUICtrlSetOnEvent($Folder_invoice_buy, "_folder_invoice_buy") ; fattura di acquisto
    GUICtrlSetOnEvent($Folder_bank, "_folder_bank") ; scansione banca
    GUICtrlSetOnEvent($Fodler_quote, "_folder_quote") ; preventivi
    GUICtrlSetOnEvent($Folder_DDT, "_folder_ddt") ; ddt
    GUICtrlSetOnEvent($Fodler_Equitalia, "_folder_equitalia") ; equitalia
    GUICtrlSetOnEvent($Fodler_inps, "_folder_inps") ; inps
    GUICtrlSetOnEvent($Fodler_lago, "_folder_lago") ; commercialista
    GUICtrlSetOnEvent($Fodler_REport, "_folder_report") ; report
    ;configurazione
    GUICtrlSetOnEvent($config_menu, "_config_azienda") ; report
    ;anagrafica clienti
    GUICtrlSetOnEvent($Anagraf_menu, "_Anagrafica_Clienti") ; anagrafica clienti
    ;magazino
    GUICtrlSetOnEvent($MagazinoItem, "_magazzino") ; magazzino  prodotti reali
    _ConnectDB_gest()

    ;Local $fDiff = TimerDiff($hTimer)
    ;MsgBox($MB_SYSTEMMODAL, "Time Difference", $fDiff)
EndFunc   ;==>_Gui

Func _close()

    Exit

EndFunc   ;==>_close

;===============================================================

;Keep the GUI alive

;===============================================================

While 1

    Sleep(1000)

WEnd

and  this is  a   1/2 udf  for  menu   (name: menu.au3)

i attached 

 

and  this is a 2/2 udf for menu (and  debugger od  scite block me  in this  udf) (name: ModernMenuRaw.au3 )

i attached 

this  is  a error  code: 

 

 

"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(92,72) : error: $NIM_ADD previously declared as a 'Const'.
If Not IsDeclared("NIM_ADD")                Then Global Const $NIM_ADD = 0x00000000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(93,78) : error: $NIM_MODIFY previously declared as a 'Const'.
If Not IsDeclared("NIM_MODIFY")                Then Global Const $NIM_MODIFY = 0x00000001
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(94,78) : error: $NIM_DELETE previously declared as a 'Const'.
If Not IsDeclared("NIM_DELETE")                Then Global Const $NIM_DELETE = 0x00000002
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(95,81) : error: $NIM_SETFOCUS previously declared as a 'Const'.
If Not IsDeclared("NIM_SETFOCUS")            Then Global Const $NIM_SETFOCUS = 0x00000003
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(96,85) : error: $NIM_SETVERSION previously declared as a 'Const'.
If Not IsDeclared("NIM_SETVERSION")            Then Global Const $NIM_SETVERSION = 0x00000004
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(98,79) : error: $NIF_MESSAGE previously declared as a 'Const'.
If Not IsDeclared("NIF_MESSAGE")            Then Global Const $NIF_MESSAGE = 0x00000001
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(99,74) : error: $NIF_ICON previously declared as a 'Const'.
If Not IsDeclared("NIF_ICON")                Then Global Const $NIF_ICON = 0x00000002
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(100,72) : error: $NIF_TIP previously declared as a 'Const'.
If Not IsDeclared("NIF_TIP")                Then Global Const $NIF_TIP = 0x00000004
~~~~~~~~~~~~~~~~~~~~~~~~~~~~                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(101,76) : error: $NIF_STATE previously declared as a 'Const'.
If Not IsDeclared("NIF_STATE")                Then Global Const $NIF_STATE = 0x00000008
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(102,74) : error: $NIF_INFO previously declared as a 'Const'.
If Not IsDeclared("NIF_INFO")                Then Global Const $NIF_INFO = 0x00000010
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(103,81) : error: $NIF_REALTIME previously declared as a 'Const'.
If Not IsDeclared("NIF_REALTIME")            Then Global Const $NIF_REALTIME = 0x00000040
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(104,79) : error: $NIF_SHOWTIP previously declared as a 'Const'.
If Not IsDeclared("NIF_SHOWTIP")            Then Global Const $NIF_SHOWTIP = 0x00000080
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(106,78) : error: $NIS_HIDDEN previously declared as a 'Const'.
If Not IsDeclared("NIS_HIDDEN")                Then Global Const $NIS_HIDDEN = 0x00000001
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(107,85) : error: $NIS_SHAREDICON previously declared as a 'Const'.
If Not IsDeclared("NIS_SHAREDICON")            Then Global Const $NIS_SHAREDICON = 0x00000002
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(109,76) : error: $NIIF_NONE previously declared as a 'Const'.
If Not IsDeclared("NIIF_NONE")                Then Global Const $NIIF_NONE = 0x00000000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(110,76) : error: $NIIF_INFO previously declared as a 'Const'.
If Not IsDeclared("NIIF_INFO")                Then Global Const $NIIF_INFO = 0x00000001
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(111,81) : error: $NIIF_WARNING previously declared as a 'Const'.
If Not IsDeclared("NIIF_WARNING")            Then Global Const $NIIF_WARNING = 0x00000002
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(112,78) : error: $NIIF_ERROR previously declared as a 'Const'.
If Not IsDeclared("NIIF_ERROR")                Then Global Const $NIIF_ERROR = 0x00000003
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(113,76) : error: $NIIF_USER previously declared as a 'Const'.
If Not IsDeclared("NIIF_USER")                Then Global Const $NIIF_USER = 0x00000004
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(114,85) : error: $NIIF_ICON_MASK previously declared as a 'Const'.
If Not IsDeclared("NIIF_ICON_MASK")            Then Global Const $NIIF_ICON_MASK = 0x0000000F
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(115,81) : error: $NIIF_NOSOUND previously declared as a 'Const'.
If Not IsDeclared("NIIF_NOSOUND")            Then Global Const $NIIF_NOSOUND = 0x00000010
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"E:\_GESTIONALE_NEW\include\ModernMenuRaw.au3"(116,86) : error: $NIIF_LARGE_ICON previously declared as a 'Const'.
If Not IsDeclared("NIIF_LARGE_ICON")        Then Global Const $NIIF_LARGE_ICON = 0x00000020
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
E:\_GESTIONALE_NEW\GEST_NEW.au3 - 22 error(s), 0 warning(s)

menu.au3

ModernMenuRaw.au3

Edited by faustf
Link to comment
Share on other sites

It's telling you you're trying to redeclare a constant, which isn't allowed. In this case it doesn't read the line as an IF statement, AU3Check just sees the redeclaration.

In this script that entire section is not needed, you included the INCLUDE files with those constants in it, so of course they're going to be declared already. You're making a pointless addition to your script which is causing you these errors.

 

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...