Jump to content

A cross-platform implementation of the AutoIt language


How interested are you?  

61 members have voted

  1. 1. How interested are you?

    • I am willing to work on the code
    • I am willing to help with testing
    • I would love to see this becoming a reality
    • Nah mate, I don't think this is a good idea


Recommended Posts

...I may have exaggerated my strong dislike for the terminal. If I can automate stuff in Linux, then is an environment where I can work.
Typing once to create a script is ok. Running the script with a GUI is better. I'd make a pikachu Pick and choose of everything, click, click.

I'm pushing my clients to use VMs. If I can run a fan-less, $150 PC with Linux, I figure, I'll never have a user calling me to their station, ever again.
Boot straight to RDP. They'd be happy for the cheaper setup. But I have to feel comfortable in the Linux environment.
I'd have to learn python for my first scripts for Linux ( that sucks ).

By the time you get something going, I'll be ready :) 

PS: no pressure. Do your thing. I'll do this Linux exploration on time I'd put aside when I don't wanna play TF2 to relax  ;) 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

5 minutes ago, argumentum said:

...I may have exaggerated my strong dislike for the terminal. If I can automate stuff in Linux, then is an environment where I can work.
Typing once to create a script is ok. Running the script with a GUI is better. I'd make a pikachu Pick and choose of everything, click, click. 

That is okay, I prefer that too... one of the reasons I want to be able to use AutoIt in Linux :)

18 minutes ago, argumentum said:

I'm pushing my clients to use VMs. If I can run a fan-less, $150 PC with Linux, I figure, I'll never have a user calling me to their station, ever again.

Linux is pretty good for that purpose, it is easier to maintain than Windows once you have it set it up!

19 minutes ago, argumentum said:

I'd have to learn python for my first scripts for Linux ( that sucks ).

Yeah, that seems to be the most convenient (and popular) choice for scripting in Linux, good luck with learning! Many years ago I learned python as my first proper programming language, never really took off with it... I guess I was too dumb back then and the things I wanted to do were out of my league (especially GUI).

24 minutes ago, argumentum said:

By the time you get something going, I'll be ready :) 

PS: no pressure. Do your thing. I'll do this Linux exploration on time I'd put aside when I don't wanna play TF2 to relax  ;) 

Thanks, I am trying to finish the existing freelance projects I have before beginning work. I will post updates here if I have any.

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

@RTFC Thanks for the vote of confidence, I am also hoping to learn a lot of new things and gain interesting experiences when working on this project :D

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

  • 2 weeks later...

If you feel like it, by all means give it a go - language design is a lot of fun* and you could check AutoHotKey's fork for implementation reference as far as WinAPI goes. However, as people already pointed out, mapping AutoIt's API to Linux and/or OSX would be a bother - too many things are too different to how they are done on Windows.

* Although I probably wouldn't go with pure AutoIt-like syntax - e.g. lack of proper array references is a bother.

Link to comment
Share on other sites

@YellowAfterlife Thanks for the advice, I am already somewhat familiar with WinAPI and I plan to do most of the learning on my own, though I was planning to check AHK's source code if I couldn't get something done :)

2 hours ago, YellowAfterlife said:

However, as people already pointed out, mapping AutoIt's API to Linux and/or OSX would be a bother - too many things are too different to how they are done on Windows. 

That is correct. As I have mentioned I would be only implementing the simple/basic and essential part of the language, avoid all platform specific stuff in the beginning. Later down the road maybe there is a possibility to selectively allow platform-specific APIs (like DllCall, ObjCreate etc.).

2 hours ago, YellowAfterlife said:

Although I probably wouldn't go with pure AutoIt-like syntax - e.g. lack of proper array references is a bother. 

Interesting, can you elaborate further?

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

AutoIt arrays show a number of limitations, making some algorithms really painful to code.

No sub-array access
Execute can't process array declarations
No array literal (dismissed featured)
Many array functions use a count in [0] (pointless)
Possibly other points I overlook right now

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 here
RegExp tutorial: enough to get started
PCRE 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

  • Moderators

jchd,

Quote

Many array functions use a count in [0] (pointless)

I do not think any of the _Array* functions actually use (in the sense of an obligation to have) a count in element [0].  Certainly many AutoIt functions return a count in that element, although several of those have an option not to do so.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I know it isn't a feature buried in the implementation of array variables themselves, but this inconsistancy of some legacy functions is a bit painful. Easy, but too late to fix.

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 here
RegExp tutorial: enough to get started
PCRE 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

