Joboy2k Posted December 29, 2019 Share Posted December 29, 2019 Im having an issue with _ArrayDisplay, hoping I don't need a script to replicate it as its intermittent and only starts happening when in a large script. When I use _ArrayDisplay it will intermittently just show no results but also freeze and just say "not responding" I know that what I am passing into _ArrayDisplay is an array as I can access all of the the array but when I just want to preview it my whole program crashes and I have to restart the script. Any ideas? hoping its a known fault but if not I will see if I can make a script demonstrating it but seems to happen alot more in very large scripts. Thank you in advance Link to comment Share on other sites More sharing options...
Gianni Posted December 29, 2019 Share Posted December 29, 2019 just a wild guess ar you maybe using the _arrayDisplay() function from within an event "callback" function? Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Joboy2k Posted December 29, 2019 Author Share Posted December 29, 2019 Not sure I fully understand what that means but I think you might be right. I have setup a function called SQLQuery, I make a $String then pass it to my SQLQuery function and the returned array is what im trying to display. it sounds like you know what im doing more than I do xD. is there an issue with seeing the array then once its been returned back from a function? is it something im doing wrong? Link to comment Share on other sites More sharing options...
jchd Posted December 29, 2019 Share Posted December 29, 2019 What are the typical dimensions of your pathological arrays? AutoIt arrays have a limit of 2²⁴ (16777216) cells, regardless of cells' contents. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Joboy2k Posted December 29, 2019 Author Share Posted December 29, 2019 (edited) Its not large, im sending this command with "Select * From Report where REP_Ticket = '12399' LIMIT 1;" The result should be $Results[1][18] and no single one is more than 10 characters long. I've just found out what solves the issue but not sure why its a problem, maybe someone could shed some light on it (maybe its what @Chimp was asking but didn't understand) when the function is being called from within GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") is when I get the issues. anyone know why its an issue? thought maybe because its trying to freeze it for the _Arraydisplay to work but the program doesn't freeze when using msgbox so not sure what is wrong. Edited December 29, 2019 by joboy2k Link to comment Share on other sites More sharing options...
Nine Posted December 29, 2019 Share Posted December 29, 2019 If you read GUIRegisterMsg help file carefully, you would have seen this : Warning: blocking of running user functions which executes window messages with commands such as "MsgBox()" can lead to unexpected behavior, the return to the system should be as fast as possible !!! FrancescoDiMuro 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Gianni Posted December 29, 2019 Share Posted December 29, 2019 3 hours ago, joboy2k said: ... I've just found out what solves the issue but not sure why its a problem, maybe someone could shed some light on it (maybe its what @Chimp was asking but didn't understand) ... when the function is being called from within GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") is when I get the issues. anyone know why its an issue? thought maybe because its trying to freeze it for the _Arraydisplay to work but the program doesn't freeze when using msgbox so not sure what is wrong. yep a callback function is a function that doesn't flows along the normal script flow, it's called instead randomly according to the firing of some events, "diverting" in that way the main flow. As stated in the AutoIt Help, such function must execute quick statements and return the flow control back to the main script as soon as possible. So, if you use within a callback a "blocking" functions (ie functions that pause the execution of the program and wait for user input or introduces a long delay) such as MsgBox, InputBox, _ArrayDisplay .... and so on, it can cause "unexpected behavior" in your script, that maybe is what's happening. Probably, if you "stop" a callback function and in the meanwhile a new trigger event calls it again, a sort of "tangle" recursive loop is triggered, that cause the lost of the correct address to return to the main scipt... In short, dont't use those functions in a callback function Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
Joboy2k Posted December 29, 2019 Author Share Posted December 29, 2019 Thank you everyone for the help, was definitely the issue, not really familiar with callback functions and there potential, I use them just to know when a listview is clicked so probably using it unnecessarily anyway. I have found a work around just for debugging reasons. Many thanks all. 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