AutoHotkey Community

It is currently May 27th, 2012, 6:19 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: December 2nd, 2010, 5:22 pm 
Offline

Joined: September 23rd, 2005, 8:18 pm
Posts: 55
I was very glad to see that Autohotkey L has support for objects. I however wonder if it's possible to return objects from functions.

I tried the following code with no success.


ObjRet(param1)

msgbox, % obj["test"]


ObjRet(param1)
{

obj := Object()
obj["test"] := "test1"

return obj


}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 2nd, 2010, 5:44 pm 
Well yeah - but you need to store the returned value :wink: :
Code:
obj := ObjRet(param1)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 2nd, 2010, 7:06 pm 
Offline

Joined: September 23rd, 2005, 8:18 pm
Posts: 55
Sorry complete brain lapse there sorry about that :)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: hd0202 and 56 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group