Greatwolf Posted January 2, 2007 Share Posted January 2, 2007 (edited) Hi all, Can we define our own datatypes for AutoIt? What I'm looking to do is associate multiple values for one variable but can't find anything in the AutoIt help file. I could use an array since the datatypes are probably the same but it won't look as nice. Basically I'm looking for something that would do the equivalent of class and struct in C/C++. If AutoIt has some language construct to allow for this then I can code like: $foobar.x = something here $foobar.y = something here Rather than code like this which isn't as nice: $foobar[0] = something here $foobar[1] = something here Thanks Edited January 2, 2007 by Greatwolf Link to comment Share on other sites More sharing options...
CoePSX Posted January 2, 2007 Share Posted January 2, 2007 You could use DllStructs. They're just the same as C style structs. [quote name='Valik' post='301213' date='Jan 31 2007, 10:36 PM']You seem to have a habit of putting things in the wrong place. I feel sorry for any female you attempt to have sex with.[/quote][font="Lucida Sans Unicode"]╔══════════════════════════════╗║░░██░░░░░░░░██░░███░░░████░░░█║║░█░░█░░██░░█░░█░█░░█░█░░░░█░█░║║░█░░░░█░░█░████░███░░░██░░░█░░║║░█░░█░█░░█░█░░░░█░░░░░░░█░█░█░║║░░██░░░██░░░██░░█░░░░███░█░░░█║╚══════════════════════════════╝[/font] Link to comment Share on other sites More sharing options...
herewasplato Posted January 2, 2007 Share Posted January 2, 2007 (edited) Edit: It is clear to me now - I don't understand your question. Welcome to the forum. Edited January 3, 2007 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Zedna Posted January 2, 2007 Share Posted January 2, 2007 Also look hereYour concept is Object-Oriented syntax which is on NOT Todo list. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Greatwolf Posted January 3, 2007 Author Share Posted January 3, 2007 Thanks for the reply. I'll check out Dllstructs and see how to use it. I dunno if what i'm looking for is really object-oriented per say. I mean it doesn't have anything to do with say including member functions or having member scope enforcement inside the datatype. All I'm looking to do here is to find a way to have a datatype be able to have multiple components and also for code readability. Thanks Link to comment Share on other sites More sharing options...
/dev/null Posted January 3, 2007 Share Posted January 3, 2007 Thanks for the reply. I'll check out Dllstructs and see how to use it. I dunno if what i'm looking for is really object-oriented per say. I mean it doesn't have anything to do with say including member functions or having member scope enforcement inside the datatype. All I'm looking to do here is to find a way to have a datatype be able to have multiple components and also for code readability.Thanksthere are no C-like structures in AutoIT. Just arrays, strings and "numbers".CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Uten Posted January 3, 2007 Share Posted January 3, 2007 Use a COM vbscript collection (Search for ObjCreate). Then you can awoid the array syntax. ptrex also have a tutorial on wsc in scripts that should enable you to use this syntax. The tradeof is that it ain't pure AutoIt anymore Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Richard Robertson Posted January 3, 2007 Share Posted January 3, 2007 Simple answer, no. You cannot create datatypes in AutoIt. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now