Sign in to follow this  
Followers 0
faustf

help about GUICtrlRead :(

7 posts in this topic

hi guy

this is a program i attach it , when try to read input box give me only 0 why? ? ?

sandro-gest.au3

Share this post


Link to post
Share on other sites



Why are you opening a second thread on this when you already have one going?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

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? :D

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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 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

Share this post


Link to post
Share on other sites

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._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

ok i put all at finish include and go all but i think is so strange :D

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