AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Menu wrapper library
Goto page Previous  1, 2, 3, 4, 5, 6
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
animeaime



Joined: 04 Nov 2008
Posts: 1046

PostPosted: Fri Feb 20, 2009 4:37 am    Post subject: Reply with quote

tank informed me of GenDocs written by fincs, which is an AMAZING tool to allow creating AHK style docs by parsing AHK code. I'm going to be converting my code - shortly, and make a site to host the files. This will make it MUCH easier to give yal the docs yal deserve. I plan to reformat the code, write a batch file, and let it go, then upload the results. I'm still working on Multi-control drag/drop, so I'll have to split my time between reformating the code and working on this latest addition.
_________________
As always, if you have any further questions, don't hesitate to ask.

Add OOP to your scripts via the Class Library. Check out my scripts.
Back to top
View user's profile Send private message Send e-mail
animeaime



Joined: 04 Nov 2008
Posts: 1046

PostPosted: Fri Feb 20, 2009 12:35 pm    Post subject: Reply with quote

Just wanted to inform yal that I updated Class.ahk; You can download it individually (since it's the only file that changed), or download the entire Menu.zip (which contains the updated Class.ahk). You may need to refresh the page if it's in your cache.


What I changed:

If the type is "obj", the "setter" functions return: true (1) if the value was modified, false (0) is the value is not modified (i.e. you set the previous value), or "" (the empty string) to signify an error.

For the basic types, the "setter" functions return the previous value.

If the type is "robj", the "setter" functions return the old value (or zero, if none). It will also return zero if the new value and old value are the same (i.e. you stored the value that was previously there). This new structure allows easy movement of data between data structures. You can remove it from the old collection (which returns the previous data), and store it in another collection.
_________________
As always, if you have any further questions, don't hesitate to ask.

Add OOP to your scripts via the Class Library. Check out my scripts.
Back to top
View user's profile Send private message Send e-mail
Drugwash



Joined: 08 Sep 2008
Posts: 608
Location: Ploiesti, RO

PostPosted: Fri Feb 20, 2009 12:37 pm    Post subject: Reply with quote

Good luck! *biting nails in excitement*

later edit
Come to think about it, shouldn't we keep the return values (ErrorLevel) consistent throughout AHK? AFAIK, DllCalls return 0 for success. Didn't build any statistics in this regard, but with all the function modules around I believe we should stick to an established model (standard), otherwise work in AHK will become very hard.

Any other opinions on this?
Back to top
View user's profile Send private message Yahoo Messenger
animeaime



Joined: 04 Nov 2008
Posts: 1046

PostPosted: Tue Feb 24, 2009 4:27 am    Post subject: Reply with quote

DllCalls usually return a non-zero for success. Whether it's the created menu handle, or just a true (1) saying "yes it worked". Also, some return the previous value, which is a feature added the the updated Class.ahk file, or download the entire zipped Class library.

Check here for the latest updates.
_________________
As always, if you have any further questions, don't hesitate to ask.

Add OOP to your scripts via the Class Library. Check out my scripts.
Back to top
View user's profile Send private message Send e-mail
Drugwash



Joined: 08 Sep 2008
Posts: 608
Location: Ploiesti, RO

PostPosted: Tue Feb 24, 2009 4:47 pm    Post subject: Reply with quote

OK, thank you. I must admit, I never really understood this classes thing and it all goes over my head right now. Will try to dig deeper into understanding all this but right now my focus is kinda off.

You keep up the good work anyway! Smile
Back to top
View user's profile Send private message Yahoo Messenger
animeaime



Joined: 04 Nov 2008
Posts: 1046

PostPosted: Tue Feb 24, 2009 4:55 pm    Post subject: Reply with quote

Yeah, I hear ya. I'm giving the site (for the Class library) a MAJOR revamp, and will have tutorials and explanations, so hopefully that will clear things up. Of course, the site will be updated with the latest features. One of these days, when I find the time, I might make a site for the Menu class, but I don't have the time now, and I hope, at least, the provided documentation does the job. If not, I'm relying on yal to ask questions - I think I'm approachable enough Question
_________________
As always, if you have any further questions, don't hesitate to ask.

Add OOP to your scripts via the Class Library. Check out my scripts.
Back to top
View user's profile Send private message Send e-mail
fragman



Joined: 13 Oct 2009
Posts: 95

PostPosted: Fri Jan 08, 2010 1:01 pm    Post subject: Reply with quote

BUMP!

I just saw this thread and wanted to ask something. Recently I wanted to show a menu which contains the directory structure on hdd (or better, any shell item structure, so FTP etc are supported too).
For this, the menu would need to be dynamically modified while it is shown, because getting the complete directory tree at once is certainly not a good idea for various reasons (obviously speed, but also symbolic links...).
The code I found on the forums all created the menu before showing it, and didn't manage to show my C: disk with full depth, so I was wondering if there is a possibility to react to submenu show/hide events and modify the menu items on the fly?

I think I have seen this in non-AHK programs, so I guess it could be possible?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6
Page 6 of 6

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group