AutoHotkey Community

It is currently May 26th, 2012, 10:39 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 292 posts ]  Go to page Previous  1 ... 15, 16, 17, 18, 19, 20  Next

Would you like to see this script rewritten and easy to understand ?
No, I dont care, i just use the executable
Yes, as this script is popular some may learn from it
You may select 1 option

View results
Author Message
 Post subject:
PostPosted: September 7th, 2009, 11:15 pm 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
Hi, yes the development kind of stopped, because there are no urgent features to be added. many are happy using it like it is. but feel free to improve the script more.

(as stated in an earlier post, i now use osx, so i do not actively use and develop it in the moment). But actually this expose is even better than the commercial expose-integration in vmware running windows-xp on osx. (they are usind hdc-copy instead of printwindow(), parallels makes it correct.)

maybe we should copy the latest version to the wiki or first-post. (but actually only about 0.1% of people use the wiki, so no use to update it).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 10th, 2009, 9:08 am 
Offline

Joined: November 23rd, 2007, 10:23 am
Posts: 841
Location: ~/.
hi holomind,

in my dualscreen setup the preview images get displayed properly, but when the number of open windows changes (eg becomes smaller) it seems, that the backgroundcanvas doesnt get updates properly. it still displays earlier windows. is there a way to fix that, so that the background gets inialized in anycase witha fresh clean copy?

thanks for this great script.
greets
dR

_________________
Image
    All scripts, unless otherwise noted, are hereby released under CC-BY


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 11th, 2009, 12:06 pm 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
Hi DerRafael,

have you tried all versions in this forum-thread, especially the later ones.
http://www.autohotkey.com/forum/post-195590.html#195590

maybe its fixed inside already. at some point i changed the algorythm to repaint the windows.

we can collect some bugs and feature-requests in here and i can try to update the script a bit in my freetime. one idea would also be to collect all scripts in this thread and put them as downloads on the first-post and maybe with a short description what the difference to the others is. and maybe combine them and make some features configurable. switch on/off. if one has too much time we could even add a config-panel like in commercial apps.

grüsse,
Daniel (holomind)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 11th, 2009, 8:18 pm 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
Just updated the "First-Post" with the latest version. Seems there were not so much variations in the 18Pages of Posts.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 11th, 2009, 9:47 pm 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
There is a new version in First-Post. A little Bugfix for Positioning of the Zoomed Thumbnail. Also i removed the nonsens Zoom -100% which even allowed to mirror the window. Its a gimmic, but in real usage may be annoying. so minimum zoom is now 100%. If the zoomed thumb is offscreen then its moved back into view. The top-left corner is prioritzed when more than one corner gets offscreen, as the Icon and Titlebar contain the most important information.

I also implemented to zoom at maximum to fullscreen, but sometimes its fun to use the zoom function as a loupe, but "maximized" should normaly be sufficient to see whats going on. The idea of the zoom is when you have many windows open and want to see more details in the window. actually you dont need to maximize it over the real maximized size but just "big enough" to read.

You can now also activate and deactive the zoom by simply using the mousewheel (up/down) over the thumbnail. (on mouse over). if you scroll/zoom back to 100% the zoom function is deactivated again. (and all thumbs are refreshed then, as this was set to default)

Now i try to find out why the thumbnails are not refreshed correctly when windows are added or removed while in expose-view. (this worked already and there is lots of code inside already to do this...) eg. %gap% functions...


Last edited by holomind on September 11th, 2009, 10:20 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 11th, 2009, 9:58 pm 
Offline

Joined: November 23rd, 2007, 10:23 am
Posts: 841
Location: ~/.
didnt test it yet, but i wonder if a lil bug (nothing special, just some annoyance) is fixed w/ that.

i have the following setup:

Code:
[__][ . ]


the brackets above represent my monitors. left one with the underline is the secondary connected but has the window task bar on it whereas the right one with the dot is the primary w/o a taskbar

when i run expose, the one w/ the dot becomes the one which gets to display the previews so far so good, but it substracts the height of my taskbar from the bottom allowing to see thru at the windows being shown on the screen

in other words, when i trigger expose, it leaves a small stripe at the bottom of my right monitor which has the height of my taskbar shown on the left

greets
dR

