faustf Posted July 30, 2012 Share Posted July 30, 2012 hi guy this is a program i attach it , when try to read input box give me only 0 why? ? ?sandro-gest.au3 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted July 30, 2012 Moderators Share Posted July 30, 2012 Why are you opening a second thread on this when you already have one going? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 30, 2012 Moderators Share Posted July 30, 2012 faustf, I have deleted your other thread which consisted of a triple post, a failed attachment and final successful attachment. Were you having a bad day at the office? M23 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: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
BrewManNH Posted July 30, 2012 Share Posted July 30, 2012 Not sure what the issue is, but I can see 2 glaring errors in this script right away. You have put 2 #include lines in the middle of the script, and depending upon what's in those include files, this is going to cause all sorts of problems. One of which is that you're using GUICtrlSetOnEvent right after the first misplaced include (Studio_Addons.au3) and if that file has any control in it, that -1 is going to refer to a control in that file and not in the main file. 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 GudeHow 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 More sharing options...
Moderators Melba23 Posted July 30, 2012 Moderators Share Posted July 30, 2012 faustf,The reason you get 0 is because you do not declare the variables containing the ControlIDs of your inputs as Global until after you try to read them. So AutoIt creates the variables in the Local scope within the functions and the _insert_anagrafica function cannot see the variables declared in the _anagraficaclienti function. The solution is to declare all your Global variables at the top of the script rather than scattered throughout - then they are Global throughout. I see you also put some #include files in the middle of your script - again these should be at the top as the code within them might well conflict with other sections if you place them elsewhere. All clear? M23 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: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
faustf Posted July 31, 2012 Author Share Posted July 31, 2012 i dont understund , because i declare at a top all variable like global Global $c,$var Global $dittaAC,$viaAC,$cittaAC,$provinciaAC,$mailAC,$cellAC,$pivaAC,$cdifiAC,$tellAC,$faxAC,$capAC,$ditta2AC,$via2AC,$citta2AC,$provincia2AC,$mail2AC,$cell2AC,$piva2AC Global $cdfis2AC,$tell2AC,$fax2AC,$cap2AC,$ibanAC,$swiftAC,$bancaAC Global $nome_op,$via_op,$citta_op,$provincia_op,$mail_op,$cell_op,$piva_op,$cdfi_op,$tell_op,$fax_op,$cap_op,$nome_leg,$via_leg,$citta_leg,$prov_leg,$mail_leg,$cell_leg Global $piva_leg,$cdfi_leg,$tell_leg,$fax_leg,$cap_leg,$iban,$swift,$banca,$file_xls,$riga and after in funcution _anagraficaclienti() create inputbox and after in Func _insert_anagrafica() read input box Link to comment Share on other sites More sharing options...
faustf Posted July 31, 2012 Author Share Posted July 31, 2012 ok i put all at finish include and go all but i think is so strange 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