@jchd Thanks for listing out the limitations/bad practices related to AutoIt arrays

17 hours ago, jchd said:

No sub-array access

I am not sure if this counts:

Example()

Func Example()
    Local $aArray[2] = ["Foo"]
    Local $aInnerArray[1] = ["Bar"]
    $aArray[1] = $aInnerArray
    ConsoleWrite($aArray[0] & @TAB & ($aArray[1])[0] & @CRLF)
EndFunc
17 hours ago, jchd said:

Execute can't process array declarations

Oh, that is interesting! I did not know about that before :o

It is worth mentioning that Execute might not be able to make it into my implementation as I am designing it to be a compiled language (so when the code is actually executing, it is in byte-code form)... maybe it is possible to include the compiler to dynamically compile it on runtime but there would be some problems as the context (variables, functions etc.) is going to be modified after being compiled.

17 hours ago, jchd said:

No array literal (dismissed featured)

I recall making a thread (or maybe even a feature request) about this, I personally think it shouldn't be that hard to implement array literals so I can add it as a special feature :)

18 hours ago, jchd said:

Many array functions use a count in [0] (pointless)

This is a somewhat unfortunate myth which is sort of the norm these days, but it is not the fault of the language's design I think.

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

1 minute ago, TheDcoder said:

I am not sure if this counts:

You examplify nested arrays, while I refer to sub-arrays:

Local $a[5][3][2] = [ _
    [[789, -12], [19, 41], [-1578, -320]], _
    [[1476, 456], [4016, 15], [5821, 748]], _
    [[-478, 687], [546, 78], [210, 65]], _
    [[5641, 781], [56, 345], [2846, 45612]], _
    [[-7845, 164], [14, -9], [168, 4894]], _
]
; subarray
Local $aSub = $a[2] ; that should be    [[-478, 687], [546, 78], [210, 65]]

Suppose you want to write an UDF that takes an array as argument, whose dimension may be anything from 1 to 24 (the practical upper number of dimensions for an AutoIt array). Say it's a sort or something that requires changing the order of elements in the array. Your code will have to look like this (don't focus on the operation actually being done here, just at the huge Switch and ridiculously nested loops):

