Moderators Melba23 Posted July 26, 2014 Moderators Share Posted July 26, 2014 Jon,Works for me. Are you still open to a few small tweaks elsewhere? If so, could I perhaps gently point you to #2538, #2686 and #2793. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
jchd Posted July 26, 2014 Share Posted July 26, 2014 Jon your arrays rock! Thanks. Yeah, #2686 will nominate you for the Fields medal! May I add >this ReDimTo request? 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...
JohnOne Posted July 26, 2014 Share Posted July 26, 2014 Looks like 2686 is complete. Ace. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
jchd Posted July 26, 2014 Share Posted July 26, 2014 Vodka? ConsoleWrite(Random(17, 17, 1) & @LF) --> 0 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...
Moderators Melba23 Posted July 26, 2014 Moderators Share Posted July 26, 2014 jchd,Go look at the ticket in Trac. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Administrators Jon Posted July 26, 2014 Author Administrators Share Posted July 26, 2014 The GuiSetAccelerators() one is weird. MSDN clearly says that accelerators won't fire on disabled menu controls. And they don't. But accelerators assigned to buttons seem to always fire. I've put an additional check in the code to try and trap it, but it's entirely possible its the sort of thing that causes a regression so it will need testing. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
jchd Posted July 26, 2014 Share Posted July 26, 2014 Ah! Then it's "Vodka!". Surprising what a slight difference in punctuation can make. Guess the Fields prize played its role, albeit ridiculous compared to a Nobel! 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...
Moderators Melba23 Posted July 26, 2014 Moderators Share Posted July 26, 2014 Jon,Happy to run some tests this afternoon if you want to post a new exe. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
czardas Posted July 26, 2014 Share Posted July 26, 2014 Looks like 2686 is complete. Ace. Nothing but smiles from me. operator64 ArrayWorkshop Link to comment Share on other sites More sharing options...
Administrators Jon Posted July 26, 2014 Author Administrators Share Posted July 26, 2014 AutoIt3_Accel.exe Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 26, 2014 Moderators Share Posted July 26, 2014 Jon,Both the Random and the Accelerator changes seem good to me: expandcollapse popup#include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> $iRet = Random(1, 2) MsgBox($MB_SYSTEMMODAL, "Different", "Return: " & $iRet & @CRLF & "Error: " & @error & @CRLF & "Extended: " & @extended) $iRet = Random(1, 1) MsgBox($MB_SYSTEMMODAL, "Same", "Return: " & $iRet & @CRLF & "Error: " & @error & @CRLF & "Extended: " & @extended) $hGUI = GUICreate("Test", 500, 500) $cMenu = GUICtrlCreateMenu("File") $cMenu_No = GUICtrlCreateMenuItem("Test", $cMenu) GUICtrlSetState(-1, $GUI_DISABLE) $cMenu_Yes = GUICtrlCreateMenuItem("Exit", $cMenu) $cButton_No = GUICtrlCreateButton("Disabled", 10, 10, 80, 30) GUICtrlSetState(-1, $GUI_DISABLE) $cButton_Yes = GUICtrlCreateButton("Enabled", 10, 100, 80, 30) $cDummy = GUICtrlCreateDummy() GUISetState() Local $aAccelKeys[5][2] = [["a", $cMenu_No], ["b", $cMenu_Yes], ["c", $cButton_No], ["d", $cButton_Yes], ["e", $cDummy]] GUISetAccelerators($aAccelKeys) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cMenu_No MsgBox($MB_SYSTEMMODAL, "Hi", "Menu No") Case $cMenu_Yes MsgBox($MB_SYSTEMMODAL, "Hi", "Menu Yes") Case $cButton_No MsgBox($MB_SYSTEMMODAL, "Hi", "Button No") Case $cButton_Yes MsgBox($MB_SYSTEMMODAL, "Hi", "Button Yes") Case $cDummy MsgBox($MB_SYSTEMMODAL, "Hi", "Dummy Yes") EndSwitch WEndOne thing: As you can see @error is still being set when the 2 values are the same in Random - could you amend that and, as discussed in the ticket, possibly set @extended instead to indicate the "non-randomness" of the return? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Administrators Jon Posted July 26, 2014 Author Administrators Share Posted July 26, 2014 Not sure about it to be honest. It might be relied on to set @error in some scripts because it was an error condition by design - it wasn't a bug. So if we change it so it's not an error by design any more I don't see the point of setting @extended. It doesn;t help anyone who was using @error and hasn't read the changelog, and it's useless information for anyone else because they already thought max=min should be ok... So I'd be inclined to not set anything and make a note in script breaking. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
jchd Posted July 26, 2014 Share Posted July 26, 2014 So I'd be inclined to not set anything and make a note in script breaking. +1 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...
Moderators Melba23 Posted July 26, 2014 Moderators Share Posted July 26, 2014 (edited) Jon,More than happy with that solution - I will amend the Help file as follows:If Min and Max are the same value then <a href="Random.htm">Random()</a> will return that value - the @error flag will not be set in this case.M23Edit: And add to script-breaking as well.2nd Edit: Done. Edited July 26, 2014 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Inververs Posted July 26, 2014 Share Posted July 26, 2014 in version 3.3.13.9 this code generate error: Local $map[] Local $array = ['berlin','bremen','koln'] $map['city'] = $array ConsoleWrite($map['city'][0] & @CRLF) Array variable has incorrect number of subscripts or subscript dimension range exceeded.: ConsoleWrite($map['city'][0] & @CRLF) ConsoleWrite($map['city']^ ERROR In 3.3.13.8 no this error. Tnx Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 26, 2014 Moderators Share Posted July 26, 2014 Inververs,That has already been pointed out in a private thread and Jon's response was:I don't think that's solvable.You need to wrap the first part of the expression in ( ):Local $map[] Local $array = ['berlin','bremen','koln'] $map['city'] = $array ConsoleWrite(($map['city'])[0] & @CRLF) ; <<<<<<<<<<<<<<<<<<<<<<Just as you do currently if you use arrays in arrays. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
jchd Posted July 26, 2014 Share Posted July 26, 2014 Alternative syntaxes do work: Local $map[] Local $array = ['berlin','bremen','koln'] $map['city'] = $array ConsoleWrite(($map['city'])[0] & @CRLF) ConsoleWrite($map.city[0] & @CRLF) Jon as mentionned elsewhere that the dot-notation syntax was pretty ambiguous... and once again French keyboards are slower than GBs. 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...
Inververs Posted July 26, 2014 Share Posted July 26, 2014 Thanks, guys And is there a way or an alternative syntax for this design? $deutschland_indexes['berlin']['werrastr'] = 12059 ConsoleWrite($deutschland_indexes['berlin']['werrastr'] & @CRLF) Link to comment Share on other sites More sharing options...
jchd Posted July 26, 2014 Share Posted July 26, 2014 Is that a map inside a map? Show the full code. 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...
Inververs Posted July 26, 2014 Share Posted July 26, 2014 Is that a map inside a map? Show the full code. No code at all. It a just example: And, if I have the same streets in the cities, such as $deutschland_indexes['berlin']['werrastr'] = 12059 $deutschland_indexes['koln']['werrastr'] = 34587 that if a way to keep it? 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