Search the Community
Showing results for tags 'BETA'.
-
Hello Again! I previously stumbled upon a topic asking for maps datatype's instructions... I too wasn't sure what a map is until I tried it... So I am making this topic to help other newbies (and some oldbies) better understand the Maps datatype of AutoIt! Lets start! A Note for Readers The maps datatype is still in development and is currently in Alpha Stage (More Risky than Beta) and its unstable, so AutoIt can crash indefinably while using Maps! I can't guarantee if this will be implemented in stable versions, this is a fairly new thing to AutoIt coders & in my honest opinion I don't see any use for it Maps are the best datatype in AutoIt, Very Useful ... Not hurting anyone though . Also the maps datatype is DISABLED IN STABLE VERSIONS, So you need to install the latest beta version of AutoIt to make maps work . If you find any bugs while using a map, please report it in the Official Bug Tracker Introduction To Maps Maps are just like arrays, instead they use "keys" to access elements inside them... A key can be either a string or an integer (Other datatypes work too but they are converted to a integer [Equivalent to Int($vKey)] before assignment [Source]). Although Integers don't represent the order of elements in a map unlike in an array... Declaring Maps Its similar to declaring an Array: ; This is the only way to declare a map ; You must have a declarative keyword like Dim/Global/Local before the declaration unless the map is assigned a value from a functions return Local $mMap[] ; Don't insert any numbers or strings it! Simple, Isn't it? Using Maps Using maps is similar to arrays (again!): Local $mMap[] ; Lets declare our map first! ; Adding data to maps is easy... ; This is our key ; | ; v $mMap["Key"] = "Value" ; <--- And our value! ; A key is Case-Sensitive meaning "Key" is not same as "key"! $mMap["key"] = "value" ; Not the same as $mMap["Key"]! ; There are 2 different ways to access an element in a map $mMap["Key"] ; 1st Method $mMap.Key ; 2nd Method Enumerating Maps Its quite easy to enumerate through arrays but what about maps? how can I enumerate through them!? #include <MsgBoxConstants.au3> ; Lets create our map first Local $mMap[] ; Lets add some information to the map, feel free to modify & add new elements $mMap["Name"] = "Damon Harris" $mMap["Alias"] = "TheDcoder" $mMap["Gender"] = "Male" $mMap["Age"] = 14 $mMap["Location"] = "India" $aMapKeys = MapKeys($mMap) ; MapKeys function returns all the keys in the format of an array Local $sProfile = "Profile of " & $mMap["Name"] & ':' & @CRLF ; We will use this string later For $vKey In $aMapKeys ; We use this to get the keys in a map :) $sProfile &= @CRLF & $vKey & ': ' & $mMap[$vKey] ; Add some details to the profile string using our map! Next MsgBox($MB_ICONINFORMATION + $MB_OK, "Profile", $sProfile) ; Finally display the profile :) It is easy as always Multi-Dimensional Maps Now now... I know that you are a little confused that how can an multi-dimensional maps exist... Although I am not 100% sure if its called that but lets continue: #include <MsgBoxConstants.au3> ; Multi-Dimensional maps are just maps in a map Local $mMapOfMapsvilla[] ; This map will store an other map Local $mParkMap[] ; This Park map will be inserted in the Mapsvilla's map :P $mMapOfMapsvilla["Map Item 1"] = "Town Hall" $mMapOfMapsvilla["Map Item 2"] = "Police Station" $mMapOfMapsvilla["Map Item 3"] = "Shopping Mall" $mMapOfMapsvilla["Map Item 4"] = "Residential Area" $mMapOfMapsvilla["Map Item 5"] = "Park" $mParkMap["Map Item 1"] = "Cottan Candy Stand" $mParkMap["Map Item 2"] = "Public Toilet" $mParkMap["Map Item 3"] = "Woods" $mMapOfMapsvilla.Park = $mParkMap MsgBox($MB_OK, "Map Location", $mMapOfMapsvilla["Map Item 1"]) ; Will display Town Hall MsgBox($MB_OK, "Map Location", $mMapOfMapsvilla.Park["Map Item 1"]) ; Will display Cottan Candy Stand I am sure its easy for you to understand now Frequently Asked Questions (FAQs) & Their answers Q #1. Help! My code does not respond to anything (or) I get an "Variable subscript badly formatted" error on the line of declaration... A. DONT USE F5 or Go, Instead use Alt + F5 or Tools -> Beta Run in SciTE (Make sure that you have Beta installed) Q #2. Why are you using "m" in-front of every map variable? A. Best coding Practices: Names of Variables Q #3. What are "Elements" which you mention frequently??? A. This is a newbie question (I have no intention of insulting you ), so I guess you are new to programming. "Elements" are data slots inside a Map (or an Array), you can imagine elements as individual variable which are stored in a Map. You can access them using "keys", Please refer to "Introduction to Maps" section at the starting of this post Q #4. Are Maps faster than Arrays? A. You need to understand that Maps have different purpose than Arrays. Maps are designed to store data dynamically (like storing information for certain controlIDs of GUI) and Arrays are designed to store data in a order (for instance, Storing every character of a string in an element for easy access). If you still want to know then if Maps are faster, then the answer is maybe... Maps are *supposed* (I am not sure ) to be faster in addition of elements (while Arrays are painfully slow while adding or removing elements). Here (Post #24) is a benchmark (Thanks kealper! ) More FAQs coming soon! Feel free to ask a question in the mean while
-
I need a debugger for AutoIt v3.3.15.3 Beta
Mbee posted a topic in AutoIt Projects and Collaboration
Hi! I'm using Maps (and I love 'em!), so I have to use the latest AutoIt Beta. I've switched to Beta mode, and the graphical debugger doesn't even show up in the Explorer context menu (not surprising). So I'd like to use _Dbug (rather than a large number of MsgBox statements), but it fails when it encounters a Map function (such as MapExists). I've made a request for a version that will work with the Beta, but going on past history, I don't expect an answer anytime soon. I'm not necessarily asking for someone else to modify _Dbug, because I can probably do it myself, as long as I know how to adapt it to use the Beta. Can someone please enlighten me as to how to adapt a UDF or other function to use AutoIt Beta? Thanks! -
Back in 2017 it was mentioned a new release will come only when the volunteering devs will have time for it. This month, after more than 2 years since the last official release (which came a long time after the aforementioned supposedly newer beta), new betas started appearing one after another. I was just wondering what changed. Are there any specific exciting upcoming features that made the devs decide to make a comeback?
-
Hello Everyone! I made a UDF for the new Maps Datatype, I tried to follow Best Coding Practices & UDF-Specs while making this. Please note that this UDF is in very early stages. A thanks to @boththose for ideas on functions (like _Maps_IniToMap). If you have any suggestions, improvements, complaints, feature requests etc. Please don't hold back anything which can help improve this UDF! I will continue to develop this UDF as long as the Official AutoIt Dev Team adapts it (or makes another version of this UDF) . Enjoy! TD
- 22 replies
-
- maps
- new datatype
-
(and 2 more)
Tagged with:
-
Im not sure if this is intended but normally Autoit variables are always passed as copies (except objects i think). But below i observed an unconsistency when copying maps with nested maps inside. Issue: If you create a nested map1 and copy it to a new map2, changing a nested value in map2 will also change the nested value in map1 Dim $player[] Dim $sub[] $player.test1 = 1 $player.test2 = $sub $player.test2.child1 = "org" $player.test2.childext = $sub $player.test2.childext.child1 = "org2" $playerold = $player ; make a copy of the whole map ConsoleWrite("player.test2.child1 : "& $player.test2.child1 & @CRLF); original nested value in $player $playerold.test2.child1 = "changed" ; edit a nested value in $playerold ConsoleWrite("player.test2.child1 : "& $player.test2.child1 & @CRLF) ; original nested value in $player changed ConsoleWrite("---------------------" & @CRLF) ConsoleWrite("player.test2.childext.child1 : "& $player.test2.childext.child1 & @CRLF); original level2 nested value in $player $playerold.test2.childext.child1 = "changed2" ; edit a level2 nested value in $playerold ConsoleWrite("player.test2.child1 : "& $player.test2.child1 & @CRLF); original level1 nested value in $player stayed the same ConsoleWrite("player.test2.childext.child1 : "& $player.test2.childext.child1 & @CRLF); original level2 nested value in $player changed
-
Hi there, I have a problem using the latest two betas of au3stripper.exe. Compiling my script using V17.224.935.6 works fine, the next two releases (18.624.1847.0 and 18.624.1847.1) show an error: !==> *** ERROR: stopping process because include file not found :#include <INCLUDE_FILE.au3> !==> *** Checked these directories : !==> C:\Program Files (x86)\AutoIt3\include\INCLUDE_FILE.au3 !==> SCRIPT_DIR\INCLUDE_FILE.au3 !==> SCRIPT_DIR\INCLUDE_FILE.au3 !>18:42:00 --------------------------------------------------------------- !>18:42:00 Au3Stripper ended with errors, using original scriptfile.rc:999 !>18:42:00 --------------------------------------------------------------- Changing the include line according to the helpfile (using "..." for includes in script dir and <..> for includes in the au3-include-dir won't help!? Greetings kara66
-
Can somebody try to reproduce this bug? It would be helpful to know if this issue appeares on other environments too. Issue: Sometimes values of certain keys will return empty even if expicitly assigned a value before. Conditions: Map is bigger than ~50 key/values pairs value is being worked with in a Function where a loop is iterating through the Map before retrieving the value there is a isMap/MapKeys/MapAppend/MapRemove check on the Map value. Dim $mMap[] ; Generate random key strings For $i = 0 To 100 $RndKey = "" For $i2 = 0 To 4 $RndKey &= Chr(Random(65,90,1)) Next $mMap[$RndKey] = 999 next ConsoleWrite("-----------1-------------" & @CRLF); Unpredictable blank values MapDisplay1($mMap) ConsoleWrite("-----------2-------------" & @CRLF); ByRef always works MapDisplay2($mMap) ConsoleWrite("-----------3-------------" & @CRLF); not in a function always works For $i In MapKeys($mMap) isMap($mMap[$i]) ConsoleWrite($i&": "&$mMap[$i]&@CRLF) Next Func MapDisplay1( $m_Map ) For $i In MapKeys($m_Map) isMap($m_Map[$i]) ;same problem with isMap($m_Map[$i]), MapKeys($m_Map[$i]), MapAppend/MapRemove but NOT with MapExists($m_Map,$i) ConsoleWrite($i&": "&$m_Map[$i]&@CRLF) Next EndFunc Func MapDisplay2( ByRef $m_Map ) For $i In MapKeys($m_Map) isMap($m_Map[$i]) ConsoleWrite($i&": "&$m_Map[$i]&@CRLF) Next EndFunc The value is not lost or overwritten on the global map, only on the local map inside the function.
-
Version v0.4
1,006 downloads
Hello Everyone! I made a UDF for the new Maps Datatype, I tried to follow Best Coding Practices & UDF-Specs while making this. Please note that this UDF is in very early stages. A thanks to @boththose for ideas on functions (like _Maps_IniToMap). If you have any suggestions, improvements, complaints, feature requests etc. Please don't hold back anything which can help improve this UDF! I will continue to develop this UDF as long as the Official AutoIt Dev Team adapts it (or makes another version of this UDF) . Enjoy! TD -
Some of my users are having trouble that I confirmed happens "just for them". Specifically _IEFormElementRadioSelect returns $_IESTATUS_NoMatch for a radio button that clearly exists in the page. For me using WinXP / IE8 or Win8.1 / IE11 I see few if any symptoms, but when I put together a test on their Win 7 / IE8 platform sure enough it breaks. The unit test is just a bit of code that changes a radio box value, which triggers a postback, waits for the postback to complete, and repeats with a new value, triggering another postback, repeat 1000 times and call it success. After some debugging I determined that _IEFormElementGetObjByName was finding the radio button, but _IEFormElementRadioSelect was not, which lead to this bit of code from IE.au3: Local $oItems = Execute("$oObject.elements('" & $sName & "')")Which looks valid and works some (maybe even most) of the time on Win 7 / IE 8. So I modified it to use the similar construct from _IE_FormElementGetObjByName to be: Local $oItems = $oObject.elements.item($sName)Which works 100% for me. So the question now becomes, is this a beta issue, an IE.au3 issue, or an IE issue? The only real difference is where I place my code to workaround cases where Win 7 / IE8 / _IEFormElementRadioSelect don't do what was expected.
-
Hello! I was wonder if it OK for me to use datatypes other than strings & integers... I tested it and it works! But the help file states: (Beta Helpfile -> AutoIt -> Language Reference -> Variables) So yeah, will I able to continue using other datatypes normally even in the future releases of AutoIt? Thanks in Advance! TD
-
Hello! , I am getting strange errors while making an example for a function in Maps UDF... Here is my script (AUTOIT BETA REQUIRED!): #include <StringConstants.au3> Example() Func Example() Local $aArray[5] = ["Foo", "Bar", "Baz", "Qux", "Norf"] ; This is the array to convert Local $sKeys = "Primary Place Holder;Secondary Place Holder;Tertiary Place Holder;Quaternary Place Holder;Quinary Place Holder" ; Keys in String Format Local $aKeys[5] = ["Primary Place Holder", "Secondary Place Holder", "Tertiary Place Holder", "Quaternary Place Holder", "Quinary Place Holder"] ; Keys in Array Format Local $mConvertedMap[] $mConvertedMap = _Map_1DArrayToMap($aArray, $sKeys) ; Convert Array To Map with Keys in String format ;_Map_Display($mConvertedMap, "Converted Array") ; Display Map $mConvertedMap = _Map_1DArrayToMap($aArray, $aKeys) ; Convert Array To Map with Keys in Array format ;_Map_Display($mConvertedMap, "Converted Array") ; Display Map EndFunc Func _Map_1DArrayToMap(ByRef $aArray, $vKeys, $sDelimiter = ';', $iInitialElement = 0) If IsString($vKeys) Then $vKeys = StringSplit($vKeys, $sDelimiter, $STR_NOCOUNT) ElseIf Not IsArray($vKeys) Return SetError(1, 0, False) EndIf If Not UBound($aArray, 0) = 1 Then Return SetError(2, 0, False) Local $iKeyCount = UBound($vKeys) Local $iElementCount = UBound($aArray) If Not $iKeyCount = ($iElementCount - $iInitialElement) Then Return SetError(3, 0, False) Local $mReturnMap[] Local $iErrorCount = 0 For $iElement = $iInitialElement To ($iElementCount - 1) + $iInitialElement ; $mReturnMap[$vKeys[$iElement]] = $aArray[$iElement] _Map_Append($mReturnMap, $vKeys[$iElement], $aArray[$iElement]) $iErrorCount += @error Next If $iErrorCount > 0 Then Return SetError(4, $iErrorCount, False) Return $mReturnMap EndFunc Func _Map_Append(ByRef $mMap, $vKey, $vContents) If MapExists($mMap, $vKey) Then Return SetError(1, 0, False) $mMap[$vKey] = $vContents Return True EndFunc ;==>_Map_AppendMy SciTE's Output: SciTE's Screenshot for better error recognition: Thanks in Advance, TD
-
AutoIt v3.3.13.21 Beta View File 3.3.13.21 (July 8th, 2015) (Beta) AutoIt: Added: @OSVersion supports Windows 10 and Windows Server 2016.Added: GUICtrlCreatePic() with PNG example.Added: Constants for native Functions in AutoItConstants.au3.Added #3012: GUISetFont() default value doc.Fixed #3028: GUICtrlCreateCombo() doc formatting.Fixed #3040: Int() doc typos.Fixed #3042: Number() doc clarifications.Fixed #3041: AutoItWinGetTitle() doc example typos.Fixed #3039: AutoItWinSetTitle() doc example typos.Fixed #3057: StringSplit() Return Value if $STR_NOCOUNT doc.Fixed #2901: Memory error when specifying a UTF file mode that includes a BOM when no BOM is present.UDFs: Changed: _ArrayTranspose() algorithm.Changed: _SQLite 3.8.8.1 -> 3.8.10.0.Added: _GDIPlus_ImageGetDimension().Added: _GDIPlus_BitmapCreateDIBFromBitmap() can be used to allow .PNG in GUICtrlCreatePic().Added: _GDIPlus_ImageGetThumbnail().Added #3034: _Timer_SetTimer() doc example.Fixed #3011: _FileListToArrayRec() not closing the open handle.Fixed: _Word_DocFind(), _Word_DocFindReplace() and _Word_DocPrint() did not set @extended to the COM error code.Fixed #3018: _GDIPlus_EffectCreateHueSaturationLightness () doc and _GDIPlus_BitmapApplyEffect() crash.Fixed #3038: _Timer_SetTimer() callback function parameters.Fixed #3037: _RunDOS() waits for command completion.Fixed #3055: Bad link in _WinAPI_IOCTL() doc.Fixed #3052: _ArraySort() doc clarification for 2D .Fixed #3059: Miscelaneous => Miscellaneous in Help : Typos.Others: Added: lang-autoit.js code highlighting file for Google Prettify. See the Extras\Prettify folder.Added: lang-autoit.js supports multiline comments. Submitter Jon Submitted 07/08/2015 Category Beta
-
File Name: IE.au3 File Submitter: DaleHohm File Submitted: 27 Mar 2013 File Category: Libraries Title: Internet Explorer Automation UDF Library for AutoIt3 Filename: IE.au3 Description: A collection of functions for creating, attaching to, reading from and manipulating Internet Explorer Author: DaleHohm Version: T3.0-0 Last Update: 9/3/12 Requirements: AutoIt3 3.3.9 or higher This version is checked into the development stream for the next AutoIt beta release, but will work with the most recently released V3.3.9.x beta. I am releasing it here so that it can get some testing now and help some people with some of the issues it fixes in the realm of COM error handling (and "the WEND error"). This file will be removed when it is included in a public beta release. Dale
-
I started to study changes in the BETA version and more specifically in the functions contained in the Array.au3 . Thus, some entries in the Track But seriously, Continuing this thread , initially looked HelpFile version 3.3.10.2 and 3.3.11.5 . I did a comparison. I have some of my own conclusions , and now I ask for their verification. Conclusion # 1 : In fact, the importance of the parameters for one-dimensional arrays EDIT:can not be changed . Conclusion # 2: For some functions have changed Return Values I am thinking of a change in the meaning of @ error Conclusion # 3: For some functions, supplemented functionality with support for two-dimensional arrays . Conclusion # 4: Added quite a few new functions . QUESTIONS: Taking this into account the only real changes are relevant to the meaning of " SCRIPT BREAKING CHANGES " is only Conclusion # 2 ? Am I right or missed something ? btw . Aside from the fact that such a short summarized it changes , I appreciate the effort that has been brought in to make these changes. mLipok
-
Version T3.0-0
7,264 downloads
Title: Internet Explorer Automation UDF Library for AutoIt3 Filename: IE.au3 Description: A collection of functions for creating, attaching to, reading from and manipulating Internet Explorer Author: DaleHohm Version: T3.0-0 Last Update: 9/3/12 Requirements: AutoIt3 3.3.9 or higher This version is checked into the development stream for the next AutoIt beta release, but will work with the most recently released V3.3.9.x beta. I am releasing it here so that it can get some testing now and help some people with some of the issues it fixes in the realm of COM error handling (and "the WEND error"). This file will be removed when it is included in a public beta release. Dale -
Let's say I have multiple PowerTerm Pro windows open. Global $oObj = ObjGet("", "PowerTermPro.Document") ; <-- Production command works ok for the first instance only Global $oObj = ObjGet("", "PowerTermPro.Document", 1) ; <-- Beta command gives COM Error: 0x80020006 Unknown name. Can anyone shed any light on this? How can I get access to multiple objects of the same class?