Jump to content

Alt+Tab replacement


sandin
 Share

Recommended Posts

This script can be used to replace win's default alt+tab program, but the hotkey for this script is: ALT+` (the key above TAB)

I still need your help on these issues:

http://www.autoitscript.com/forum/index.ph...c=90979&hl= - to make the screen-shot window in real-time

http://www.autoitscript.com/forum/index.ph...c=90764&hl= - doesn't detect alt-up allways

Screen-Shot of this program here

Edit: fixed "_WinAPI_DestroyIcon: Cannot destroy object created by another thread." error.

check here and help me decide which way for switching icons is the best out of those 2 and the one here

Alt_Tab.au3

Edited by sandin
Link to comment
Share on other sites

pretty good replacement.

I had 1 problem, quick fix was to comment out

_WinAPI_DestroyIcon($hIcon) in the _display_icon for it to work,error said "_Winapi_DestroyIcon: Cannot destroy object created by another thread."

also would be cool if you could add blur background instead of a black one when on vista/7.

Edit: Realtime update works great when aero is disabled, and if aero is enable there is a function for getting the window thumbnail.

Edited by Alek

[font="Impact"]Never fear, I is here.[/font]

Link to comment
Share on other sites

Really awesome, Same issue as Alek though. As for your issues, I haven't gone through your code, and am probably no where near experianced enough to help but, is there a way to check to see if the image is blank, and if so than to repeat the print process?

Giggity

Link to comment
Share on other sites

I can't get this to work. The script just crashes when I press Alt+Tab:

!>22:43:07 AutoIT3.exe ended.rc:-1073741819

Any ideas?

WBD

Link to comment
Share on other sites

@Alek:

another thread? hum, maybe this could be fixed if I make $hIcon var as global, instead of local.

And as for Vista, I'm not Vista's user, I still use WinXP SP3, I can't test any of those vista features.

and tnx for feedback :(

@JamesBrooks:

Thank you :P And ya, HotKeySet("!{TAB}", "_nothing") should block win xp's default alt+tab, but if you are using other application or vista's alt+tab func: _KeyboardProc should block it, actually "Return -1" should block it's alt+tab, but before "return -1" there are lots of stuff, if those stuff aren't done quickly enough you still get default alt+tab :D and I can't make "return -1" and then write the action :unsure: (I tried with adlibenable, but that was too slow)

@youknowwho4eva:

The problem is bigger then it seems, the picture doesn't get "blank" but only one single part of the window's screen shot get's blank, for example in Winamp it's playlist, in Firefox, it's main part where net content is displayed, for Total Commander are upper icons, etc... and I can't check that with pixels, cuz every window has different flaw in taking it's picture :D

@FireFox:

Tnx for positive feedback ;)

@WideBoyDixon:

Are you using latest AutoIt?

Link to comment
Share on other sites

I get a crash too as soon as I try the first ALT-TAB:

I see the dark GUI form with some icons at the bottom & the caption of the current window, but then but I get a message box with:

_WinAPI_DestroyIcon: Cannot destroy object created by another thread.

:P

I'm on XP Pro with SP3 and AutoIt 3.3.0.0

Link to comment
Share on other sites

@WideBoyDixon:

Are you using latest AutoIt?

Yes I am on both machines. I've just tried on my work machine and it works fine. Strange. It's a very nice script! I did notice, however, that the screenshot of my IE8 window didn't look right; is this because IE8 uses multiple iexplore threads to prevent one thread from crashing the whole application?

WBD

Link to comment
Share on other sites

update: fixed "_WinAPI_DestroyIcon: Cannot destroy object created by another thread" error.

@JamesBrooks:

enable 283 and 284 instead of 285 line in the script, that will eliminate picture's slide, and reduce time to send "return -1" to win's ALT+TAB, and won't detect win's ALT+TAB anymore, but it's not as pretty as with slider :P

@WideBoyDixon

I fixed that error you had before (exceeded array), and tested IE8, and ya, I noticed the same bug, it's cuz IE uses layered window with transparency, and therefore user32.dll "print window" function capture it as black square.

Edited by sandin
Link to comment
Share on other sites

Right now I'm using your alt tab script with my windows transitions script. Looks almost like a futuristic OS. Only thing is my screenshots of my programs is just the title bar. I could fix it.... Damn hitting x closed my script.... but anyways. To work around the screenshot issue your having, I think it would look nice if it were like the mac task bar. Where the program you have selected has a large icon, and the to next to it are slightly larger then the others on the list. That way you don't have to worry about Microsofts built in blocks.

Giggity

Link to comment
Share on other sites

I get a crash too as soon as I try the first ALT-TAB:

I see the dark GUI form with some icons at the bottom & the caption of the current window, but then but I get a message box with:

:P

I'm on XP Pro with SP3 and AutoIt 3.3.0.0

Exactly the same problem, XP sp2 here

-jaenster

Link to comment
Share on other sites

@JamesBrooks:

update: The white line should be fixed now :P

@youknowwho4eva

Ya, the "printWindow" function can print window in it's current state, if it's resized to minimum size, then you'll get only Screen shot of a title bar, also if your window is minimized, you'll get only title bar. Btw, I like the idea about larger icons, but icon will not be so pretty if it's resized.

@jaenster:

Ernnnm, I could use extra info, how many windows you had running on your desktop? Cuz I noticed there was crash error with number of windows less then 4, but I fixed this in last update.

@ResNullius:

I'm glad it worked :unsure:

Link to comment
Share on other sites

Still get the "_WinAPI_DestroyIcon: Cannot destroy object created by another thread" error.

I'm running the german version of Windows XP SP2 with Autoit 3.3.0

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...