Jump to content

Learning other languages


Go to solution Solved by Werty,

Recommended Posts

HI have been using autoit for many years now.. and am decent with it and its been a pleasure to work with.

I can just make a folder.. toss a few .au3 files into it and click f5 and bam.. i have a GUI interacting with functions I can test.. before other programmers even have their IDE loaded.. 

Recently i wanted to make some web-based sites with websockets.. and so I started learning javascript/nodejs..... and its been a headache.. As a solo programmer I love to know what every single thing does in my code... the package manager feels awful to me and is so slow.... theres all these prompts/errors files that generate and I have no idea if they are even used.. ect. The syntax is a nightmare.. and it keeps changing.. callbacks/asynch/await.. a new frontend library every day.. typescript blah blah.. all stuff I really dont want to learn.

 

My question is.. have any of you autoit programmers found a 2nd language to use that you would recommend?

I want speed/ease of use.. I dont want to launch a giant IDE from microsoft.  

I want to be able to work with Websockets.. SO maybe my only options are python, C++ and nodejs.

Since i have to learn htlm/css.. it feels like nodejs is the best choice...maybe this is jsut a dumb rant.. and ill go back to learning nodejs using chatgpt.

 

 

 

 

 

Edited by SanityChecker
Link to comment
Share on other sites

Hi @SanityChecker,

this is indeed a interesting question, because it depends on what you want to do or plan to do now and in the future.
Personally I can suggest GO (Go lang) and Lua besides AutoIt 😀 .

With Go you can handle almost everything in a more scripting way of programming (like AutoIt), but of course with many common (modern) design patterns and good practices. It's also not the badest choice when it comes to handling WEB stuff.

Lua is also pretty nice, but not really a substitute for JavaScript (Typescript) and node.js. I guess if you really want to do more frontend related programs, node.js is a proper way to go. Otherwise you can have a look at Deno as a substitute for node.js.

C# would also fulfill almost ever needs, but the syntax is quite different (if you're looking for similarities to AutoIt).

💡 My personal conclusion:
If you are not depending on trends or the biggest support base like you would have with C# (.NET), then go with GO (Go lang) 😅 .

I am sure several folks here will recommend different languages, because it really depends on you and the "now" and the "future".

Best regards
Sven

Edited by SOLVE-SMART

Stay innovative!

Spoiler

🌍 Au3Forums

🎲 AutoIt (en) Cheat Sheet

📊 AutoIt limits/defaults

💎 Code Katas: [...] (comming soon)

🎭 Collection of GitHub users with AutoIt projects

🐞 False-Positives

🔮 Me on GitHub

💬 Opinion about new forum sub category

📑 UDF wiki list

✂ VSCode-AutoItSnippets

📑 WebDriver FAQs

👨‍🏫 WebDriver Tutorial (coming soon)

Link to comment
Share on other sites

6 hours ago, SanityChecker said:

I want to be able to work with Websockets

that's TCP so, you're looking for a websocket library or a coding language that has one already build and ready to use. Otherwise you'd stay with AutoIt, right ?

Edited by argumentum
added link

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

  • Solution
On 2/28/2023 at 8:11 AM, SanityChecker said:

I want speed/ease of use.. I dont want to launch a giant IDE from microsoft.  

I use TCC (Tiny C Compiler) together with autoit, it's very small and commandline no IDE, i dont know about sockets, but a quick glance at google shows there's plenty about websockets using C available.

TinyCC: https://bellard.org/tcc/

Example of usage with autoit...

Spoiler
#include <GDIPlus.au3>

Global Static $CountColorDll = DllOpen("CountColor.dll")
Global $hImage, $iLeft = 0, $iTop = 0, $iRight = 1100, $iBottom = 600, $hPixels, $Count = 0, $Color = 0xFFd05e5e

_GDIPlus_Startup()
$hImage = _GDIPlus_BitmapCreateFromFile("image.png")

$Count = _CountColor($hImage, $Color)

_GDIPlus_Shutdown()
ConsoleWrite("Amount of " & Hex($Color, 8) & " = " & $Count & @crlf)

Func _CountColor(ByRef $hImage, $Color)
    $Pixels = _GDIPlus_BitmapLockBits($hImage, $iLeft, $iTop, $iRight, $iBottom, $GDIP_ILMREAD, $GDIP_PXF32ARGB)
    $aRet = DllCall($CountColorDLL, "int:cdecl", "CountColor", "ptr", $Pixels.Scan0, "int", ($iRight-$iLeft)*($iBottom-$iTop), "int", $Color)
    _GDIPlus_BitmapUnlockBits($hImage, $Pixels)
    _GDIPlus_BitmapDispose($hImage)
    Return $aRet[0]
 EndFunc

#cs
===================================================================================================
C code for the DLL, compile with 'Tiny C Compiler' (TCC) https://bellard.org/tcc/

tcc -shared CountColor.c
===================================================================================================
#include <stdlib.h>

__declspec(dllexport) int CountColor(int* pixel, int len, int color) {
    int i, count = 0;
    for(i=0;i<len;i++){if(pixel[i]==color){count+=1;}}
return count;}
===================================================================================================
#ce

 

 

Edited by Werty

Some guy's script + some other guy's script = my script!

Link to comment
Share on other sites

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...