jeeswg's script snippets

Post your working scripts, libraries and tools
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

jeeswg's script snippets

28 Dec 2016, 10:43

==================================================

[last updated: 31 Dec 2016]

jeeswg's script snippets

I will put here links to some of my scripts on external websites,
and some of my scripts here on the forums.

Btw if a script is on Stack Overflow/Super User
and you like the script, please give it an upvote!

==================================================

STACK OVERFLOW

[funnish] [close button does different action (all windows)]
Is it possible to catch the close button and minimize the window instead? AutoHotKey - Stack Overflow
http://stackoverflow.com/questions/3988 ... 7#41325497

[funnish][close button does different action (Notepad only)]
AutoHotKey: Run code on Window Event (Close) - Stack Overflow
http://stackoverflow.com/questions/3516 ... 5#41404715

[funnish][curious logical puzzle, I'm not sure what it's for]
autohotkey - AHK - How to ignore last 2 pressed keys from a set of 10 keys - Stack Overflow
http://stackoverflow.com/questions/4106 ... 1#41324571

[smooth functioning with awkward hotkeys][copy/paste functions]
Autohotkey script: Works everytime only in Notepad: Copy text to clipboard, manipulate it, and paste it - Stack Overflow
http://stackoverflow.com/questions/3553 ... 0#41403980

[3-key hotkeys and reassign capslock]
autohotkey - Capslock Shift Modifier - Stack Overflow
http://stackoverflow.com/questions/3643 ... 5#41404865

==================================================

SUPER USER

[fun][notepad fullscreen mode]
windows - How to get Notepad to enter fullscreen? - Super User
http://superuser.com/questions/1114935/ ... fullscreen

[click on open/save as prompt button]
windows 7 - Setting the directory in a standard "Save as" dialog box - Super User
http://superuser.com/questions/562698/s ... 46#1161046

==================================================

___***___ AUTOHOTKEY.COM ___***___

[fun]
Internet Explorer - move tab to new window - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=26117

[obs studio trigger buttons]
obs studio start and record - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=26124

[compare/join two files line by line]
How to combine text of two seperate files in a new file - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=26127

[loop files, long filenames (unpolished)]
259-char path limit workarounds - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=26170

==================================================

(PLEASE HELP ME OUT)

Internet Explorer: get WB hWnds via object loop - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=26082

==================================================

(ALSO)

jeeswg's 3-item wish list (+ documentation) - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 42#p123042

opinions on Stack Overflow - AutoHotkey Community
https://autohotkey.com/boards/viewtopic ... 17&t=26067

==================================================
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: jeeswg's script snippets

04 Feb 2017, 19:55

[updated: 2017-02-05]

FUNCTIONS

JEE_FileGetAttrib

Code: Select all

;JEE_FileGetProperty
JEE_FileGetAttrib(vPath, vAttrib)
{
	if !FileExist(vPath)
		return
	;return "[ERROR]"

	SplitPath, vPath, vName, vDir, vExt, vNameNoExt, vDrive
	oShell := ComObjCreate("Shell.Application")
	oFolder := oShell.NameSpace(vDir "\")
	oFilename := oFolder.Parsename(vName)
	Loop
	{
		vAttrib2 := oFolder.GetDetailsOf(oFolder.Items, A_Index-1)
		if (vAttrib2 = "")
			break
		if (vAttrib = vAttrib2)
		{
			vValue := oFolder.GetDetailsOf(oFilename, A_Index-1)
			break
		}
	}
	return vValue
}
JEE_ProcessGetBits

Code: Select all

JEE_ProcessGetBits(vPID)
{
	if !A_Is64bitOS
		return 86
	;WoW64 means 'Windows 32-bit on Windows 64-bit'
	;C:\Windows\System32 contains 64-bit applications
	;C:\Windows\SysWOW64 contains 32-bit applications
	hProc := DllCall("kernel32\OpenProcess", UInt,0x400, Int,0, UInt,vPID, Ptr)
	DllCall("kernel32\IsWow64Process", Ptr,hProc, IntP,vIsWow64Process)
	DllCall("kernel32\CloseHandle", Ptr,hProc)
	return vIsWow64Process ? 86 : 64
}
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Scripts and Functions”

Who is online

Users browsing this forum: quentin and 30 guests