Jump to content

JohnnyThrash

Active Members
  • Posts

    43
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

JohnnyThrash's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I'm sorry it's taken this long to reply. I had to recreate my program again from scratch. I've now gotten back to the point where this is important. Anyway, you're first method is viable and also, in my opinion, very clever. The only problem is that there would then be no way way to handle when windows change their titles or when child windows pop up. The second method, Kafu's Method, maybe viable, only it doesn't specifically say when a window is destroyed or created, but when any gui control or other object is destroyed or created as well. So I'm at a loss. Not sure what to do. I suppose I'll use your method unless there's something I'm missing about Kafu's method that would make it more usable.
  2. Fantastic UDF and great work! I have to know though, is there any way to get an elements x and y position? Thanks
  3. I'm sorry, you're right I should not have hijacked the topic, that wasn't my intention. Thanks for your script above. That should help if it becomes necessary to run my shell along side explorer.exe. Your taskbar example suffers from the same problem as mine unfortunately. Shell Hooking, like checking to see if a window is created or destroyed only works if explorer.exe is running, near as I can tell. I'm starting another topic for this it can be found here: http://www.autoitscript.com/forum/index.php?showtopic=115520
  4. I'm making a new interface for windows which works fine running with explorer.exe. However I can't make use of Shell Hooking if explorer.exe is not running, which I hope to ultimately not have running. I need shell hooking for my custom made taskbar. The code I'm using for shell hooking can be found here, http://www.autoitscript.com/forum/index.php?showtopic=56536
  5. Yes, I don't think "Shell Replacement" puts such a fine point on what I mean. I'm using it more as the term it has become, since what I'm creating isn't an entire shell replacement. It's simply an interface similar to the once provided by the windows shell (ie. desktop, taskbar, file browser, etc.) that runs independantly of explorer.exe, that is the so explorer.exe is intended to not be running. With that said is there any way I can incorporate the functionality of explorer's shell hooking with explorer.exe running? Or is there maybe even a way to run explorer.exe without anything superfluous running? Like the taskbar, and start menu, desktop, and etc? Also, for what it's worth, bear in mind Window's windows can still exist without explorer.exe. My trick now will be in detecting how the are interacted with, without explorer.exe running if that's possible.
  6. Is that possible? How could that be done?
  7. I actually did get this working. I have a hge question though. Can this in anyway possible work without explorer.exe? I'm making a shell and everything was going great. Until a recent routine check to see how it'd operate independantly of explorer.exe. It seems the shell hooking doesn't work without it. =( Any thoughts?
  8. UPDATE: I've also found this on the autohotkey forums. I hope this isn't taboo or anything =S. I figured since AutoHotKey and AutoIt were so similar this might help. The only issue is it's not entirely clear to me how the solution provided in this topic is applied. If anybody could offer any insight on this I would very much appreciate it. http://www.autohotkey.com/forum/topic53775.html (PS: I hope that in this situation double posting is not frowned upon. I figured if I merely had edit my last post people that may have previously read it would not notice there was updated content, hence this additional post... not to mention it's been quite a few days.)
  9. Good idea, sorry, I should have thought of that.Below is a excerp from the following link : http://groups.google.com.ar/group/microsoft.public.win32.programmer.gdi/msg/fa5de1f2bc9a04d3 I believe a translation of the following code *may* do what I am hoping. and for what it's worth, I have looked into doing the task myself but some of this goes way over my head (That's why I use autoit instead of a more complicated language =P) Another solution might be found here as well, http://blogs.msdn.com/b/andreww/archive/2007/10/10/preserving-the-alpha-channel-when-converting-images.aspx
  10. Well that's exactly the way i understand it. When GDI loads an icon it does not load the alpha channel or it discards it. I have a concept, but I have no idea how to execute it. What if i got just the alpha channel and looped through all the pixels in the icon setting each to have the opacity that corresponds to the alpha channel? I've seen this done in other languages but not Autoit. Any ideas?
  11. Out of ideas, huh? Well thanks for your help so far. Maybe somebody will come along yet and offer some more help for this. This is an integeral aspect of my application.
  12. According to msdn SHELL_WINDOWDESTROYED should return the handle of the closed window through the wparameter, this in theory works because the message is sent before the window is actually closed.Although, i'll grant you, for reasons unknown to me the wparam (or lparam) do not return the handle of the closed window. Any thoughts? I'm currently writing a shell replacement for windows so this type of information would be endlessly useful.
  13. Well, really, I'm just throwing that term around. It means that there are varying levels of opacity. There's not just see-through and solid. There's also amounts in between. An example of an icon i can extract is this: You might be familiar with this icon. However, the icon you've seen has a subtle drop shadow effect, only here instead you see a thick black outline. That black area is an area that would be slightly see through but not entirely opaque or otherwise.
  14. I have to admit, I don't actually understand you code entirely. Also, I had to change the $W and $h to 32, since they weren't defined. Here's the code I came up with but it still produces the same results as before. As I've mentioned before I can sucessfully get a png from the icon with a transparent background, however I cannot get any variable transparency. Func ExtractIcons($file, $folder, $output) $Ret = DllCall("shell32","long","ExtractAssociatedIcon","int",0,"str",$file,"int*",(-1*-1)-1) ;$hIcon=getIconHandleByFile($file) $hIcon = $Ret[0] _GDIPlus_Startup() $pBitmap = DllCall($ghGDIPDll,"int","GdipCreateBitmapFromHICON", "ptr",$hIcon, "int*",0) $pBitmap = $pBitmap[2] ;transparent code by smashly / Malkey - modified by UEZ $hImage = _GDIPlus_BitmapCloneArea($pBitmap, 0, 0, 32, 32, $GDIP_PXF32ARGB) $tBitmapData = _GDIPlus_BitmapLockBits($hImage, 0, 0, 32, 32, $GDIP_ILMWRITE, $GDIP_PXF32ARGB) $iStride = DllStructGetData($tBitmapData, "stride") $iScan0 = DllStructGetData($tBitmapData, "Scan0") $tPixel = DllStructCreate("int", $iScan0 + (0 * $iStride) + (0 * 4)) $iFirstPixel = DllStructGetData($tPixel, 1) $iTransPixel = BitAND($iFirstPixel, 0x00FFFFFF) $iFirstPixel = StringRegExpReplace(Hex($iFirstPixel, 8), "(.{2})(.{2})(.{2})(.{2})", "\4\3\2\1") $iTransPixel = StringTrimRight($iFirstPixel, 2) & "00" $v_BufferA = DllStructCreate("byte[" & 32 * 32 * 4 & "]", $iScan0) ; Create DLL structure for all pixels $AllPixels = DllStructGetData($v_BufferA, 1) $sREResult1 = StringRegExpReplace(StringTrimLeft($AllPixels, 2), "(.{8})", "\1 ") $sPix = "0x" & StringStripWS(StringRegExpReplace($sREResult1, "(" & $iFirstPixel & ")", $iTransPixel), 8) $AllPixels = DllStructSetData($v_BufferA, 1, $sPix) _GDIPlus_BitmapUnlockBits($hImage, $tBitmapData) _GDIPlus_ImageSaveToFileEx($hImage, @ScriptDir&"\temp\images\"&$folder&$output&".png", _GDIPlus_EncodersGetCLSID("PNG")) _GDIPlus_ImageDispose($hImage) return @ScriptDir&"\temp\images\"&$folder&$output&".png" EndFunc I hope I'm not being a pain in the ass.
  15. Yes, i have looked at this code previously. However, I'm not sure it will do the trick. The code in the link seems to rely on the icon being saved as an icon and not png. Maybe it's exactly what I'm looking for but I don't think. Thanks for your help though. I think the key is probably going to be in dealing with GDI but i don't know exactly how.
×
×
  • Create New...