Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 04:40

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



What things you are missing in AutoIt?

Discussion on What things you are missing in AutoIt? within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
Shadow992's Avatar
 
elite*gold: 77
Join Date: May 2008
Posts: 5,430
Received Thanks: 5,878
What things you are missing in AutoIt?

Heyho guys,

This time I am interested in a really basic question:

"What things are you missing in AutoIt?"

This question does not mean "What can we do with all kinds of UDF and should be implemented native in AutoIt" but it does mean:
"What is not possible with a standard AutoIt installation but should be possible?"

So the question basically ask for "if you would be able to improve AutoIt, what would you improve?"

Things I am missing are e.g.
- Multithreading is not possible or just very unstable
- AutoIt is kind a slow
- Using classes is not possible (or just with much overhead by using UDFs)


The reason for this question is that my "own AutoIt-Language" will soon be releaseable in alpha version.
But until I release it I want to add/take care of as many things as possible.

Also reporting things like:
"It is stupid that it reads: 'EndSelect', 'EndFunc', etc. but 'WEnd' and 'Next' and not 'EndWhile' etc. "
will help me.

So just tell me what you would improve if you could do it.

Thanks in advance
Shadow992 is offline  
Thanks
3 Users
Old 09/12/2015, 13:31   #2
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
They DEFINETELY should change the handling of the variables. Let me provide an example
Code:
_GUICtrlListView_GetItemText($hWnd, $iIndex)

That function retrieves the Text of the first column of a ListView-Item.
Normally people would use it this way:

$iIndex = _GUICtrlListView_GetSelectedIndices($hWnd)
_GUICtrlListview_GetItemText($hWnd, $iIndex)
The thing is that GetItemText needs an Integer and GetSelectedIndices returns a string (even if only one Item is clicked).
I spend one hour yesterday to fix the problem and I wondered why a standard 0 was working but the 0 from the GetSelectedIndices wasn't and then I figured with VarGetType out that GetSelectedIndices returns a string.
They should notify you which types of variables the functions need also some poor documentation should be fixed.

ControlCommand with DelString for example doesn't Delete a String specified by the string itself but by the index of the string in the ListBox / ComboBox.
ControlCommand with SearchString instead searches for the String given by the user and doesn't retrieve the string by a given index.

They definitely should make tighter options for similar functions so we don't have to learn various things.
alpines is offline  
Thanks
2 Users
Old 09/12/2015, 14:08   #3
 
Shadow992's Avatar
 
elite*gold: 77
Join Date: May 2008
Posts: 5,430
Received Thanks: 5,878
Quote:
Originally Posted by alpines View Post
They DEFINETELY should change the handling of the variables. Let me provide an example
Code:
_GUICtrlListView_GetItemText($hWnd, $iIndex)

That function retrieves the Text of the first column of a ListView-Item.
Normally people would use it this way:

$iIndex = _GUICtrlListView_GetSelectedIndices($hWnd)
_GUICtrlListview_GetItemText($hWnd, $iIndex)
The thing is that GetItemText needs an Integer and GetSelectedIndices returns a string (even if only one Item is clicked).
I spend one hour yesterday to fix the problem and I wondered why a standard 0 was working but the 0 from the GetSelectedIndices wasn't and then I figured with VarGetType out that GetSelectedIndices returns a string.
They should notify you which types of variables the functions need also some poor documentation should be fixed.

ControlCommand with DelString for example doesn't Delete a String specified by the string itself but by the index of the string in the ListBox / ComboBox.
ControlCommand with SearchString instead searches for the String given by the user and doesn't retrieve the string by a given index.

They definitely should make tighter options for similar functions so we don't have to learn various things.
This is a really good point.
Variable handling is quite bad in AutoIt but this is already better (I think) in my early version of interpreter and also the inconsistency of syntax/functions is a big problem I think. There are many things you did not expect.