_________________
Image
    All scripts, unless otherwise noted, are hereby released under CC-BY


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 11th, 2009, 10:30 pm 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
DerRaphael wrote:
in other words, when i trigger expose, it leaves a small stripe at the bottom of my right monitor which has the height of my taskbar shown on the left


I don't think this is covered, but the taskbar is detected automatically with ahk.

Code:
  if show_taskbar
   WinGetPos,Tx,Ty,Tw,Th,ahk_class Shell_TrayWnd,,,


you can set "show_taskbar := 0" then you get fullscreen on both monitors and taskbar will be hidden. but most prefer to have the taskbar.

i need to test myself what happens in a dual-monitor setup.
(You are lucky because VMware now supports dual-monitor, and i happen to have dual-monitor in the moment ;)

Btw. I do this on a MAC with VMware+WindowsXP, just for fun.
Actually VMware tries to integrate Windows from WindowsXP into the Mac-Expose, but they badly fail, because they use bitblt HDC, which only gets the frontwindow. I even wrote a bugreport to VMware, but they didnt respond to it yet. (Parallels gets it right, but i prefer VMware as its more stable)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 12th, 2009, 2:26 am 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
Another Update for today. See changes in First-Post.

I added a little function to detect dual-monitor setup. and it tries to hide the taskbar in this case. at least when its on the "other" monitor.
in the config you can even choose your "second" monitor "main_monitor := 1" as main-monitor and then the thumbnails will show up there.

