Jump to content

Recommended Posts

Posted

@JLogan3o13 This is supposed to the the official topic of the project, the other thread was just a discussion that I started before I planned to start work on it. And as I already mentioned, the other thread got too big and it is not very easy to get into for new readers.

So I hope to keep this thread cleaner and also offer a good overview in the first posts of this thread :)

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

Posted

Question:

Are there any intellectual property issues that could arise, vis a vis, Autoit?

Clearly, though Autoit is free, it’s not AFAIK open-source.  
OTOH, you’re not copying any source code, so there’s that.

But is the specification itself possibly something that can be protected?

Not trying to cause you trouble, just seems interesting...

Code hard, but don’t hard code...

Posted

@JockoDundee That's a good question! I am not a lawyer obviously but I will write my thoughts about it here.

As you have mentioned, I am not using any part of the source or binaries from AutoIt. But what I am doing is making a product which is similar to it... but AutoIt itself also shares similarities with other BASIC language, not to mention that it was open-sourced under GPL at one point, so there is that :)

Even if I am kind of in a gray area, I am acting in good faith and not ripping-off AutoIt for a quick buck, so I hope Jon and rest of the AutoIt team don't have any issue with my endeavor :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

Posted
  On 11/25/2020 at 10:10 AM, TheDcoder said:

but AutoIt itself also shares similarities with other BASIC language

Expand  

IP Lawyer on Cross-Examination: So to be clear, Mr. TheDcoder, you claim that your award winning  β€œEasyCodeIt” product is your own work, fashioned in the style of the BASIC family of languages perhaps, but distinctive nonetheless?

TheDcoder: Yes.

IP Lawyer: In that case, I’m sure you wouldn’t mind explaining a few of your design decisions.  Can you tell the court after you straightforwardly created functions such as MouseMove(), MouseClick() and MouseGetPos() , what did you call the function to determine when the mouse has been clicked?

TheDcoder:  If you’re referring to _IsPressed(β€œ01”), I can explain; you see the underscore means UDF, and if you know hex then...

IP Lawyer: A likely story.  Why don’t you explain why in the thirty plus Array functions, you have no _ArrayCompare() routine?

TheDcoder: Actually, I was just working on that...

IP Lawyer: Sure you were, pal. Ok, answer me this: Why did you make the WinSetState function work like this WinSetState($Hwnd, β€œβ€, @SW_SHOW) while reversing the arguments in the case of GuiSetState(@SW_SHOW, $Hwnd)?

TheDcoder: I like to mix it up?

IP Lawyer: Final question, what is the purpose of Dim?

TheDcoder: Nothing says BASIC like Dim!

Judge: Case dismissed!

Code hard, but don’t hard code...

Posted

LOL :lol:

By the way, I am not actually going to implement the Automation related functions, I want to create a general-purpose language which can be expanded by the user according to their needs (so there could be an UDF with those functions :D)

Should probably mention this in the first post :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

Posted

I am still working on the expression parser, the code is not complete but since it has almost been a week since the last update, so I thought I'd give you guys a sneak peak :)

Here is a screenshot with the graphical representation of an expression's parse tree:

cFZfkNb.png

The expression is pretty simple: 1 - 2 / 3 * 4

But the final result looks complex and huge because there are multiple layers of nodes for each bit of info... all thanks to C's strict type system, where you can't put anything anywhere like you usually would in a dynamically typed language like AutoIt.

Here is a snippet of the code (the expression parsing function) for those are interested:

  Reveal hidden contents

There are no doubt many bugs in there, and a lot of the stuff needs to be completed, but I will try to post weekly updates to show the progress.

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

Posted

Strict-typing is possibly your friend here, less weirdness, though more code, no?

  On 11/30/2020 at 11:38 PM, TheDcoder said:

But the final result looks complex and huge because there are multiple layers of nodes for each bit of info... all thanks to C's strict type system,

Expand  

Can you do it without recursion though?

Code hard, but don’t hard code...

Posted
  On 12/2/2020 at 3:13 AM, JockoDundee said:

Strict-typing is possibly your friend here, less weirdness, though more code, no?

Expand  

Indeed, that's one of the advantages of strict-typing, less ambiguity and surprises in the future :)

  On 12/2/2020 at 3:13 AM, JockoDundee said:

Can you do it without recursion though?

Expand  

I am not sure, I can think of a way to do this iteratively using goto but not sure if it would be enough to make it work. In any case, a recursive function is simpler in this case, so we can look into non-recursive approaches in the future if needed.

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

Posted
  On 12/2/2020 at 3:15 PM, TheDcoder said:

I am not sure, I can think of a way to do this iteratively using goto but not sure if it would be enough to make it work.

Expand  

My bad, I thought it wasn’t using recursion when I asked.  I looked but missed the final lines of code that you published.

*expression.operands[0].expression = expression_get(tokens, target_position);
*expression.operands[1].expression = expression_get(tokens + target_position + 1, 

so here it almost seems like the struct itself is recursively defined, though I know that’s not the case.
Are there just 2 elements to the operands array?

What is the difference between the tokens struct and the expressions struct?

Code hard, but don’t hard code...

Posted (edited)

@JockoDundee Ah I see. You are right that the struct isn't recursively defined (that's impossible in C), what I do is have a pointer for the same struct :)

  On 12/2/2020 at 11:58 PM, JockoDundee said:

Are there just 2 elements to the operands array?

Expand  

Technically it is not an array, it is just a pointer to an operand structure, but thanks to pointer arithmetic in C, we can treat it like an array if we allocate enough space to contain multiple structures. The number of elements is supposed to derived from the operation, so for example with OP_ADD (which is binary addition: 1 + 2) the code would assume 2 elements.

There can be any number of operands (or arguments) for an operation, but we only use a maximum of 3 (the conditional `?:` operator takes 3 arguments, which is also why it is called the ternary operator).

  On 12/2/2020 at 11:58 PM, JockoDundee said:

What is the difference between the tokens struct and the expressions struct?

Expand  

A "Token" represents an individual unit/value in the code, while an "Expression" represents a set of operations that are done on these tokens. In simple English, tokens are the numbers and symbols while the expression is the whole equation :D

Edited by TheDcoder
Add link to pointer arithmetic

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

Posted (edited)
  On 12/7/2020 at 3:46 PM, Nine said:

Look in my signature for it...

Expand  

Trying not to have to FileInstall dlls currently. I don't need high speed, the function is rarely called, but when it does I need it to be able to accurately represent a bitmask. Currently trying to manually code it myself but running into an issue where there's some loose typing shenanigans and the math breaks.

The string value is right but not the variable value

Edited by rcmaehl

My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.

My Projects

WhyNotWin11
Cisco FinesseGithubIRC UDFWindowEx UDF

 

Posted (edited)
  On 12/7/2020 at 5:27 PM, rcmaehl said:

Trying not to have to FileInstall dlls currently. I don't need high speed, the function is rarely called, but when it does I need it to be able to accurately represent a bitmask.

Expand  

Then use my slow script :

  Reveal hidden contents

 

Edited by Nine
corrected small bugs and streamlined code

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
Γ—
Γ—
  • Create New...