Good morning/afternoon/evening/night Everyone!
I am working on a program that does a series of things:
We use AS400 Emulators at my work, and this program will interface with multiple windows to accomplish tasks.
I have already succeeded in creating a "PerUser" login info save in the registry and a customer database that varies per user.
However, on my main GUI which I call the "Widget_Window()" I want it to build buttons based on only the customers that exist in the database, and not blank entries. I have succeeded in accomplishing this, however, When I close the GUI to the Customer Data Entry, and I switch back to the Main Widget_Window, I run into a series of errors depending on how I try to takle this obsticle.
A) I have tried GuiDelete($mainwin) then CALL("Widget_Window")
This tends to lock up the entire process, not even closing the Customer Data window. I then have to Ctrl+Break to get out of this problem, with no errors generated.
I have tried Putting a refresh function call in the While loop of the main GUI, but that flickers all of the buttons... (not what I want.)
C) I have tried to write a refresh function that I can execute when I exit the Customer Data GUI, but it locks everything up as well.
I wrote something like this:
This is called from a loop that is SetOnEvent, MustDeclareVars....
Assume all Variables are pre-defined (They are - not getting errors of that nature)
Func REFRESHMAIN()
$TEMPGUIREFRESH = GuiCreate("TEMP",10,10)
GuiSetState(@SW_SHOW) ; At this point, AutoIt deaults focus to this new GUI
GuiDelete($mainwin)
Call("Widget_Window")
GuiSwitch($mainwin)
GuiDelete($TEMPGUIREFRESH)
EndFunc
Now, according to my thought processes, I create a gui, switch to it, delete the old gui, call the old gui back which refreshes it, then switch to it, and delete the temporary GUI.
At this point, everything looks great until I try to click anything, or even try to exit. IT DOES NOTHING.
The button creation works great, but then thats all she wrote. Gui refreshed but stuck on stupid.
Any ideas??