I tried to add some more guis to hide the "other" monitors while in expose mode, but didnt manage. the code is still in but commented out, maybe somebody else wants to try. (it already detects the correct monitorsizes and positions, but the guis dont show up as expected, also they must not interfere with the main <<expose>> window. (thats the reason i put this window always on last, so its always the default-gui.

I also tried to fix the bug so newly openend or closed windows show up and get refreshed. the place to look into is at the beginning of section "draw_active: ", when gosub Window_Info is called then the new or removed windows show up. but then other features dont work anymore like the zoom of the thumbnail and the order gets mixed up and the tooltips etc. show the wrong windows.
Actually they show up wrong anyway when new windows come or go. seems to be a real bug.

Enough for today. The code is very long in meantime and things could be implemented in a better way i guess, but its running and i dont want to spend too much time into it.

The downloads in firstpost are updated to version 20090912.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 12th, 2009, 6:52 am 
Offline

Joined: August 1st, 2009, 12:24 pm
Posts: 46
Hello holomind,


The script doesn't seem to expose any minimze windows. Is this by design, or is it a bug?


Thanks,
kli6891.

EDIT: I read instantrunoff's post here:

Quote:
To include minimized windows, I added the following two lines:
GroupAdd, AllWindows ; inserted at the autoexecute section at the top
WinRestore, ahk_group AllWindows ; inserted in the Window_Choose subroutine as shown below

Code:
Window_Choose:
WinGet ActiveID, ID, A
WinRestore, ahk_group AllWindows
SetTimer Window_Choose_Thread, 0 ; new thread to make thumbnail draws interruptible
Return


It looks like development on this has stopped or paused. It works great, and I'm really appreciative of those who made it![/code][/i]


But the problem is that once I launch and close the expose, previously minimized windows will now be NOT minimized. Is there a way to fix this?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 14th, 2009, 3:31 pm 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
It would be possible. Before you call the WinRestore, you can record the state of all windows (even the minimized) into an array "windowsState%A_Index%" and then on the end loop through the windowStateArray and Minimize those windows again with the WinMinimize function. I don't find in the moment in the documentation how to detect if a window is minimized . But if you read height and width (h,w) from the window it should be 0 when the window is minimized. so they can be detected this way.

maybe you also could use the ahk_group function more specific and not add AllWindows, but one by one only the detected minimized ones. then its easy as you only remaximize and reminimize the (originally) minimized windows (the defined group) and later just minimze this group again. so the already not-minimized (normal) windows will not be affected at all.

See the docs for the window-functions:
http://www.autohotkey.com/docs/Tutorial.htm#Activate

GroupAdd Function
http://www.autohotkey.com/docs/commands/GroupAdd.htm
(you create a new group minimized and work only with them)

Funny, its seems there is no counterpart to GroupAdd, to clear the Group and fill it new. Seems you can only add but not remove windows.

as a bad workaround you could use a counter and at each call to Win_Choose create a new group like

counter := counter +1
GroupAdd, minimized%counter% , ahk_id %mywindow%

which would be a waste of memory, but at least it would work.
maybe there is a dll-call to destroy the Group.

A Loop similar to this
Code:
   WinGet ids, list,,,Program Manager      ; all active windows-tasks (processes)
   task_info =
   num_win = 0
   Loop %ids% {
      task_id := ids%A_Index%              ; id of this window
      WinGetClass class, ahk_id %task_id%
      WinGetTitle title, ahk_id %task_id%
      WinGetPos,,, w, h, ahk_id %task_id%
      If Window_Hidden()                 ; small windows not shown (e.g. taskbar)
         Continue
      num_win++
      task_info := task_info class "|" ids%A_Index% "|" w "|" h ","
TrayTip, task_info

     ; ------------
     GroupAdd, minimized , ahk_id %task_id%
     ; -------------

   }
 


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 14th, 2009, 7:30 pm 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
I put the "branch" with the feature for minimized windows in the first post. no need to create a new thread, as this is a useful feature.
i added a config variable "show_minimized=1" (default is on), so it can be turned of to have the old behavior if somebody needs it.
Thanks for your contribution, seems my description was good enough to implement the feature. Maybe its DBP, Description-Based Programming. Post Instructions into Forum and wait for the Code ;)

See Subbranch here:
http://www.autohotkey.com/forum/viewtopic.php?t=48762

Here is another example of using GroupedWindows.
http://www.autohotkey.com/forum/viewtop ... +animation


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 14th, 2009, 8:32 pm 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
I just found another script which is similar to expose-clone, or using parts. but it also has a settings section, maybe this could be integrated here also.

http://www.autohotkey.com/forum/viewtopic.php?t=46740


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 14th, 2009, 9:22 pm 
Offline

Joined: March 11th, 2006, 12:44 pm
Posts: 341
Location: Munich, Germany
After the Titles didnt show up in the hover-of the thumbs i used my script and integrated the minimized function. after seeing the animation of the minimize/restore is annoying i implemented the GroupAdd variation. Also i integrated the feature to turn of minimize/restore animation which was suggested as code in the thread some posts earlier. now the minimized windows case a little flicker before the Animate_In function but its acceptable.
(it would be better to open the gui before, then do the restore of windows kind of in the background and then start drawing.)

the script is now huge, but the defocus ahk-script which integrates part of expose is even bigger. i would like to rewrite it and make it easier for beginners to understand whats happening in the code. also one could maybe use the new Gdip.ahk Include-File and use some other fancy gdi+ stuff. (eg. gdip_wordtransform looks nice, i dont know if it would be better than bitblt, but most of the time its printwindow anyways, to get the correct live-update).

as we now have liveupdate all the time the script could be greatly simplified, as only one routine to draw the windows would be needed. seems everybody now has fast enough computer to draw all windows in realtime. then maybe its simpler to integrate opening and closing windows during runtime better.
(but in this feature even the real-explose (without clone) on the mac has problems if you open a window while in expose, as the new window will be shown in front. this can happen with some download or alert windows).

P.S. See new version in First-Post. (v20090912.ahk is the old one without the minimize function, but in v20090914 you can turn it off in the config part anyways). i guess its usefull also to show the minimized ones.
we even could use different shortcuts to either start with (include minimized) or (without minimized) like the osx version has the option show all window , or show all windows of this application (eg. only windows of safari).


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 15th, 2009, 1:52 am 
Offline

Joined: August 1st, 2009, 12:24 pm
Posts: 46
I just finished reading the post right before this one, and if you want me to work @ the extra features, I'll be willing to do so. It shouldn't be too hard.

EDIT: I meant the features with having the current application expose, instead of all. The one with GDI+, I'm not good enough to tackle those yet.


Thanks for your response and integrating my script.
I commented out the tooltip showing the title, since there was a slight lag that bothered me.


Last edited by kli6891 on September 15th, 2009, 5:45 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 15th, 2009, 3:49 am 
Offline

Joined: August 1st, 2009, 12:24 pm
Posts: 46
Is your website down? I can't download from your website.

Also, I think i discovered a bug in the 1.20090914 version posted in the first post.


If I have a minimized window, and try switch to it via expose, it doesn't work, since the previously active window will take it over


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 292 posts ]  Go to page Previous  1 ... 15, 16, 17, 18, 19, 20  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: jrav and 18 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