Spoiler
Switch $iDims
            Case 1
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then $aArray[$a] = $aTmp[.Item($a)]
                Next
            Case 2
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            $aArray[$a][$b] = $aTmp[.Item($a)][$b]
                        Next
                    EndIf
                Next
            Case 3
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                $aArray[$a][$b][$c] = $aTmp[.Item($a)][$b][$c]
                            Next
                        Next
                    EndIf
                Next
            Case 4
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    $aArray[$a][$b][$c][$d] = $aTmp[.Item($a)][$b][$c][$d]
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 5
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        $aArray[$a][$b][$c][$d][$e] = $aTmp[.Item($a)][$b][$c][$d][$e]
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 6
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            $aArray[$a][$b][$c][$d][$e][$f] = $aTmp[.Item($a)][$b][$c][$d][$e][$f]
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 7
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                $aArray[$a][$b][$c][$d][$e][$f][$g] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g]
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 8
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    $aArray[$a][$b][$c][$d][$e][$f][$g][$h] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$h]
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 9
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    For $i = 0 To $aUBounds[8]
                                                        $aArray[$a][$b][$c][$d][$e][$f][$g][$h][$i] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$i]
                                                    Next
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 10
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    For $i = 0 To $aUBounds[8]
                                                        For $j = 0 To $aUBounds[9]
                                                            $aArray[$a][$b][$c][$d][$e][$f][$g][$h][$i][$j] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$h][$i][$j]
                                                        Next
                                                    Next
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 11
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    For $i = 0 To $aUBounds[8]
                                                        For $j = 0 To $aUBounds[9]
                                                            For $k = 0 To $aUBounds[10]
                                                                $aArray[$a][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k]
                                                            Next
                                                        Next
                                                    Next
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 12
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    For $i = 0 To $aUBounds[8]
                                                        For $j = 0 To $aUBounds[9]
                                                            For $k = 0 To $aUBounds[10]
                                                                For $L = 0 To $aUBounds[11]
                                                                    $aArray[$a][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L]
                                                                Next
                                                            Next
                                                        Next
                                                    Next
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 13
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    For $i = 0 To $aUBounds[8]
                                                        For $j = 0 To $aUBounds[9]
                                                            For $k = 0 To $aUBounds[10]
                                                                For $L = 0 To $aUBounds[11]
                                                                    For $m = 0 To $aUBounds[12]
                                                                        $aArray[$a][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m]
                                                                    Next
                                                                Next
                                                            Next
                                                        Next
                                                    Next
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 14
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    For $i = 0 To $aUBounds[8]
                                                        For $j = 0 To $aUBounds[9]
                                                            For $k = 0 To $aUBounds[10]
                                                                For $L = 0 To $aUBounds[11]
                                                                    For $m = 0 To $aUBounds[12]
                                                                        For $n = 0 To $aUBounds[13]
                                                                            $aArray[$a][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n]
                                                                        Next
                                                                    Next
                                                                Next
                                                            Next
                                                        Next
                                                    Next
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 15
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    For $i = 0 To $aUBounds[8]
                                                        For $j = 0 To $aUBounds[9]
                                                            For $k = 0 To $aUBounds[10]
                                                                For $L = 0 To $aUBounds[11]
                                                                    For $m = 0 To $aUBounds[12]
                                                                        For $n = 0 To $aUBounds[13]
                                                                            For $o = 0 To $aUBounds[14]
                                                                                $aArray[$a][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o]
                                                                            Next
                                                                        Next
                                                                    Next
                                                                Next
                                                            Next
                                                        Next
                                                    Next
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 16
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    For $i = 0 To $aUBounds[8]
                                                        For $j = 0 To $aUBounds[9]
                                                            For $k = 0 To $aUBounds[10]
                                                                For $L = 0 To $aUBounds[11]
                                                                    For $m = 0 To $aUBounds[12]
                                                                        For $n = 0 To $aUBounds[13]
                                                                            For $o = 0 To $aUBounds[14]
                                                                                For $p = 0 To $aUBounds[15]
                                                                                    $aArray[$a][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p]
                                                                                Next
                                                                            Next
                                                                        Next
                                                                    Next
                                                                Next
                                                            Next
                                                        Next
                                                    Next
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 17
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    For $i = 0 To $aUBounds[8]
                                                        For $j = 0 To $aUBounds[9]
                                                            For $k = 0 To $aUBounds[10]
                                                                For $L = 0 To $aUBounds[11]
                                                                    For $m = 0 To $aUBounds[12]
                                                                        For $n = 0 To $aUBounds[13]
                                                                            For $o = 0 To $aUBounds[14]
                                                                                For $p = 0 To $aUBounds[15]
                                                                                    For $q = 0 To $aUBounds[16]
                                                                                        $aArray[$a][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p][$q] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p][$q]
                                                                                    Next
                                                                                Next
                                                                            Next
                                                                        Next
                                                                    Next
                                                                Next
                                                            Next
                                                        Next
                                                    Next
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 18
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    For $i = 0 To $aUBounds[8]
                                                        For $j = 0 To $aUBounds[9]
                                                            For $k = 0 To $aUBounds[10]
                                                                For $L = 0 To $aUBounds[11]
                                                                    For $m = 0 To $aUBounds[12]
                                                                        For $n = 0 To $aUBounds[13]
                                                                            For $o = 0 To $aUBounds[14]
                                                                                For $p = 0 To $aUBounds[15]
                                                                                    For $q = 0 To $aUBounds[16]
                                                                                        For $r = 0 To $aUBounds[17]
                                                                                            $aArray[$a][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p][$q][$r] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p][$q][$r]
                                                                                        Next
                                                                                    Next
                                                                                Next
                                                                            Next
                                                                        Next
                                                                    Next
                                                                Next
                                                            Next
                                                        Next
                                                    Next
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 19
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    For $i = 0 To $aUBounds[8]
                                                        For $j = 0 To $aUBounds[9]
                                                            For $k = 0 To $aUBounds[10]
                                                                For $L = 0 To $aUBounds[11]
                                                                    For $m = 0 To $aUBounds[12]
                                                                        For $n = 0 To $aUBounds[13]
                                                                            For $o = 0 To $aUBounds[14]
                                                                                For $p = 0 To $aUBounds[15]
                                                                                    For $q = 0 To $aUBounds[16]
                                                                                        For $r = 0 To $aUBounds[17]
                                                                                            For $s = 0 To $aUBounds[18]
                                                                                                $aArray[$a][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p][$q][$r][$s] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p][$q][$r][$s]
                                                                                            Next
                                                                                        Next
                                                                                    Next
                                                                                Next
                                                                            Next
                                                                        Next
                                                                    Next
                                                                Next
                                                            Next
                                                        Next
                                                    Next
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 20
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    For $i = 0 To $aUBounds[8]
                                                        For $j = 0 To $aUBounds[9]
                                                            For $k = 0 To $aUBounds[10]
                                                                For $L = 0 To $aUBounds[11]
                                                                    For $m = 0 To $aUBounds[12]
                                                                        For $n = 0 To $aUBounds[13]
                                                                            For $o = 0 To $aUBounds[14]
                                                                                For $p = 0 To $aUBounds[15]
                                                                                    For $q = 0 To $aUBounds[16]
                                                                                        For $r = 0 To $aUBounds[17]
                                                                                            For $s = 0 To $aUBounds[18]
                                                                                                For $t = 0 To $aUBounds[19]
                                                                                                    $aArray[$a][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p][$q][$r][$s][$t] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p][$q][$r][$s][$t]
                                                                                                Next
                                                                                            Next
                                                                                        Next
                                                                                    Next
                                                                                Next
                                                                            Next
                                                                        Next
                                                                    Next
                                                                Next
                                                            Next
                                                        Next
                                                    Next
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 21
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    For $i = 0 To $aUBounds[8]
                                                        For $j = 0 To $aUBounds[9]
                                                            For $k = 0 To $aUBounds[10]
                                                                For $L = 0 To $aUBounds[11]
                                                                    For $m = 0 To $aUBounds[12]
                                                                        For $n = 0 To $aUBounds[13]
                                                                            For $o = 0 To $aUBounds[14]
                                                                                For $p = 0 To $aUBounds[15]
                                                                                    For $q = 0 To $aUBounds[16]
                                                                                        For $r = 0 To $aUBounds[17]
                                                                                            For $s = 0 To $aUBounds[18]
                                                                                                For $t = 0 To $aUBounds[19]
                                                                                                    For $u = 0 To $aUBounds[20]
                                                                                                        $aArray[$a][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p][$q][$r][$s][$t][$u] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p][$q][$r][$s][$t][$u]
                                                                                                    Next
                                                                                                Next
                                                                                            Next
                                                                                        Next
                                                                                    Next
                                                                                Next
                                                                            Next
                                                                        Next
                                                                    Next
                                                                Next
                                                            Next
                                                        Next
                                                    Next
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 22
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    For $i = 0 To $aUBounds[8]
                                                        For $j = 0 To $aUBounds[9]
                                                            For $k = 0 To $aUBounds[10]
                                                                For $L = 0 To $aUBounds[11]
                                                                    For $m = 0 To $aUBounds[12]
                                                                        For $n = 0 To $aUBounds[13]
                                                                            For $o = 0 To $aUBounds[14]
                                                                                For $p = 0 To $aUBounds[15]
                                                                                    For $q = 0 To $aUBounds[16]
                                                                                        For $r = 0 To $aUBounds[17]
                                                                                            For $s = 0 To $aUBounds[18]
                                                                                                For $t = 0 To $aUBounds[19]
                                                                                                    For $u = 0 To $aUBounds[20]
                                                                                                        For $v = 0 To $aUBounds[21]
                                                                                                            $aArray[$a][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p][$q][$r][$s][$t][$u][$v] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p][$q][$r][$s][$t][$u][$v]
                                                                                                        Next
                                                                                                    Next
                                                                                                Next
                                                                                            Next
                                                                                        Next
                                                                                    Next
                                                                                Next
                                                                            Next
                                                                        Next
                                                                    Next
                                                                Next
                                                            Next
                                                        Next
                                                    Next
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 23
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    For $i = 0 To $aUBounds[8]
                                                        For $j = 0 To $aUBounds[9]
                                                            For $k = 0 To $aUBounds[10]
                                                                For $L = 0 To $aUBounds[11]
                                                                    For $m = 0 To $aUBounds[12]
                                                                        For $n = 0 To $aUBounds[13]
                                                                            For $o = 0 To $aUBounds[14]
                                                                                For $p = 0 To $aUBounds[15]
                                                                                    For $q = 0 To $aUBounds[16]
                                                                                        For $r = 0 To $aUBounds[17]
                                                                                            For $s = 0 To $aUBounds[18]
                                                                                                For $t = 0 To $aUBounds[19]
                                                                                                    For $u = 0 To $aUBounds[20]
                                                                                                        For $v = 0 To $aUBounds[21]
                                                                                                            For $w = 0 To $aUBounds[22]
                                                                                                                $aArray[$a][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p][$q][$r][$s][$t][$u][$v][$w] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p][$q][$r][$s][$t][$u][$v][$w]
                                                                                                            Next
                                                                                                        Next
                                                                                                    Next
                                                                                                Next
                                                                                            Next
                                                                                        Next
                                                                                    Next
                                                                                Next
                                                                            Next
                                                                        Next
                                                                    Next
                                                                Next
                                                            Next
                                                        Next
                                                    Next
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
            Case 24
                For $a = $iStart To $iEnd
                    If .Item($a) <> $a Then
                        For $b = 0 To $aUBounds[1]
                            For $c = 0 To $aUBounds[2]
                                For $d = 0 To $aUBounds[3]
                                    For $e = 0 To $aUBounds[4]
                                        For $f = 0 To $aUBounds[5]
                                            For $g = 0 To $aUBounds[6]
                                                For $h = 0 To $aUBounds[7]
                                                    For $i = 0 To $aUBounds[8]
                                                        For $j = 0 To $aUBounds[9]
                                                            For $k = 0 To $aUBounds[10]
                                                                For $L = 0 To $aUBounds[11]
                                                                    For $m = 0 To $aUBounds[12]
                                                                        For $n = 0 To $aUBounds[13]
                                                                            For $o = 0 To $aUBounds[14]
                                                                                For $p = 0 To $aUBounds[15]
                                                                                    For $q = 0 To $aUBounds[16]
                                                                                        For $r = 0 To $aUBounds[17]
                                                                                            For $s = 0 To $aUBounds[18]
                                                                                                For $t = 0 To $aUBounds[19]
                                                                                                    For $u = 0 To $aUBounds[20]
                                                                                                        For $v = 0 To $aUBounds[21]
                                                                                                            For $w = 0 To $aUBounds[22]
                                                                                                                For $x = 0 To $aUBounds[23]
                                                                                                                    $aArray[$a][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p][$q][$r][$s][$t][$u][$v][$w][$x] = $aTmp[.Item($a)][$b][$c][$d][$e][$f][$g][$h][$i][$j][$k][$L][$m][$n][$o][$p][$q][$r][$s][$t][$u][$v][$w][$x]
                                                                                                                Next
                                                                                                            Next
                                                                                                        Next
                                                                                                    Next
                                                                                                Next
                                                                                            Next
                                                                                        Next
                                                                                    Next
                                                                                Next
                                                                            Next
                                                                        Next
                                                                    Next
                                                                Next
                                                            Next
                                                        Next
                                                    Next
                                                Next
                                            Next
                                        Next
                                    Next
                                Next
                            Next
                        Next
                    EndIf
                Next
        EndSwitch

 

 

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 here
RegExp tutorial: enough to get started
PCRE 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