E.g. Why ist this possible?
Code:
$var = StringSplit(...)
But this is not possible:
Code:
$var[0] = StringSplit(...)
Exactly these are the things I am interested in.

Just to clarify.
My goal is not to create a new AutoIt-Interpreter.
My goal is to create a languag that is as easy to read/understand as AutoIt. But tries to provide more "basic" features which you cant change because AutoIt is closed source (e.g. multithreading, syntax changes, array access, speed, classes, compilation, sourcecode protection, etc.).

This means also that improvements for concrete "commands" are not that "important" because if you report:
"The command Send should also be able to handle UTF8 correctly"
It will maybe not help me because maybe I even wont implement Send itself (of cause Send was a bad example because I will for sure implement it, but I took it as example due to the fact everyone knows Send).

I am looking forward to more answers.
Shadow992 is offline  
Old 09/12/2015, 22:00   #4

 
Moneypulation's Avatar
 
elite*gold: 138
Join Date: Apr 2012
Posts: 3,494
Received Thanks: 1,769
Quote:
Originally Posted by Shadow992 View Post
Things I am missing are e.g.
- Multithreading is not possible or just very unstable
- AutoIt is kind a slow
You already mentioned both of my biggest problems with AutoIt
Another nice thing would be if the program wasn't easy to decompile to make sure the code is safe. I'll write more down if any ideas come to mind
Moneypulation is offline  
Thanks
2 Users
Old 09/12/2015, 22:28   #5
 
Shadow992's Avatar
 
elite*gold: 77
Join Date: May 2008
Posts: 5,430
Received Thanks: 5,878
If

Quote:
Originally Posted by Moneypulation View Post
You already mentioned both of my biggest problems with AutoIt
Another nice thing would be if the program wasn't easy to decompile to make sure the code is safe. I'll write more down if any ideas come to mind
Because Ill use for my solution a "My Language" to "Bytecode" Compiler.
Ill get 2 big advantages:
1. The generated Bytecode will run much faster than the corresponding AutoIt-Code (at the moment SpeedUp of around 5-7)
2. Decompilation is really hard and the Bytecode cannot be decompiled to the origin Code. It is possible to get really near to the original Code (and even this means a lot of work) but it is impossible to get exactly the original Code.

These 3 things were the main reason I wanted to create something "new".

What about the Syntax, what would you prefer:

Solution 1 (original AutoIt-Syntax):
PHP Code:
While 1

Wend

If ... Then

EndIf 
Solution 2 (my current supported Syntax):

PHP Code:
While 1

EndWhile

If ...

EndIf 
Solution 3 (C/C++/Java/PHP like Syntax):

PHP Code:
While (1)
{

}

