AutoHotkey Community

It is currently May 27th, 2012, 12:12 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3

What do you think about this idea?
Poll ended at May 11th, 2011, 2:11 pm
good idea, I will participate! 50%  50%  [ 2 ]
good idea, but I won't participate. 0%  0%  [ 0 ]
unfortunately not practicable! 0%  0%  [ 0 ]
not sure if this is a good idea... 50%  50%  [ 2 ]
this is a bad idea! 0%  0%  [ 0 ]
other (please explain) 0%  0%  [ 0 ]
Total votes : 4
Author Message
 Post subject:
PostPosted: November 7th, 2011, 2:23 pm 
Offline
User avatar

Joined: January 25th, 2006, 8:08 am
Posts: 225
Location: Froschtümpel
maul.esel wrote:
The COM Classes Project was ported to AHK_L v1.1+! It should be both compatible to the ANSI and the Unicode version!



Two minor bugs with AHK_L v1.1:

1.) File TaskbarList\examples\example1.ahk:
Code:
...
; This part does NOT work with AHK_L 1.1.
Tooltip The same works for other windows.
WinGet, id, list,,, Program Manager ; get a list of all windows

Loop id
    tbl.DeleteTab(id%A_Index%) ; remove all windows' taskbar entries

sleep 3000
Loop, id
    tbl.AddTab(id%A_Index%) ; add all windows' taskbar entries
Tooltip Done
...

Nothing happens - works correctly with AHK v2 version of your lib ...



2.) File TaskbarList3\examples\example2.ahk