@jchd Thanks, I understand now. Multi-dimensional arrays are tricky beasts... and it is easy to confuse them with nested arrays, I have made that mistake before 😕

There is also an ambiguity in the array definition/declaration syntax which arises due to this... maybe the solution is to not have multi-dimensional arrays and only have nested arrays (like how it works in C)? I have no idea about the pros and cons.

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

No! Nested Arrays in AutoIt are even worse. A decent high-level language requires multi-dim arrays as well as other types of containers like lists with efficient functions to manipulate them.

C arrays are just a convention for pointer manipulation. Hopefully pointers in AutoIt are of very restricted use.

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 here
RegExp tutorial: enough to get started
PCRE 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

3 hours ago, jchd said:

No! Nested Arrays in AutoIt are even worse.

At the moment yes, but if we could eliminate multi-dimensional arrays we could easily adopt the syntax to access nested arrays.

3 hours ago, jchd said:

A decent high-level language requires multi-dim arrays as well as other types of containers like lists with efficient functions to manipulate them.

That sounds about right to me, maybe we can draw inspiration from other high-level languages.

3 hours ago, jchd said:

C arrays are just a convention for pointer manipulation. Hopefully pointers in AutoIt are of very restricted use.

Pointers are both a blessing and a curse, I hated them in the beginning but I love them for the flexibility they offer in C now... so I am a bit biased. But I do agree that they should not have a role in high-level languages like AutoIt.

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

