I seem to be having a problem trying to insert values into an array in excess of the size of the array (its Ubound value). I thought the command would simply 'ReDim' the array in order to add another value...however that does not seem to be happening. My code is as below:
;**SET DYNAMIC ARRAY DIMENSIONS... $vValue = Int($_STRUCTURE_LEVEL - 1) ;seek the '$_HIERARCHY' level that is one 'previous' to the 'current' value...! $iStart = 0 ;set to begin search from element "0" in array... Do $_Files_Located = _Arraysearch($_HIERARCHY, $vValue, $iStart) if Int($_Files_Located) <> -1 Then $iEnd = 1 For $_RIGGING = 0 to Ubound($_LINE_DETAIL3) - 1 _ArrayInsert($_STRUCTURES, $_Files_Located + $iEnd, String($_LINE_DETAIL3[$_RIGGING])) _ArrayInsert($_HIERARCHY, $_Files_Located + $iEnd, Int($_STRUCTURE_LEVEL)) _ArrayInsert($_INFERIOR_TMPLS, $_Files_Located + $iEnd, Int(-1)) $iEnd += 1 ;increment EACH ITERATION... Next ;Next $_RIGGING EndIf ;'$_Files_Located' NOT "-1"...value for previous '$_STRUCTURE_LEVEL' ;was located in '$_HIERARCHY' array... $iStart += (Ubound($_LINE_DETAIL3) + 1) ;increment the offset index element position to begin the next search... ;"+ 1" to INCLUDE the 'parent' ('searched') UNIT...! Until $_Files_Located == -1 ;end loop when previous '$_STRUCTURE_LEVEL' is NOT found in '$_HIERARCHY' array... ;**
This code routine works perfectly fine except when the 'searched' value ($_Files_Located) happens to be the final element position in the searched array...how can I modify this routine so that the final additions at the end of the array(s) are made? I thank in advance for any replies.
Maybe you can help me with something small.
It is not terrible but it slows down my script and after a while even crash the script.
First i explain what i have;
I have a GUI with a lot of GUICtrlCreateInput controls, lets say 600 pieces.
All the controls are hidden when the GUI is displayed, i have 3 buttons attached to 200 pieces each.
When i press button-1 the first 200 controls are showed,
When i press button-2 the first 200 controls are hidden and the next 200 controls are showed,
This is working perfectly but after a while the GUI is getting slower and slower.
After a while the controls aren't responding anymore and the script crashes.
When i compile the script to 64-Bits version the speed is a lot better but you can still see the script slowing down each time i use the buttons.
I think there has to be a buffer somewhere that is filling each time i show and hide the controls, but how can i clear that buffer without restarting the script?
Deleting and re-creating the controls didn't help, deleting the entire gui (and controls) and re-creating it didn't help also.
The only thing that is working is restarting the script.
PS: If you need a working example i can add it to this topic, just let me know. It is not rocket science, i just create the controls and show/hide them with a while loop and 3 buttons.
what is more efficient, using multiple arrays or one multidimensional array?
; Hamster data structure using multiple arrays Global $HamsterCount = 6 Global $HamsterX[$HamsterCount] Global $HamsterY[$HamsterCount] ;giving each hamster an x and y position For $i=0 To $HamsterCount-1 $HamsterX[$i] = 0 $HamsterY[$i] = 0 Next ; The same hamster data structure using one multidimensional array Global $HAMSTER_COUNT = 6 Global Enum $HAMSTER_X, _ $HAMSTER_Y, _ $HAMSTER_MAX Global $Hamsters[$HAMSTER_COUNT][$HAMSTER_MAX] ;giving each hamster an x and y position For $i=0 To $HAMSTER_COUNT-1 $Hamsters[$i][$HAMSTER_X] = 0 $Hamsters[$i][$HAMSTER_Y] = 0 Next
ProxAllium is a GUI frontend to Tor, it aims to make the usage of Tor easier by directly exposing its SOCK5 proxy which can be used to access the Tor network. The GUI is designed to be simple and user-friendly and it has a few other features... namely:
Fully portable - doesn't write outside its own directory Integrated with Tor via the controller interface and properly communicates with it Minimize to tray Option to start with Windows Interface to configure bridges if Tor is censored in your region Many customization options are available via the config.ini file Screenshots:
The code is made with pure AutoIt, is fully open source and you are free to adapt it to your needs
The GitHub repository hosts all the releases and code. As a bonus it has a somewhat sparsely documented Tor UDF which can be used to control Tor, the code also demonstrates the proper usage of my Process UDF which might be interesting if you want to deal with processes.
As some of my friends know, I no longer use Windows as my main operating system. I switched to Linux a few months back as my primary operating system and haven't looked back since. Unfortunately that meant I could no longer use my own program due to it being Windows only... after a few months of playing around with C and making a basic program, I have decided to rewrite all of ProxAllium into C and make it cross-platform. Sadly this means that the AutoIt version of ProxAllium will not receive any major updates now.
Let me know if this is something you guys would use, I used it daily with my IRC client to connect via Tor (to protect my I.P). I hope you enjoy using my program!
I know how JSON works. However JSON data is typically received from web based servers.
My question is:
Has anyone considered to use, or currently actively using JSON as an internal data container?
Internal here as in an ordinary AutoIt data type, generated, populated and manipulated within an AutoIt script, without any external data sources.
The JSON and BinaryCall UDFs work well and appear the de facto defaults. Are there any thoughts on using JSON for internal variable values instead of the typical array?
Also, there can be situations where such a JSON collection contains an array and it will have to be parsed using typical array functions.
Currently I am working on a small project where I have to keep and use various identifiers from different sources. There are several ideas in this regard, some involving SQL child tables and arrays stored with keys (maps), which lead me to think that JSON may be a more suitable data container. It readily shrinks and stretches, allowing for dynamic data growth. JSONs ability to add new repeating data groups on the fly makes it particularly powerful and appealing.
Ideas and suggestions welcome