If (...)
{


I highly prefer Solution 2, because it will make it easier for beginners to understand/read Code and the Syntax is also more "consistency" than AutoIts but still easy to read.

But I am also looking forward to answers of other questions.

A few questions that also striked my attention were:

- Would it be really helpful if we could use real Inline-Assembler or will no one use it at all?
- Should escaping of characters be allowed (so \n means newline \r carriage return etc.) or should we prefer @CR and @LF?
- Should some "Anti-Hackshield-Detections" been implemented or will they soon get useless because everyone knows them then?
- Are the keywords "global" and "local" really needed? Or should we remove them?
- Do we need a x64 and a x86 version?
- Should we check "if index is out of bound" etc.? If yes this will slow down scripts quite a bit of cause. If not beginners may have got a hard time?
- Should it be able to overwrite "given/standard" functions? E.g. declare a function "MsgBox" and whenever you use "MsgBox" in your script it will call your declared function and not the "standard" one.
- Should we use a real IDE (or create one) or should we use something similiar to Scite, which is "just" an advanced Editor. I highly prefer an own solution but of cause someone would have to create it.

Maybe you have some more questions/suggestions.
Shadow992 is offline  
Old 09/13/2015, 03:21   #6
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
The reason they put a Then behind the If is because you can write one line if statements without the EndIf followed after it. If you divide each command by a semicolon then you don't need the Then though.
alpines is offline  
Thanks
1 User
Old 09/13/2015, 12:05   #7
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
Isnt be easier to make it
Code:
single line 

if ( things ) { #code }

multi line

if ( things ) {
  #code
}


if ( things ) {
 #code
} else if ( other ) {
 #code
}
like in php so simple

And KODA is missing few things too if u compare it with RAD studio or Visual Studio GUI makers.
mlukac89 is offline  
Thanks
1 User
Old 09/13/2015, 13:10   #8
 
alpines's Avatar
 
elite*gold: 60
Join Date: Aug 2009
Posts: 2,256
Received Thanks: 815
Quote:
Originally Posted by mlukac89 View Post
And KODA is missing few things too if u compare it with RAD studio or Visual Studio GUI makers.
You know that Koda isn't in development since 2010 anymore right?
alpines is offline  
Thanks
1 User
Old 09/13/2015, 16:49   #9
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104
I didnt know, but autoit real missing many stuff. I hate when u must use UDF that will slow your script down or eat ur memory for a simple things.

But the main thing is that hes very slow if u compare it with other languages and if u need it for a bigger project. And multithreading too.
mlukac89 is offline  
Thanks
1 User
Old 09/14/2015, 03:04   #10
 
[Beatrice]'s Avatar
 
elite*gold: LOCKED
Join Date: Oct 2014
Posts: 1,258
Received Thanks: 12,469
Inline Assembler would be used.
@CR and @LF is pretty okay atm
Overwriting the original functions is pretty good.
Hackshield detections can be fixed by the creator of the tool you don't have to add that.
I,myself don't use global and local but idk if someone would so you could just keep that.
X86 and x64 is no needed
Since its going to slow down the script, don't check it
Editor doesnt matter much but it'd be good if it showed the udf's and stuff as if they were original functions.
(What i mean is when you write msgbox it shows you how the function is used. If you could add the same for udf's it'd be awesome )

Aand the original autoit syntax is better in my opinion

Good job on it and keep it uup
[Beatrice] is offline  
Thanks
3 Users
Old 09/14/2015, 15:09   #11
 
mlukac89's Avatar
 
elite*gold: 0
Join Date: Sep 2010
Posts: 473
Received Thanks: 104

<- "X86 and x64 is no needed" its needed because autoit have so low protection on compiled code especaily if u compile it for x86. And x64 works faster on 64 bit systems.


About editor i founded one and its pretty nice, show u all functions when u click on it it goes there, show variables but i forgot name of it.

Ah here it is

https://www.autoitscript.com/forum/topic/136766-isn-autoit-studio/
mlukac89 is offline  
Thanks
1 User
Old 09/14/2015, 23:20   #12

 
Moneypulation's Avatar
 
elite*gold: 138
Join Date: Apr 2012
Posts: 3,494
Received Thanks: 1,769
Quote:
Originally Posted by Shadow992 View Post
Because Ill use for my solution a "My Language" to "Bytecode" Compiler.
Ill get 2 big advantages:
1. The generated Bytecode will run much faster than the corresponding AutoIt-Code (at the moment SpeedUp of around 5-7)
2. Decompilation is really hard and the Bytecode cannot be decompiled to the origin Code. It is possible to get really near to the original Code (and even this means a lot of work) but it is impossible to get exactly the original Code.

These 3 things were the main reason I wanted to create something "new".

What about the Syntax, what would you prefer:

Solution 1 (original AutoIt-Syntax):
PHP Code:
While 1

Wend

If ... Then

EndIf 
Solution 2 (my current supported Syntax):

PHP Code:
While 1

EndWhile

If ...

EndIf 
Solution 3 (C/C++/Java/PHP like Syntax):

PHP Code:
While (1)
{

}

If (...)
{


I highly prefer Solution 2, because it will make it easier for beginners to understand/read Code and the Syntax is also more "consistency" than AutoIts but still easy to read.

But I am also looking forward to answers of other questions.

A few questions that also striked my attention were:

- Would it be really helpful if we could use real Inline-Assembler or will no one use it at all?
- Should escaping of characters be allowed (so \n means newline \r carriage return etc.) or should we prefer @CR and @LF?
- Should some "Anti-Hackshield-Detections" been implemented or will they soon get useless because everyone knows them then?
- Are the keywords "global" and "local" really needed? Or should we remove them?
- Do we need a x64 and a x86 version?
- Should we check "if index is out of bound" etc.? If yes this will slow down scripts quite a bit of cause. If not beginners may have got a hard time?
- Should it be able to overwrite "given/standard" functions? E.g. declare a function "MsgBox" and whenever you use "MsgBox" in your script it will call your declared function and not the "standard" one.
- Should we use a real IDE (or create one) or should we use something similiar to Scite, which is "just" an advanced Editor. I highly prefer an own solution but of cause someone would have to create it.

Maybe you have some more questions/suggestions.
Sorry for responding so late :s

About the syntax, I prefer the first solution because I'm used to it but I wouldn't mind the second either. The third though has nothing to do with AutoIt The brackets are making the syntax just more complex. The nice thing about AutoIt is, that you can write and understand the code very quickly which stands in contrast to other languages that use those brackets.

- I haven't got into assembler languages yet, so I can't really answer that
- I would prefer @CR and @LF but it doesn't make a big difference if we use \r\n
- Not needed and that shouldn't be your job
- I think we need Global and Local or something to determine the accessibility of a variable
- No, just one compiled version should be enough
- Don't do anything that would slow it down Just print an error
- Well, you can just name your function different but why not
- A new IDE would be nice
Moneypulation is offline  
Thanks
1 User
Old 09/15/2015, 13:52   #13
 
YatoDev's Avatar
 
elite*gold: 50
Join Date: Sep 2012
Posts: 3,841
Received Thanks: 1,462
Quote:
Originally Posted by Moneypulation View Post
- I think we need Global and Local or something to determine the accessibility of a variable
1.) bin ich dagegen. es mag vielleicht sinnvoller erscheinen aber der scope steht ja schon beim deklarieren fest. es macht keinen sinn in funktionen Globale oder static variablen zu deklarieren.

2.) für klassen solltest du die bezeichner public und private hinzufügen und jenachdem auch static( ich bin ein großer fan von c# )
klassen sollten objektorientier sein, der rest aber nicht.
(falls du welche implementieren möchtest)

3.) Die 2. syntax halt ich für besser.

4.) Makros wie @CRLF könnte man als programmierer evtl selber erstellen. so das man einem Makro eine funktion oder einen beliebigen datentyp zuordnet.
Die makros müsstest du dann auch nicht hardcoden sondern könntest diese interpretieren lassen.