I voted negative but why not simply start with a trial based on ANTLR. You will learn a lot about compiler implementation

It will build you quickly a multiplatform lexer and parser and from there you can see which support you want to build in multi platform

I am on the negative side due to the linkage from AutoIt to windows with some huge UDF's build over the years

  • send/post message stuff
  • COM
  • .Net integration
  • Office udf's
  • UIAutomation UDF
  • Different IDE's available
  • .....

I already have powershell and bash running on win and linux so scripting possibilities enough.

Link to comment
Share on other sites

6 hours ago, junkew said:

start with a trial based on ANTLR. You will learn a lot about compiler implementation 

I reckon I will :)

I am still doing research on the best way to implement the parser, thanks for the advice, I will keep that software in my mind.

6 hours ago, junkew said:

I am on the negative side due to the linkage from AutoIt to windows with some huge UDF's build over the years 

  • send/post message stuff 
  • COM
  • .Net integration
  • Office udf's
  • UIAutomation UDF
  • Different IDE's available
  • .....

I already have powershell and bash running on win and linux so scripting possibilities enough.

That is something which is inevitable, no doubt many would miss the very convenient features Windows offers, but if you need to go cross-platform you will have to stick to the very basics. We still have awesome features like a simple easy to understand syntax which just works :D

 

The idea is to not port the whole of AutoIt to Linux, that would be impossible (as several others have said earlier). The goal is to have a simple scripting language like AutoIt in Linux, so you that can write your own scripts to your own things without having to resort to complex scripting and platform-dependent stuff.

