Search found 364 matches

by SKAN
03 Oct 2019, 08:34
Forum: Scripts and Functions
Topic: Eject() : For Removable storage devices (Updated: 03-Oct-2019)
Replies: 50
Views: 17798

Re: Eject() : For Removable storage devices (Updated: 03-Oct-2019)

New version : 03-Oct-2019, Check the first post.
Function re-written to be aware of UAS drives (USB Attached SCSI)
by SKAN
03 Oct 2019, 04:42
Forum: Scripts and Functions
Topic: hWnd_to_hBmp() : Capture full screen, Window, Control or user defined area of these
Replies: 13
Views: 1501

WinGetVPos() Alt-name: WinGetVisualPos()

I'll try to write a simplified version of WinGetPosEx() Straight-forward approach: Call GetWindowRect() only if DwmGetWindowAttribute( DWMWA_EXTENDED_FRAME_BOUNDS ) fails. Quick tested only in Win 7 and Win 10 . Can somebody please test this win Win 8.1 ? WinGetVPos(hWnd, ByRef X:=0, ByRef Y:=0, By...
by SKAN
01 Oct 2019, 10:36
Forum: Scripts and Functions
Topic: ProcessPriority() : Get / Set
Replies: 0
Views: 222

ProcessPriority() : Get / Set