5.) x86 sollte reichen
YatoDev is offline  
Thanks
2 Users
Old 09/15/2015, 22:23   #14
 
elite*gold: 0
Join Date: Jul 2009
Posts: 211
Received Thanks: 137
Quote:
Originally Posted by Shadow992 View Post
I highly prefer Solution 2, because it will make it easier for beginners to understand/read Code[...]
I prefer solution 3 the braces are much faster to write and you don't need to remeber all those extra keywords.


Quote:
Originally Posted by Shadow992 View Post
- Should escaping of characters be allowed (so \n means newline \r carriage return etc.) or should we prefer @CR and @LF?
Why not both?

Quote:
Originally Posted by Shadow992 View Post
- Are the keywords "global" and "local" really needed? Or should we remove them?
If you refer to global class variables and functions I really like the way scala implemented it. Beside the normal class you can create an object (if you have a class and an object with the same object it's refered to as "companion object"). Those objects are always singletons and thus allows a clean separation.
Here is a short example (in scala syntax) that increase an ID everytime an object is created:
PHP Code:
class C
{
    
val ownID C.getID
}

object C
{
   private var 
id //type is Int
   
private def getID = {idid+1;id}


Quote:
Originally Posted by Shadow992 View Post
- Should we check "if index is out of bound" etc.? If yes this will slow down scripts quite a bit of cause. If not beginners may have got a hard time?
Isn't it possible to include those checks and disable them with a flag if needed?

Quote:
Originally Posted by Shadow992 View Post
- Should we use a real IDE (or create one) or should we use something similiar to Scite, which is "just" an advanced Editor. I highly prefer an own solution but of cause someone would have to create it.
You could use eclipse and create a plugin for the language. Even though a lot think that this IDE is overkill I really like it.

Quote:
Originally Posted by Shadow992 View Post
Maybe you have some more questions/suggestions.
I really like scala and certain concepts of haskell so I have a few things I would definitely miss in other languages (after using scala I see no reason to switch back to java :P )). You might find something usefull.

- In scala you can create variables with val and var.
Variables declared with val are final and therefore immutable var is the opposite and can be changed later.

- Usefull pattern matching! I don't know how I managed to live without it in java.

- I don't know if you really need this. In scala "lazy val" variables are evaluated when they are first accessed. This might sound useless but you can compute complex things later and create complex structures.

- Overloading operators

- Build in tuples; sounds stupid but I find those quite usefull


The following are just concepts I really like and you might find usefull.

- Using a wrapper to return null rather than returning null directly. In scala you can return an "Option" which can contains something or nothing. This can reduce the nullpointer accesses since you need to check first if your value is defined or empty.

- Implicit functions and classes; This is just syntactic sugar but can improve the readability of the source. For example imagine the following pseudo code:
PHP Code:
main
{
    var 
5  //type integer
    
expectString(x
   
/*
      even though this function expects a String you can pass an Int. The compiler looks for implicit functions 
      and calls those first this  expectString(x) can be expanded to  expectString(makeMyIntToString(x)) 
  */
}

def expectString(strString)=println(str)


implicit def makeMyIntToString(valInt) = val.asString 
Mysthik is offline  
Thanks
1 User
Old 09/22/2015, 20:28   #15
 
fuso98's Avatar
 
elite*gold: 428
Join Date: Dec 2011
Posts: 2,722
Received Thanks: 2,035
Quote:
Originally Posted by Shadow992 View Post
Because Ill use for my solution a "My Language" to "Bytecode" Compiler.
Ill get 2 big advantages:
1. The generated Bytecode will run much faster than the corresponding AutoIt-Code (at the moment SpeedUp of around 5-7)
2. Decompilation is really hard and the Bytecode cannot be decompiled to the origin Code. It is possible to get really near to the original Code (and even this means a lot of work) but it is impossible to get exactly the original Code.

These 3 things were the main reason I wanted to create something "new".

What about the Syntax, what would you prefer:

Solution 1 (original AutoIt-Syntax):
PHP Code:
While 1

Wend

If ... Then

EndIf 
Solution 2 (my current supported Syntax):

PHP Code:
While 1

EndWhile

If ...

EndIf 
Solution 3 (C/C++/Java/PHP like Syntax):

PHP Code:
While (1)
{

}

If (...)
{


I highly prefer Solution 2, because it will make it easier for beginners to understand/read Code and the Syntax is also more "consistency" than AutoIts but still easy to read.

But I am also looking forward to answers of other questions.

A few questions that also striked my attention were:

- Would it be really helpful if we could use real Inline-Assembler or will no one use it at all?
- Should escaping of characters be allowed (so \n means newline \r carriage return etc.) or should we prefer @CR and @LF?
- Should some "Anti-Hackshield-Detections" been implemented or will they soon get useless because everyone knows them then?
- Are the keywords "global" and "local" really needed? Or should we remove them?
- Do we need a x64 and a x86 version?
- Should we check "if index is out of bound" etc.? If yes this will slow down scripts quite a bit of cause. If not beginners may have got a hard time?
- Should it be able to overwrite "given/standard" functions? E.g. declare a function "MsgBox" and whenever you use "MsgBox" in your script it will call your declared function and not the "standard" one.
- Should we use a real IDE (or create one) or should we use something similiar to Scite, which is "just" an advanced Editor. I highly prefer an own solution but of cause someone would have to create it.

Maybe you have some more questions/suggestions.
- Would it be really helpful if we could use real Inline-Assembler or will no one use it at all? YES.
- Should escaping of characters be allowed (so \n means newline \r carriage return etc.) or should we prefer @CR and @LF? I think that if is possible include both mode, with a macro like @cr or directly in the string like \n.
- Should some "Anti-Hackshield-Detections" been implemented or will they soon get useless because everyone knows them then? I really don't know
- Are the keywords "global" and "local" really needed? Or should we remove them? I think that they help the code to be easily to read, also in the debug phase
- Do we need a x64 and a x86 version? I think yes
- Should we check "if index is out of bound" etc.? If yes this will slow down scripts quite a bit of cause. If not beginners may have got a hard time? I don't understand this
- Should it be able to overwrite "given/standard" functions? E.g. declare a function "MsgBox" and whenever you use "MsgBox" in your script it will call your declared function and not the "standard" one. YES!
- Should we use a real IDE (or create one) or should we use something similiar to Scite, which is "just" an advanced Editor. I highly prefer an own solution but of cause someone would have to create it. I think an own solution is the best way

About the syntax i prefer the PHP/C Like with brackets "{}" they make the code faster to write and don't make it confusing with thousands of keywords. Maybe a way to select an option to decide the syntax autoit like or C like

Also would be very very usefull to make more functions/method with the same name, but with diffents parameter. Based on the type of the param (string, int etc..) will be called a specific method/function.

Now I've a question: Did you implemented the Multithreading and also classes?
fuso98 is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
Autoit blocked? or missing something? - Archlord2
08/09/2014 - AutoIt - 2 Replies
Dear all, I'm exploring the possibilities of autoit, but i want to try it on Archlord2. The easy part is activating the gamescreen. But then nothing happens E.g, scrolling between enemies is made possible by TAB key, so my script is like: Sleep (1000) Send ("{tab}") Sleep (2000)
WTT THINGS ON DERI FOR THINGS ON GRACIA AND WTB GOLDTICKET/CRIT GAUDIUS !!!!!!!!!!!!!
07/08/2011 - Archlord Trading - 3 Replies
I HAVE SORCREALMS ON DERI POISON ARMOR 4 SLOTS 3/4 WITH LVL 5 STONES ZWAN BRACELTS DOUBLE CAST WITH 2 ashtals LIGHTNING SORCC CAP SPIRAL RING SHUTA RING 2 SLOT BIGLOS WITH CLOAK ELE LVL 5 AND LVL 4 ANGEL WINGS CLOAK LVL 6 IN NOOB NEC ^^ CAST RINGS ; LENS; TOAS ; CRIT RING WITH lvl 4 RING SPIRIT STONE AND MANY OTHER STUFF
WTT metin2 german things or account for your last chaos usa auzura things
05/20/2011 - Last Chaos Trading - 0 Replies
hello i want to trade my metin2 account or things on metin2 german ( server sobo ) for your last chaos usa auzura-eu things . who is intrested at this offer send me a personal message , there you can ask question abaout things , money or account ( can send screenshots too) =)
Autoit quellcode Hilfe--funcktion error..missing separator character after keywords
02/27/2009 - Rappelz - 9 Replies
Hey Leute Habe nen Problem Also mein bot sollte eignt laufen tut er aber nich ..keine ahnung wieso nach mouseclick schliest er automatisch .. hier mal der quellcode MouseClick ("left",536, 367)



All times are GMT +1. The time now is 04:41.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.