The Msgbox, generated with this line of code
Code:
Msgbox 64,,% "The ThumbBar button with the id `"" LOWORD(wp) "`" was clicked!", 3 ; show it to the user

shows the following contents (AHK_L 1.1x):
Code:
The ThumbBar button with the id "LOWORD(wp)" was clicked!

i.e. the function call is displayed literally - and not the result ...

_________________________

Code:
;     (.)~(.)   
;    (-------)                                   
;---ooO-----Ooo---------------------------------------------------
;    Hoppfrosch  - AHK 1.1.05.01 Unicode 32bit on Win7 Ultimate
;-----------------------------------------------------------------                       
;    ( )   ( )                           
;    /|\   /|\ 


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 7th, 2011, 5:08 pm 
Online
User avatar

Joined: February 28th, 2011, 7:28 pm
Posts: 625
Location: Germany
Thanks, I just fixed it.

_________________
RECOMMENDED: AutoHotkey_L
Image
github - ImportTypeLib
Win7 HP SP1 32bit | AHK_L U 32bit


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 22nd, 2011, 3:25 pm 
Online
User avatar

Joined: February 28th, 2011, 7:28 pm
Posts: 625
Location: Germany
I did a lot more work recently. As the project is getting a real framework more and more, I renamed the thread.

What I did so far:
  • I added a bunch of "Helper Classes", that represent either enumerations passed to a method or structs.
  • I also removed the possibility for "string flags" as the helper classes can be used.
  • I made some more additions and standardized the comments and code (mostly).
Still TODO:
  • more changes
  • apply to AHK_Lv1.1
  • update examples

_________________
RECOMMENDED: AutoHotkey_L
Image
github - ImportTypeLib
Win7 HP SP1 32bit | AHK_L U 32bit


Report this post
Top
 Profile  
Reply with quote  
 Post subject: swig com wrappers
PostPosted: December 12th, 2011, 6:03 pm 
Offline

Joined: August 3rd, 2007, 8:01 am
Posts: 555
Location: Houston, TX
Just came across, this: http://swig.svn.sourceforge.net/viewvc/ ... er_details
will have to see if it actually works...

automatic com wrapper generation through swig !


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 13th, 2011, 9:42 pm 
Offline

Joined: October 11th, 2010, 12:30 pm
Posts: 406
http://www.codeproject.com/KB/COM/com_in_c1.aspx Com in plain C. That article explains Com, I thought it's related to the topic


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2011, 6:19 am 
maul.esel wrote:
TaskbarList3 class now finally implements the ThumbBarAddButtons(), ThumbBarUpdateButtons() and ThumbBarSetImageList() methods!

The other TaskbarList classes were updated, too, and now return bool values and update the Error object.

One more example using TaskbarList3's new method's was added.

Image
I'm trying the example2.ahk in the TaskbarList3\examples folder. It just shows a blank GUI window and that's it. Is it supposed to show buttons like shown in the picture?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2011, 1:37 pm 
Online
User avatar

Joined: February 28th, 2011, 7:28 pm
Posts: 625
Location: Germany
Right, that's a bug introduced with the concept of "helper classes". I'm working on it.

_________________
RECOMMENDED: AutoHotkey_L
Image
github - ImportTypeLib
Win7 HP SP1 32bit | AHK_L U 32bit


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 18th, 2011, 1:01 pm 
Online
User avatar

Joined: February 28th, 2011, 7:28 pm
Posts: 625
Location: Germany
Fixed it now. Pushed some updates & new stuff, including a ShellItem wrapper.

_________________
RECOMMENDED: AutoHotkey_L
Image
github - ImportTypeLib
Win7 HP SP1 32bit | AHK_L U 32bit


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 18th, 2011, 1:25 pm 
I tried the updated file, example2.ahk in TaskbarList3\examples but it only shows a GUI window. Also, SaveHICON2File.ahk does not work in the update. This one works in the previous version.

I'm using v1.1.05.05 Unicode.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 18th, 2011, 1:32 pm 
Online
User avatar

Joined: February 28th, 2011, 7:28 pm
Posts: 625
Location: Germany
What's your OS? In Windows7, Windows Server 2008 R2 or higher (see TaskbarList3 -> Documentation -> Requirements), when you hover the window's taskbar entry, you should see the thumbnail + toolbar similar to the picture.

For the SaveHICON2File: yes, that was a silly bug. Fixed now. I plan to add some tests to avoid such bugs.

_________________
RECOMMENDED: AutoHotkey_L
Image
github - ImportTypeLib
Win7 HP SP1 32bit | AHK_L U 32bit


Last edited by maul.esel on December 18th, 2011, 4:05 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 18th, 2011, 2:16 pm 
maul.esel wrote:
when you hover the window's taskbar entry, you should see the thumbnail + toolbar similar to the picture.
OK, now at last I got what it does. It's working. It would be really helpful to have a short description of what it does in each example script.

Other than that, this tutorial would be complete if a working example is added.

I hope you keep up the good work.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 21st, 2012, 3:49 pm 
Online
User avatar

Joined: February 28th, 2011, 7:28 pm
Posts: 625
Location: Germany
Status Update:

I'm focusing on type information interfaces & helper classes right now. The goal is to enable automatic wrapper generation - not through SWIG but through AHK.
Check out the AFH topic here.

@tinku99, @all: Please consider helping me writing this code! Check it out at github.

Edit: Example descriptions were added, too.

_________________
RECOMMENDED: AutoHotkey_L
Image
github - ImportTypeLib
Win7 HP SP1 32bit | AHK_L U 32bit


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 1st, 2012, 5:03 pm 
Online
User avatar

Joined: February 28th, 2011, 7:28 pm
Posts: 625
Location: Germany
Some updates:

A lot of changes has been done to the CCF recently. Most focus on making the CCF code cleaner, work more reliable and predictable. I started writing a CCF specification which the code should fulfill. The next milestone to be expected is a complete spec with all classes fully compatible to it. ComGenerator will then be continued to make it spit out spec-conform code. The goal: a CCF being able to regenerate and extend itself in an automated way. World domination, here I come :twisted: Anyone interested is welcome to contribute to the spec (and of course the CCF in general).

hoppfrosch has also started contributing to the CCF, and when looking at his repo, it seems there's more to come. Thanks a lot, hoppfrosch! :)

With the latest v2 commit, there was a change that might break or fix existing scripts (if any): The behaviour of object cloning was changed.
Quote:
To create a shallow copy from an instance, ...
  • do not use obj.Clone(), it might do something totally different (most likely: create a new object from a new underlying COM instance).
  • use obj._Clone() to create a copy which has an increased reference count, so releasing either the original or the clone should not affect the other.
  • use ObjClone(obj) to create a copy which has the original reference count. Releasing either the original or the clone will make the other stop working.
Generally, it should be noted that CCF classes might (unintentionally) override builtin methods because an interface defines a method with the same name. This can be circumvented by using the function style (ObjClone(obj)) or by prefixing the method name with an underscore (obj._Clone()). Note that the latter is not guaranteed to work, however, it's unlikely an interface defines such a method.

The versions for v2 and _L have recently diverged a lot, an update to the _L version is planned for the weekend.

Also, there's a branch "UIAutomation" in work, which will extend AHK's possibilities a lot. The Microsoft UIAutomation framework enables access to the UI in a standardized way, it works for regular controls, WPF, HTML, ...

Regards
maul.esel

Edit: I did not forget the tutorial, I plan to update it and add an example. Might take some more time though.

Edit 2: Anyone who writes working examples using the CCF is welcome to add those. Just fork on github, PM me or post here.

_________________
RECOMMENDED: AutoHotkey_L
Image
github - ImportTypeLib
Win7 HP SP1 32bit | AHK_L U 32bit


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 2nd, 2012, 8:38 am 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5482
Location: the tunnel(?=light)
FYI, there looks to be a good model for creating the UI Automation framework from the AutoIt forums.

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 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