Search found 281 matches

by cyruz
19 Aug 2019, 19:33
Forum: Ask For Help
Topic: What's wrong with this GDIP code to screenshot a Window?
Replies: 8
Views: 245

Re: What's wrong with this GDIP code to screenshot a Window?

About the code, looks like using a DC from the window it is not possible to capture the "themed" parts of a window. The screen DC must be used and the windows coordinates must be relative to the screen. An alternative solution is the PrintWindow Win32 API but it's blocking and if you need to further...
by cyruz
18 Aug 2019, 08:23
Forum: Ask For Help
Topic: What's wrong with this GDIP code to screenshot a Window?
Replies: 8
Views: 245

Re: What's wrong with this GDIP code to screenshot a Window?

When you write dllcall("function") ahk replaces it with dllcall(578662355) where the numbers are the proc address of function, if function resides in a dll which is ordinarily loaded before the script starts . The following dlls are documented to be loaded before the script starts, User32.dll, Kern...
by cyruz
18 Aug 2019, 06:25
Forum: Ask For Help
Topic: What's wrong with this GDIP code to screenshot a Window?
Replies: 8
Views: 245

Re: What's wrong with this GDIP code to screenshot a Window?

I didn't investigate your code, but note that, : If DllCall's first parameter is a literal string such as "MulDiv" and the DLL containing the function is ordinarily loaded before the script starts, the string is automatically resolved to a function address. This built-in optimization is more effect...
by cyruz
18 Aug 2019, 06:01
Forum: Ask For Help
Topic: What's wrong with this GDIP code to screenshot a Window?
Replies: 8
Views: 245

What's wrong with this GDIP code to screenshot a Window?

Hi guys, I wrote this code (trying to squeeze as much speed as possible, due to the need to run it in a loop), but I have this issue: when I try to screenshot a window client only area, I receive a black bar on top, when I try to screenshot a NON-client area, the border is all transparent. #SingleIn...
by cyruz
17 Aug 2019, 09:07
Forum: Scripts and Functions
Topic: [FUNCTION] WaitForServer - Wait for a server to be up and running
Replies: 3
Views: 325

Re: [FUNCTION] WaitForServer - Wait for a server to be up and running

Hi. Note that sizeof_WSAData := a_ptrsize == 8 ? 408 : 400 and that dSocket := DllCall("Ws2_32.dll\socket", Int,2, Int,1, Int,6, Int ) should be dSocket := DllCall("Ws2_32.dll\socket", Int,2, Int,1, Int,6, "uptr" ) and hence all UInt ,dSocket should be "uptr" , dSocket . Further, are you certain Ws...
by cyruz
06 Aug 2019, 07:35
Forum: Scripts and Functions
Topic: [FUNCTION] WaitForServer - Wait for a server to be up and running
Replies: 3
Views: 325

[FUNCTION] WaitForServer - Wait for a server to be up and running

Hello guys, I created this function to avoid importing a full socket implementation when we just need to check for a server to be up and running. It uses the WSAConnectByName function, that doesn't need any SOCKADDR structure and whatever else... ; ---------------------------------------------------...
by cyruz
29 Jul 2019, 05:08
Forum: Scripts and Functions
Topic: [CLASS] LiveThumb - DWM thumbnail implementation
Replies: 5
Views: 354

Re: [CLASS] LiveThumb - DWM thumbnail implementation

This is great! Is it possible to make a LiveThumb out of one whole screen (include all the windows visible on that screen) or out of one XYWH rectangle area of a screen? To display on another screen also connected to the PC. No, you must choose a top level window and you can eventually request an a...
by cyruz
28 Jul 2019, 10:07
Forum: Scripts and Functions
Topic: [CLASS] LiveThumb - DWM thumbnail implementation
Replies: 5
Views: 354

Re: [CLASS] LiveThumb - DWM thumbnail implementation

Nice :thumbup: . A few notes. When you return false from the constructor, the destructor will be called and you will call LocalFree regardless of whether these have been allocated or not. You will also do LiveThumb.OBJ_COUNTER -= 1 without the corresponing increment, so you will mess up your count....
by cyruz
28 Jul 2019, 05:06
Forum: Scripts and Functions
Topic: [CLASS] LiveThumb - DWM thumbnail implementation
Replies: 5
Views: 354

[CLASS] LiveThumb - DWM thumbnail implementation

