suthers Posted September 4, 2009 Share Posted September 4, 2009 Hi All, I have a complex GUI app that uses its GUIs in OnEvent mode to ensure they stay responsive while the script works behind the scenes. All has been fine up till 3.3.0.0. I re-wrote the InetGet() sections of the script to use the new InetGet() function in 3.3.1.1beta, and now the GUI becomes totally unresponsive during background downloading. Parts of it are not repainted, and clicking on the menus causes WinXP to report the application is not responding. After much fustration I have had to go back to 3.3.0.0 and the old InetGet() function. Here's examples of the sections that do the background downloads. This, under 3.3.0.0, works fine. GUI's stay responsive. InetGet($GraphGoldLive, $GraphGoldLiveFileAndPath, 1, 1) ; Gold Live Do Sleep(300) Until @InetGetActive = 0 ; Wait till download is complete. If @InetGetBytesRead = -1 Then $CheckGraphsLive = 0; track failure Else $CheckGraphsLive = 1; track success EndIf This, under 3.3.1.1beta, doesn't work. GUI's stop responding. $INetGetHandle = InetGet($GraphGoldLive, $GraphGoldLiveFileAndPath, 1, 1) Do Sleep(250) Until InetGetInfo($INetGetHandle, 2) ; Wait till download is complete. If InetGetInfo($INetGetHandle, 3) Then $CheckGraphsLive = 1; track success Else $CheckGraphsLive = 0; track failure EndIf InetClose ($INetGetHandle) Posting the whole 2235 lines of the script would not be helpful I suspect :-) Besides which, without its installation environment, it wouldn't work properly anyway. Hopefully someone who knows the internal workings of InetGet() can shed some light on what is going on. Shalom Bill Link to comment Share on other sites More sharing options...
martin Posted September 4, 2009 Share Posted September 4, 2009 Hi All, I have a complex GUI app that uses its GUIs in OnEvent mode to ensure they stay responsive while the script works behind the scenes. All has been fine up till 3.3.0.0. I re-wrote the InetGet() sections of the script to use the new InetGet() function in 3.3.1.1beta, and now the GUI becomes totally unresponsive during background downloading. Parts of it are not repainted, and clicking on the menus causes WinXP to report the application is not responding. After much fustration I have had to go back to 3.3.0.0 and the old InetGet() function. Here's examples of the sections that do the background downloads. This, under 3.3.0.0, works fine. GUI's stay responsive. InetGet($GraphGoldLive, $GraphGoldLiveFileAndPath, 1, 1) ; Gold Live Do Sleep(300) Until @InetGetActive = 0 ; Wait till download is complete. If @InetGetBytesRead = -1 Then $CheckGraphsLive = 0; track failure Else $CheckGraphsLive = 1; track success EndIf This, under 3.3.1.1beta, doesn't work. GUI's stop responding. $INetGetHandle = InetGet($GraphGoldLive, $GraphGoldLiveFileAndPath, 1, 1) Do Sleep(250) Until InetGetInfo($INetGetHandle, 2) ; Wait till download is complete. If InetGetInfo($INetGetHandle, 3) Then $CheckGraphsLive = 1; track success Else $CheckGraphsLive = 0; track failure EndIf InetClose ($INetGetHandle) Posting the whole 2235 lines of the script would not be helpful I suspect :-) Besides which, without its installation environment, it wouldn't work properly anyway. Hopefully someone who knows the internal workings of InetGet() can shed some light on what is going on. Shalom Bill Not easy to say since we don't know enough from what you have posted. If the code you showed is part of a function which is an event handler, and the code used for 3.3.0.0 does not use OnEvent mode then I think it would explain the delays you get, and you need to move that code outside of an event handler. 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...
PartyPooper Posted September 4, 2009 Share Posted September 4, 2009 InetGet doesn't work in the Beta. It hasn't worked since they released the Beta way back in June (see Ticket #1036 and Ticket #1080). You may want to look at using FTP if you can't wait months and months until they release the next Beta or go back to using the Production vers. Link to comment Share on other sites More sharing options...
suthers Posted September 6, 2009 Author Share Posted September 6, 2009 Thanks heaps PartyPooper! Those tickets explain exactly why I'm getting the issues I am. I have already gone back to the production version for this app & it's going fine. There weren't any specific functionalities I needed in the beta for this one.Thanks too to you Martin. The only differences between the two scripts are the ones shown in the code snippits. There are no other differences, like your concern that one may be using OnEvent mode & the other not. I don't think I understand what you mean by a function being an event handler. Do you mean a function that is called when there is a GUI event? If so, I'd like to learn more about what kind of operations should be inside or outside of such functions. 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