Sign in to follow this  
Followers 0
GreatBarrier86

Support for running AutoItX without all overloads

3 posts in this topic

Hi,

I tried out AutoItX today in my C# environment and i noticed that unlike native AutoIT development, this version requires that you use all the available overloads. For instance, in SciTE, you could just do WinWaitActive("Network Connections"), but in C#, i had to do AutoIT.WinWaitActive("NetworkConnections", "Network", 10"). The problem is, i dont need the last two overloads. Is there a way around this? or is this a limitation of C#?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

I tried out AutoItX today in my C# environment and i noticed that unlike native AutoIT development, this version requires that you use all the available overloads. For instance, in SciTE, you could just do WinWaitActive("Network Connections"), but in C#, i had to do AutoIT.WinWaitActive("NetworkConnections", "Network", 10"). The problem is, i dont need the last two overloads. Is there a way around this? or is this a limitation of C#?

It's the same in VBS/WSH., but I wouldn't say "... overload" to it.

Otherwise you can leave out "(", ")" and you can write different commands in one line,

what is especially helpfull for much sleep and send statements :-)

HTH, Reinhard

Edited by ReFran

Share this post


Link to post
Share on other sites

ReFran, overloading is a technique where multiple functions can share the same name but differ by parameters.

GreatBarrier86, the functions aren't actually overloaded, but have optional parameters. C# does not have a mechanism for optional parameters. Neither do COM objects, as far as I know.

Share this post


Link to post
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
Sign in to follow this  
Followers 0