Hello guys, this is an implementation of the DWM api part related to the thumbnail management. Thanks to maul-esel that already implemented something similar (https://github.com/maul-esel/AeroThumbnail) but I wanted and implementation that would reflect the API usage patterns, so here we are. * Fixe...
by cyruz
26 Jul 2019, 06:12
Forum: Ask For Help
Topic: Help defining the logic of a window thumbnails preview program
Replies: 3
Views: 107

Re: Help defining the logic of a window thumbnails preview program

Hi Helgef,

I didn't explain it fully :monkeysay: , because I actually plan to use dwm (I already create a class implementing thumbnail management), this approach is only for fallback.
by cyruz
26 Jul 2019, 05:49
Forum: Ask For Help
Topic: Help defining the logic of a window thumbnails preview program
Replies: 3
Views: 107

Help defining the logic of a window thumbnails preview program

Hello guys, I'm coding a tool that will work similarly to an alt-tab switcher but it will be specific for classes of windows. Every time the hotkey fires, it shows a fullscreen preview of the windows disposed in a matrix. The snapshotting code is done with GDI and the "PrintWindow" function. There i...
by cyruz
23 Jul 2019, 10:11
Forum: Scripts and Functions
Topic: [CLASS] Mutex
Replies: 2
Views: 342

Re: [CLASS] Mutex

Hi, this looks well made :thumbup:. It seems like if a script uses multiple mutex handles, with your wait function, you can only wait for one of them at a time. Thanks for sharing, cheers. Hi Helgef, yes as of now every object represents a mutex and can be waited for only singularly. I guess a hypo...
by cyruz
22 Jul 2019, 20:50
Forum: Scripts and Functions
Topic: [CLASS] Mutex
Replies: 2
Views: 342

[CLASS] Mutex

Hi guys, this is a simple mutex implementation I used for concurrent logging (among processes). I'm sharing it to spare some minutes to anybody who needs it. How to use: Create the mutex object. Wait for it (gives ownership). Do some job. Release it. Destroy the object when finished, releasing all v...
by cyruz
04 Jun 2019, 16:20
Forum: Scripts and Functions
Topic: [APP] FileScrambler - Simple file camouflaging tool
Replies: 4
Views: 854

Re: [APP] FileScrambler - Simple file camouflaging tool

DataLife wrote:
16 May 2019, 20:25
This works great.

Is the debug log file necessary? Can I disable it?

Hi DataLife, sorry for the late answer.

Not required at all, there is a global variable that you can safely set to 0 in the script header.


Cheers :)
by cyruz
03 Apr 2019, 22:02
Forum: Scripts and Functions
Topic: [LIB] TrayIcon - Sean's TrayIcon for Unicode and 64 bit
Replies: 68
Views: 26725

Re: [LIB] TrayIcon - Sean's TrayIcon for Unicode and 64 bit

Quick update and code merged in the OP.

@jeeswg that's interesting, if you or JoeWinograd come up with a solution for Windows 10 to "unhide" the icons it would be a nice addition.
by cyruz
27 Feb 2019, 10:06
Forum: Scripts and Functions
Topic: [CLASS] MouseTracker - Track mouse on GUIs/Controls
Replies: 9
Views: 877

Re: [CLASS] MouseTracker - Track mouse on GUIs/Controls

Ok, I added multi handle tracking. New version in the OP. Regarding that change Helgef, I get an error in the boundfunc object inside the onmessage function if I implement it as in-class method. I'm trying to understand why. EDIT: OOOPS, new version again, fixed a small but critical issue, as per ch...
by cyruz
27 Feb 2019, 08:31
Forum: Scripts and Functions
Topic: [CLASS] MouseTracker - Track mouse on GUIs/Controls
Replies: 9
Views: 877

Re: [CLASS] MouseTracker - Track mouse on GUIs/Controls

Helgef wrote:
27 Feb 2019, 07:41
...
Thanks, I'm trying to adapt it for multi handle tracking.

Regarding the OnMessage stuff, although it's mostly for aesthetics, I will implement it in the next release, because I really like it :mrgreen:


Cheers.
by cyruz
27 Feb 2019, 04:06
Forum: Scripts and Functions
Topic: [CLASS] MouseTracker - Track mouse on GUIs/Controls
Replies: 9
Views: 877

Re: [CLASS] MouseTracker - Track mouse on GUIs/Controls

swagfag wrote:
27 Feb 2019, 03:42
...
Hi swagfag, thanks for spotting that error. The correct var is TME_CBSIZE, I guess this was causing heap corruption, can you try again?

Regarding LocalAlloc, I just keep the pointer for freeing memory later. No any particular reason.
by cyruz
26 Feb 2019, 21:37
Forum: Scripts and Functions
Topic: [CLASS] MouseTracker - Track mouse on GUIs/Controls
Replies: 9
Views: 877

[CLASS] MouseTracker - Track mouse on GUIs/Controls

Hi guys, the following class tries to standardize mouse tracking on GUIs and Controls. I started it using a combination of WM_MOUSEMOVE - WM_MOUSEHOVER - WM_MOUSELEAVE messages, but I soon realized that WM_MOUSEHOVER is just adding complexity to the code, without real advantages for a simple trackin...
by cyruz
17 Feb 2019, 10:51
Forum: Scripts and Functions
Topic: [CLASS] ClassHook - Generalized class method hooking
Replies: 3
Views: 426

Re: [CLASS] ClassHook - Generalized class method hooking

What is a practical application of this? I mean, why did you make it? I've seen hooks (callbacks, I think are the same thing?) in other languages. In my case I'm writing a library to manage logging and it became quite complex because I implemented also a notifier, a logrotator and a sort of schedul...

Go to advanced search