ProcessPriority(PID:="", PS:="") { ; By SKAN on D2A1 @ bit.ly/2mIlZRy Local hProc, PG:=0, PROCESS_QUERY_INFORMATION:=0x0400 Process, Exist, %PID% If ! ( Errorlevel := ! (PID:=ErrorLevel) ) { hProc := DllCall("OpenProcess", "UInt",PROCESS_QUERY_INFORMATION, "UInt",0, "Ptr",PID, "Ptr") PG := DllCall(...
by SKAN
30 Sep 2019, 08:51
Forum: Scripts and Functions
Topic: StrCmp() : for case-sensitive string comparison
Replies: 1
Views: 266

StrCmp() : for case-sensitive string comparison

StrCmp(Str1, Op, Str2, CS:=1) { ; requires AutoHotkey v1.1.31+ Local R, SCS := A_StringCaseSense StringCaseSense, % (CS := !!CS) Switch Op { Case ">" : R := (Str1 > Str2) Case ">=" : R := (Str1 >= Str2) Case "<" : R := (Str1 < Str2) Case "<=" : R := (Str1 <= Str2) Case "==" : R := (Str1 == Str2) Ca...
by SKAN
28 Sep 2019, 13:19
Forum: General Discussion
Topic: Re: v1.1.31.00
Replies: 6
Views: 258

Re: v1.1.31.00

lexikos wrote:
28 Sep 2019, 08:12
Added Switch.
Thank you very much. :thumbup:

PS: Panda Dome AV neutralized the installer exe. Returned the favor and proceeded with install.
by SKAN
13 Sep 2019, 21:33
Forum: Scripts and Functions
Topic: hWnd_to_hBmp() : Capture full screen, Window, Control or user defined area of these
Replies: 13
Views: 1501

Re: hWnd_to_hBmp() : Capture full screen, Window, Control or user defined area of these

This is strange, which Windows 10 version are you using? I'm on 1803 and that's the result :( I'll let you know next time I boot into it. I guess I installed about 4 years ago. Never updated it. I have to unplug net before booting into it. No software installed other than my editor + AHK.. I just u...
by SKAN
13 Sep 2019, 15:27
Forum: Scripts and Functions
Topic: hWnd_to_hBmp() : Capture full screen, Window, Control or user defined area of these
Replies: 13
Views: 1501

Re: hWnd_to_hBmp() : Capture full screen, Window, Control or user defined area of these

I'm trying on Windows 10 and actually almost no part of the window get screenshotted correctly, moreover there are some issues regarding window size: I just tested in Win10. Everything seems to work fine except trying to capture a WS_POPUP with caption bar. I now only saw the problem with window po...
by SKAN
11 Sep 2019, 06:49
Forum: Scripts and Functions
Topic: string hacks
Replies: 16
Views: 3588

Re: string hacks

- I always wanted it, so that, if you used a blank string for the Length parameter with SubStr, it would be equivalent to omitting the parameter. Well ... vNum := 3 MsgBox, % SubStr("abcdef", 1, (vNum=""?[]:[vNum])*) vNum := "" MsgBox, % SubStr("abcdef", 1, (vNum=""?[]:[vNum])*) vNum := 3 MsgBox, %...
by SKAN
11 Sep 2019, 02:52
Forum: Scripts and Functions
Topic: hWnd_to_hBmp() : Capture full screen, Window, Control or user defined area of these
Replies: 13
Views: 1501

Re: hWnd_to_hBmp() : Capture full screen, Window, Control or user defined area of these

Hi cyruz :) Regarding this function, I experimented with this stuff and looks like the only clean way to have a screenshot of a window it's the PrintWindow function. At least, Explorer windows are a problem. Here are screenshots for comparison. (I wrote standalone version of PrintWindow() and will p...
by SKAN
09 Sep 2019, 14:37
Forum: Scripts and Functions
Topic: hWnd_to_hBmp() : Capture full screen, Window, Control or user defined area of these
Replies: 13
Views: 1501

Re: hWnd_to_hBmp() : Capture full screen, Window, Control or user defined area of these

The one issue I found is that, when capturing a single window, it suffers from Aero effects. It is most notable with Explorer windows. I tested. Indeed there seems to be no solution. I also referred Sean 's wonderful ScreenCapture.ahk He just gets DC to entire desktop and blits only the relevant pa...
by SKAN
06 Sep 2019, 19:19
Forum: Scripts and Functions
Topic: hWnd_to_hBmp() : Capture full screen, Window, Control or user defined area of these
Replies: 13
Views: 1501

Re: hWnd_to_hBmp() : Capture full screen, Window, Control or user defined area of these

Hi @iPhilip

Thanks for testing and the valuable feedback.
Initially I put an additional parameter for bitblt ROP but later removed it.
I had tested it with Notepad and Calculator. but not Explorer.
I'll investigate and amend the code.

Thanks again.
by SKAN
06 Sep 2019, 09:40
Forum: Scripts and Functions
Topic: hWnd_to_hBmp() : Capture full screen, Window, Control or user defined area of these
Replies: 13
Views: 1501

hWnd_to_hBmp() : Capture full screen, Window, Control or user defined area of these

hWnd_to_hBmp( hWnd, Client, Array ) Returns hBitmap when capture was successful. Returns 0 for invalid hWnd or if window is in minimized/hidden state. hWnd : Handle to any window/control that is visible. Windows shouldn't be in minimized state. -1 will result in a fullscreen capture. Client : When ...
by SKAN
04 Sep 2019, 13:54
Forum: Scripts and Functions
Topic: SavePicture() : Save hBitmap as BMP, JPG, GIF, PNG, TIF
Replies: 2
Views: 546

SavePicture() : Save hBitmap as BMP, JPG, GIF, PNG, TIF

SavePicture( hBM, sFile ) Note: This function offers limited functionality: JPEG quality is fixed at 75% and transparency will not be preserved for PNG. Saved file will be a BMP if you pass any file extension other than: BMP, JPG, JPEG, GIF, PNG, TIF, TIFF SavePicture(hBM, sFile) { ; By SKAN on D29...
by SKAN
30 Aug 2019, 05:53
Forum: Scripts and Functions
Topic: ExpandNS() : Expands numbers in range form to number series
Replies: 5
Views: 614

Re: ExpandNS() : Expands numbers in range form to number series

Hi jNizM Hey SKAN, I just found this: - Range extraction (rosetta code) - Range expansion (rosetta code) Thanks, I couldn't even imagine what to search for. Regex based Expand() works 2.5 faster than my version for expanding an impractical range of 1-100000 :D The main difference is my function can ...
by SKAN
30 Aug 2019, 03:54
Forum: Scripts and Functions
Topic: ExpandNS() : Expands numbers in range form to number series
Replies: 5
Views: 614

ExpandNS() : Expands numbers in range form to number series

https://i.imgur.com/z7yTmiQ.jpg Print dialog - Page numbers in range form ExpandNS() will expand numbers in range form (See above image) to proper number series Simple usage: MsgBox % ExpandNS( "1..10, 25..30, 41" ) ; 1,2,3,4,5,6,7,8,9,10,25,26,27,28,29,30,41 Note: I have chosen .. as delimiter for...
by SKAN
07 Aug 2019, 16:49
Forum: Scripts and Functions
Topic: RoundT() : Remove redundant leading/trailing zeroes from a number
Replies: 12
Views: 1852

Re: Float() : Remove redundant leading/trailing zeroes from a number

Doesn't Round() do the same thing in a way? Or am I mistaken? Yes. Float() is same as Round() except it will remove redundant trailing zeroes from any fraction. Or, are asking me why I chose Format() over Round() inside my function? I used it because doc for SetFormat suggested it. I don't know whi...

Go to advanced search