Maybe I should clarify my intentions by amending my first post? I see that many people are against this simply because Windows-specific things would break...

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

3 hours ago, TheDcoder said:

many would miss the very convenient features Windows offers, but if you need to go cross-platform you will have to stick to the very basics.

You can go beyond "very basic" features!

3 hours ago, TheDcoder said:

The goal is to have a simple scripting language like AutoIt in Linux, so you that can write your own scripts to your own things without having to resort to complex scripting and platform-dependent stuff.

If you base your work on free QT for instance you can really become platform-independant yet offer a very wide range of features comparable with what you come from. The general design would be pretty similar to AutoIt but portable: a C++ core wrapped in a more user-friendly scripting language (interpreted, byte-coded or compiled, pick your choice.) Targets can then be desktop Win_xx, Linux, Mac OS, Android, IOS, Win CE, QNX, ... and offer essentially the same functions, look & feel and coding.

That path would certainly drive you many more enthousiast contributors than just producing a bare-bones language without all the bells and whistles users need in practice.

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 here
RegExp tutorial: enough to get started
PCRE 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

54 minutes ago, jchd said:

You can go beyond "very basic" features!

I admit that it was an exaggeration, the more accurate description is "basic and common" features :D

56 minutes ago, jchd said:

If you base your work on free QT

Is that a language? Or are you referring to the framework? I recall there being some BASIC language which was based on the Qt framework... or maybe the KDE framework, cannot recall the details at the moment.

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

I clearly mean the framework: https://www.qt.io/download
There, expand the "Essentials", "Additional features" and "Tools" items to see what's in the free box. Beyond that you have a large live contributing community.

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 here
RegExp tutorial: enough to get started
PCRE 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

9 minutes ago, jchd said:

I clearly mean the framework

There is something called KBasic, which eerily sounds similar to what you are describing:

Quote

KBasic uses Qt(R) as its toolkit to provide cross-platform abilities. Qt(R) is the best C++ cross-platform toolkit available

That is what I was recalling in my last post. The language itself seem to be poorly maintained... On top of that, there seems to be a successor to it called "Basic For Qt®" (Yes, including the registered trademark)

Either way, both of them are not free (except for the Linux version of KBasic, which appears to be free). I am not really interested in going down the route of using frameworks just for the sake of that.

 

With time, we can maybe even (*cough*)fork the AutoIt language to add additional features, but that is not the primary goal nor do I have the skills to do it at the moment.

EasyCodeIt - A cross-platform AutoIt implementation - Fund the development! (GitHub will double your donations for a limited time)

DcodingTheWeb Forum - Follow for updates and Join for discussion

Link to comment
Share on other sites

  • TheDcoder changed the title to A cross-platform implementation of the AutoIt language

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...