jchd Posted January 5, 2014 Share Posted January 5, 2014 in poor words ($aArray) for now has no function in Autoit (always return None, if you do not use the Array access on expression) Untrue: (expression) = expression AFAIK 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...
DXRW4E Posted January 5, 2014 Author Share Posted January 5, 2014 (edited) Hi jchd, but of course I know that ehhh, but except in cases of Array variable Local $aArray = [555, 444, 333] If $aArray Then ConsoleWrite("1" & @LF) ;ElseIf $aArray[0] Then ;True - Array access normal ; ConsoleWrite("2" & @LF) ;ElseIf ($aArray)[0] Then ;True - Array access on expression mod ; ConsoleWrite("2" & @LF) ElseIf ($aArray) Then ;Improvement (Feature) Request ConsoleWrite("2" & @LF) Else ConsoleWrite("3" & @LF) EndIf ;~ >Running:(3.3.10.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\DXRW4E\Desktop\New AutoIt v3 Script (2).au3" ;~ --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop ;~ 3 ;~ +>13:35:55 AutoIt3.exe ended.rc:0 ;~ >Exit code: 0 Time: 0.321 Ciao. Edited January 5, 2014 by DXRW4E Link to comment Share on other sites More sharing options...
jchd Posted January 5, 2014 Share Posted January 5, 2014 I still don't see what that confusing new syntax would bring, except confusion. I'm pretty sure I and zillions others have written things like: If ($a) Then ... being used to C or for whatever reason. 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...
DXRW4E Posted January 5, 2014 Author Share Posted January 5, 2014 (edited) I still don't see what that confusing new syntax would bring, except confusion.I'm pretty sure I and zillions others have written things like:If ($a) Then ...being used to C or for whatever reason. there are a lot of differences, StringSplit always return arrays so never happens error, but it is very useful in cases happens error, to give an example;ERROR, if error happens during Dllcall, name.dll not found or other Return (DllCall("name.dll", "int", "FuncName", "str", "", "int", 111))[0] ;is always OK, even if error happens during Dllcall, name.dll not found or other Return (DllCall("name.dll", "int", "FuncName", "str", "", "int", 111)) ;Improvement (Feature) Requestis the same thing also during the Comparison or Assignment or anything like that, so never go in error, even if variable is arrays or not, here is to avoid these errorsLocal $aTest[4] = ["One","Two","Three","Four"], $sTest, $aTest2 $sTest = ($aTest) ;Improvement (Feature) Request ConsoleWrite("$sTest - " & $sTest & @LF) $sTest = ($aTest)[0] ConsoleWrite("$sTest - " & $sTest & @LF) $aTest2 = "Two" $sTest = ($aTest2) ;Improvement (Feature) Request ConsoleWrite("$sTest - " & $sTest & @LF) $sTest = ($aTest2)[0] ConsoleWrite("$sTest - " & $sTest & @LF) ;~ >Running AU3Check (3.3.11.1) from:C:\Program Files (x86)\AutoIt3\Beta ;~ +>02:50:57 AU3Check ended.rc:0 ;~ >Running:(3.3.11.1):C:\Program Files (x86)\AutoIt3\Beta\autoit3.exe "C:\Users\DXRW4E\Desktop\New AutoIt v3 Script.au3" ;~ --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop ;~ $sTest - ;~ $sTest - One ;~ $sTest - Two ;~ "C:\Users\DXRW4E\Desktop\New AutoIt v3 Script.au3" (10) : ==> Subscript used on non-accessible variable.: ;~ $sTest = ($aTest2)[0] ;~ $sTest = ($aTest2)^ ERROR ;~ ->02:50:57 AutoIt3.exe ended.rc:1 ;~ >Exit code: 1 Time: 0.436everything will be as always nothing will change, so it does not create confusion, but to the contrary, it helps a lot in all cases;is OK, but if error happens during Dllcall ehhh, Autoit Error (blocks\terminates execution) of the exe\script If (DllCall("Kernel32.dll", "long", "GetLastError"))[0] Then ;ect ect EndIf ;;or Return SetError((DllCall("Kernel32.dll", "long", "GetLastError"))[0], 0, $data) ;is always OK, even if error happens during Dllcall, Kernel32.dll not found or other If (DllCall("Kernel32.dll", "long", "GetLastError")) Then;Improvement (Feature) Reques ;ect ect EndIf ;;or Return SetError((DllCall("Kernel32.dll", "long", "GetLastError")), 0, $data)in poor words ($aArray) for now has no function in Autoit (always return None, if you do not use the Array access on expression), everything so simple nothing will change them, only add that the ($aArray) from None to Return firs elementif you see it as something that is confusing, it is another problem after Ciao. Edited January 5, 2014 by DXRW4E Link to comment Share on other sites More sharing options...
jchd Posted January 5, 2014 Share Posted January 5, 2014 I see even more confusion, since Return(expression) is very common syntax. I may be deviant but I know my fingers use it at times, as if Return was a function. 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...
DXRW4E Posted January 5, 2014 Author Share Posted January 5, 2014 normally changes only this, but who ever used this?? Local $aArray = [555, 444, 333] Local $aArray2 = ($aArray) ConsoleWrite($aArray2[0] & @LF) Ciao. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 5, 2014 Moderators Share Posted January 5, 2014 DXRW4E,Have you ever come across the expression "flogging a dead horse"? If not, it is exactly what you are doing here - please just let it drop. 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...
DXRW4E Posted January 5, 2014 Author Share Posted January 5, 2014 (edited) Hi Melba23, is everything is OK ,Have you ever come across the expression "flogging a dead horse"? I had already figured out that If not, it is exactly what you are doing here - please just let it drop. however i write all those posts because I think as if I feel that since not all do not understand very well the requesthowever is no longer important, it was just for info Ciao. Edited January 5, 2014 by DXRW4E Link to comment Share on other sites More sharing options...
Richard Robertson Posted January 6, 2014 Share Posted January 6, 2014 We understand the request, but you aren't providing new unique syntax for accessing the first element. And if you're going to go so far as to introduce something new, you should just keep using [0]. 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