Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Broken AutoHotkey.net Links Updated 5-22-2013


  • Please log in to reply
252 replies to this topic
Wade Hatler
  • Members
  • 40 posts
  • Last active: Nov 06 2014 10:46 PM
  • Joined: 28 Sep 2004
Uberi has recovered a boatload of the scripts (600+) from the cache, and posted them in one zip file here.

If that fails you, you can try the manual method outlined here.

User1554
  • Guests
  • Last active:
  • Joined: --
Hey everyone, I'm looking for the scroller that can be found here: http://www.autohotke...pic.php?t=49725

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007
AutoHotkey.net still won't work for me, has it been fixed yet?

I can log on but can not create folders. I haven't tried to upload anything since I don't have folders to organize uploads.
I you need new version of any scripts I haven't re-uploaded yet feel free to pm me.

rbrtryn
  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011

AutoHotkey.net still won't work for me, has it been fixed yet?
I can log on but can not create folders. I haven't tried to upload anything since I don't have folders to organize uploads.

The web service is disabled for the time being.

You can FTP to log in to <!-- m -->http://www.autohotkey.net<!-- m --> or you can use a different service, like DropBox.

My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!


rbrtryn
  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011
@User1554 - Is this the one you mean?
/*	Title:	Scroller
			Makes window scrollable.

	Dependencies:
			<Win> 1.22
 */

/*
 Function:	Init
			Initialization function. Must not be used with scrollable <Panel>.
 */
Scroller_Init(){
	static WM_VSCROLL=0x115, WM_HSCROLL=0x114, old1, old2
	
	if old1 =
		old1 := OnMessage(WM_VSCROLL, "Scroller_OnScroll"), old2 := OnMessage(WM_HSCROLL, "Scroller_OnScroll")
}

/*
 Function:	UpdateBars
			Updates horizontal and/or vertical scroll bar.	
 
 Parameters:
			Hwnd	- Window that contains system created scrollbars.
			Bars	- Set to 1 to update only horizontal bar, 2 updates only vertical bar, 3 (default) updates both.
			MX, MY	- Set here x & y margin of your window. By default 0.

 Remarks:			
The function will make scrollbars visible only if needed. You don't need to have scroll styles on window prior to calling it.
			You need to call this function after adding new controls to the GUI and after resizing window.
			If used with resizable window, its enough to put call to this function in GuiSize routine (this might not work in same cases
			of GUI creation). In any case, you need to update scrollbars after adding new controls to the GUI.
			Scroller replaces message handlers for WM_VSCROLL & WM_HSCROLL messages at the moment which will influence <ScrollBar> control
			if you have it (or vice-versa), i.e. message stacking is not done as its not very probable that you will use those 2 modules together.

			You can change the position of the vertical scrollbars by setting WS_EX_LEFTSCROLLBAR=0x4000.
			For more control over scrollbars you need to use <ScrollBar> control.

			If you use <Attach> function, you may experience some miscalculation of scrollable area (not happening if <Panel> is the host).
			This is due to the fact that attached controls may be resized as a consequence of window resizing (WM_SIZE message is sent 
			when scrollbars are added and it will trigger Attach handler) and module doesn't take that change into account. 
			Calling this function 3 times in a row fixes the problem.
			You cant use Attach's p option (proportional) with Scroller (known bug).

			I discovered that SkinSharp when used in AHK app via its dll could cause Scroller missbehavior when used together with Attach.
  */
Scroller_UpdateBars(Hwnd, Bars=3, MX=0, MY=0){
    static SIF_RANGE=0x1, SIF_PAGE=0x2, SIF_DISABLENOSCROLL=0x8, SB_HORZ=0, SB_VERT=1, sbs, sbas

	if !sbs		;ScrollBar Size
	{
		SysGet, sbs, 2		;Width of a vertical scroll bar
		;SysGet, sbas, 20	;Height of the arrow bitmap on a vertical scroll bar
	}

	Scroller_getScrollArea(Hwnd, left, top, right, bottom)
	sWidth := sWidth1 := right - left + MX, sHeight := sHeight1 := bottom - top + MY
	
	WinGetPos,,,pw,ph, ahk_id %Hwnd%
	
	VarSetCapacity(SI, 28, 0), NumPut(28, SI)
	NumPut(SIF_RANGE | SIF_PAGE, SI, 4)

  ;Update horizontal scroll bar. 
	if Bars in 1,3
	{
		sWidth += sHeight1 > ph ? sbs : 0		;Adjust scroll area to take into account scrollbars.
		sWidth -= sWidth = pw ? 1 :0			;if controls fit perfectly scrollbar shows; -1 px prevents that
		NumPut(sWidth, SI, 12)
		NumPut(pw, SI, 16)		 ; nPage 
		DllCall("SetScrollInfo", "uint", Hwnd, "uint", SB_HORZ, "uint", &si, "int", 1)
	} else DllCall("ShowScrollBar", "uint", HCtrl, "uint", SB_HORZ, "uint", 0)

  ;Update vertical scroll bar. 
    ;NumPut(SIF_RANGE | SIF_PAGE | SIF_DISABLENOSCROLL, SI, 4) ; fMask 
   	if Bars in 2,3
	{	
		sHeight +=(sWidth1 > pw) ? sbs : 0		;Adjust scroll area to take into account scrollbars.            	
		sHeight -= sHeight = ph ? 1 : 0			;if controls fit perfectly scrollbar shows; -1 px prevents that 
	    NumPut(sHeight, SI, 12) ; nMax 
		NumPut(ph, SI, 16)		; nPage 
	    DllCall("SetScrollInfo", "uint", Hwnd, "uint", SB_VERT, "uint", &si, "int", 1) 
	} else DllCall("ShowScrollBar", "uint", Hwnd, "uint", SB_VERT, "uint", 0)

  ;Scroll window if needed
	if (left < 0 && right < pw)
        x := Abs(left) > pw-right ? pw-right : Abs(left) 
    if (top < 0 && bottom < ph) 
        y := Abs(top) > ph-bottom ? ph-bottom : Abs(top) 
    if (x || y)
        DllCall("ScrollWindow", "uint", Hwnd, "int", x, "int", y, "uint", 0, "uint", 0) 
}

;=============================================== PRIVATE =====================================================
Scroller_getScrollArea(Hwnd, ByRef left, ByRef top, ByRef right, ByRef bottom) {
    left := top := right := bottom := 0
	Win_Get(Hwnd, "NhBxy", th, bx, by)
	children := Win_GetChildren(Hwnd)

    Loop, Parse, children, `n
    {
		ifEqual, A_LoopField,, continue
		Win_GetRect(A_LoopField, "*xywh", cx, cy, cw, ch)
		cr := cx+cw, cb := cy+ch

        ifLess, cx, %left%,   SetEnv, left,	 %cx%
        ifLess, cy, %top%,   SetEnv, top, %cy%
		ifGreater, cr, %right%,  SetEnv, right, %cr%
		ifGreater, cb, %bottom%, SetEnv, bottom, %cb%
    }
	right +=2*bx, bottom += th + 2*by
}

Scroller_onScroll(WParam, LParam, Msg, Hwnd){
    static SIF_ALL=0x17, SCROLL_STEP=10
	ifNotEqual, LParam, 0, return	;required so that UpDown and Slider controls don't take over.
	bar := Msg = 0x115
    
    VarSetCapacity(SI, 28, 0), NumPut(28, SI) 
    NumPut(SIF_ALL, SI, 4) ; fMask 

    if !DllCall("GetScrollInfo", "uint", Hwnd, "int", bar, "uint", &si) 
        return 

    VarSetCapacity(rect, 16)
    DllCall("GetClientRect", "uint", Hwnd, "uint", &rect) 
    
    old_pos := new_pos := NumGet(SI, 20) ; nPos 

	action := WParam & 0xFFFF 
    if action = 0 ; SB_LINEUP 
        new_pos -= SCROLL_STEP 
    else if action = 1 ; SB_LINEDOWN 
        new_pos += SCROLL_STEP 
    else if action = 2 ; SB_PAGEUP 
        new_pos -= NumGet(rect, 12, "int") - SCROLL_STEP 
    else if action = 3 ; SB_PAGEDOWN 
        new_pos += NumGet(rect, 12, "int") - SCROLL_STEP 
    else if (action = 5 || action = 4) ; SB_THUMBTRACK || SB_THUMBPOSITION 
        new_pos := WParam >> 16 
    else if action = 6 ; SB_TOP 
        new_pos := NumGet(SI, 8, "int") ; nMin 
    else if action = 7 ; SB_BOTTOM 
        new_pos := NumGet(SI, 12, "int") ; nMax 
    else return 
    
    min := NumGet(SI, 8, "int")							; nMin 
    max := NumGet(SI, 12, "int") - NumGet(SI, 16) + 1	; nMax - nPage 
    new_pos := new_pos > max ? max : new_pos 
    new_pos := new_pos < min ? min : new_pos 
    
    x := y := 0 
    if bar = 0	; SB_HORZ 
         x := old_pos - new_pos 
    else y := old_pos - new_pos 

    DllCall("ScrollWindow", "uint", Hwnd, "int", x, "int", y, "uint", 0, "uint", 0)    ; Scroll contents of window and invalidate uncovered area. 
    
  ; Update scroll bar. 
    NumPut(new_pos, SI, 20, "int") ; nPos 
    DllCall("SetScrollInfo", "uint", Hwnd, "int", bar, "uint", &si, "int", 1) 
}

/* Group: About
	o Version 1.03 by majkinetor.
	o Original code by Lexikos. See <http://www.autohotkey.com/forum/viewtopic.php?p=177673#177673>.
	o Licensed under BSD <http://creativecommons.org/licenses/BSD/>.
 */

#include *i Win.ahk

My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!


Bioso
  • Members
  • 1 posts
  • Last active: Aug 22 2012 01:42 PM
  • Joined: 22 Aug 2012
Dear guys (unable to use my old login somehow),

Step 1 : Found the server and client script. Leaves AHKsock and Simple File Functions

I am looking for the script that can execute an ahk script remotely. It has server-client side and dependancies of AHKsock and Simple File Functions by TheGood.

The original script is located here. I am looking for every variant of it (basic and L version for later 64 bit use)
<!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?t=58797">viewtopic.php?t=58797</a><!-- l -->


Your help is greatly appreciated!

Freestyler
  • Members
  • 36 posts
  • Last active: Aug 19 2016 12:40 PM
  • Joined: 17 Nov 2007
Hope anyone could help me find the AHKSock script and preferably also the documentation (Same like above but was written from a temporary account)

DataLife
  • Members
  • 1022 posts
  • Last active: Nov 27 2015 01:09 AM
  • Joined: 27 Apr 2008

Hope anyone could help me find the AHKSock script and preferably also the documentation (Same like above but was written from a temporary account)

Is this the ahksock.ahk that you are needing? Looks like the documentation is included with the script. I would just post the code here but there is a new 60000 character limit on posts.

https://dl.dropboxus...ock/AHKsock.ahk
Check out my scripts.  (MyIpChanger) (XPSnap) (SavePictureAs) All my scripts are tested on Windows 7, AutoHotkey 32 bit Ansi unless otherwise stated.

BrandonHotkey
  • Members
  • 691 posts
  • Last active: Oct 21 2015 09:41 PM
  • Joined: 21 May 2012
<!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?f=2&t=12381">viewtopic.php?f=2&t=12381</a><!-- l -->
majkinetor
Post subject: [module] Remote TreeView 1.0
PostPosted: September 5th, 2006, 2:40 pm
Download Link broken

Would be very nice to find working link or the script to upload.

DataLife
  • Members
  • 1022 posts
  • Last active: Nov 27 2015 01:09 AM
  • Joined: 27 Apr 2008

http://www.autohotkey.com/community/viewtopic.php?f=2&t=12381
majkinetor
Post subject: [module] Remote TreeView 1.0
PostPosted: September 5th, 2006, 2:40 pm
Download Link broken

Would be very nice to find working link or the script to upload.



RTV.ahk by majkinetor
;-------------------------------------------------------------------------------------------
; Title:	Remote TreeView
;			Functions for working with remote TreeView controls
;>
;			This is set of function to work with TreeViews controled by third party process.
;			This process requires some data to be injected into remote process address space
;			thus this library depends on *Remote Buffer* module.
;

;----------------------------------------------------------------------------------------- 
; Function: Initialise
;			Initialization function
;
; Parameters:
;			hwParent	- HWND of the window containing TreeView
;			hwTV		- HWND of the TreeView
;
; Remarks:
;			All other functions will operate upon those two HWND's
;
TV_Initialise( hwParent, hwTV ){
	global
	static init

	TV_hwHost		:= hwParent
	TV_hwTV			:= hwTV 

	;API MESSAGES
	if !init
	{
		TVE_EXPAND		= 2

		TVM_EXPAND		= 0x1102
		TVM_GETITEM		= 0x110C
		TVM_GETNEXTITEM = 0x110A
		TVM_SELECTITEM  = 4363

		TVGN_ROOT		= 0
		TVGN_NEXT		= 1
		TVGN_CHILD		= 4
		TVGN_PARENT		= 3
		TVGN_CARET		= 9

		TVIF_STATE		= 8
		TVIS_SELECTED	= 2

		init := true
	}
}

;----------------------------------------------------------------------------
; Function:	FindDrive
;			Find the drive item in "My Computer" branch
;
; Parameters: 
;			drive	- Drive letter to find
;
; Returns:
;			Handle to the item that display's drive letter
;
; Remarks:
;			This is specific to Explorer's TreeView and ther system windows wich 
;			use the same presentation of file system hierarchy (like Browse For Folders
;			standard dialog and similar).
;
TV_FindDrive( drive )
{
	global TV_hwTV, TVGN_ROOT, TVM_GETNEXTITEM

	myComputer := TV_GetResString("{20D04FE0-3AEA-1069-A2D8-08002B30309D}")

	;get root 
	SendMessage TVM_GETNEXTITEM, TVGN_ROOT, 0, ,ahk_id %TV_hwTV% 
	root = %ErrorLevel% 
	
	hwMC := TV_FindChild( root, myComputer ) 
	TV_Expand( hwMC )

	return TV_FindChild( hwMC, drive, 1 )
}

;----------------------------------------------------------------------------------------- 
; Function: SetPath
;			Set the location of selected item in the TreeView hierarchy
;
; Parameters:
;			path	- path to set
;
; Returns: 
;			true on success false on failure
;
; Remarks:
;			Path is *not* the file system path. If remote TreeView item has N ancestors Pi,
;			its path will be TP1\TP2\TP3...\TPN\Titem, where TP signifies text of the item P
;			
TV_SetPath( path )
{
	global TV_hwTV

	StringLeft drive, path, 2
	
	parent := TV_FindDrive( drive )
	TV_Expand( parent )

	loop, Parse, path, \
	{
		;skip drive, I already set this
		if (A_Index = 1)
			 continue 

		
		child := TV_FindChild(parent, A_LoopField)

		if (child = 0)
			return 0

		parent := child		

		;it appers that when expanding drive it needs more time
		if (A_Index = 2)
			TV_Expand( parent, 200)
		else
			TV_Expand( parent )

	}

	return TV_Select(parent)
}

;-----------------------------------------------------------------------------------------
; Function:	Select
;			Select item
;
TV_Select( item )
{
	global
	SendMessage TVM_SELECTITEM, TVGN_CARET, item, ,ahk_id %TV_hwTV% 
	return %ErrorLevel%
}

;-----------------------------------------------------------------------------------------
; Function:	Expand
;			Expand item
;
; Parameters:
;			item	 - Item to be expanded
;			waitTime - Time to wait for expansion, by default 50ms
;
TV_Expand( item, waitTime=50 )
{
	global
	SendMessage TVM_EXPAND, TVE_EXPAND, item, ,ahk_id %TV_hwTV% 
	Sleep %waitTime%	;allow it to expand
	return %ErrorLevel%
}

;----------------------------------------------------------------------------------------- 
; Function: FindChild
;			Find child by its text. Start searching from the given item
;
; Parameters:	
;			p_start	- Start searching from this item
;			p_txt	- Text to search for
;			p_mode  - Item's text contains (1) or is equal (0) to the given text
;
; Returns: 
;			Item handle or zero if no item is found
;
TV_FindChild( p_start, p_txt, p_mode=0 )
{
	global TV_hwHost, TV_hwTV, TVM_GETITEM, TVM_GETNEXTITEM, TVGN_CHILD, TVGN_NEXT

	;open remote buffers 
	bufID   := RemoteBuf_Open(TV_hwHost, 128) 
	bufAdr  := RemoteBuf_Get(bufID) 

	;Copy items name to the host adr space
	; so I can compare strings there, without transfering them here 
	r_txt	 := RemoteBuf_Open(TV_hwHost, 128)
	r_txtAdr := RemoteBuf_Get( text )
	RemoteBuf_Write( r_txt, txt, strlen(txt) )

	r_sTV    := RemoteBuf_Open(TV_hwHost, 40) 
	r_stvAdr := RemoteBuf_Get(r_sTV) 

	VarSetCapacity(sTV,   40, 1)    ;10x4 = 40 
	NumPut(0x011,  sTV, 0)   ;set mask to TVIF_TEXT | TVIF_HANDLE  = 0x001 | 0x0010  
	NumPut(bufAdr, sTV, 16)  ;set txt pointer 
	NumPut(127,    sTV, 20)  ;set txt size 


	;get first child
	SendMessage TVM_GETNEXTITEM, TVGN_CHILD, p_start, ,ahk_id %TV_hwTV% 
	child = %ErrorLevel% 
	loop
	{
		;set TVITEM item handle 
		NumPut(child, sTV, 4)    
	    RemoteBuf_Write(r_sTV, sTV, 40)		

		;get the text
		SendMessage TVM_GETITEM, 0, r_stvAdr ,, ahk_id %TV_hwTV% 
		VarSetCapacity(txt, 128, 1)
	    RemoteBuf_Read(bufID, txt, 64 ) 

		if (p_mode=0)
			if (txt = p_txt)
				break
		
		if (p_mode=1)
			 if InStr(txt, p_txt)
				break


		;get next sybiling
		SendMessage TVM_GETNEXTITEM, TVGN_NEXT, child, ,ahk_id %TV_hwTV% 
		child = %ErrorLevel% 
		if (child=0)
			break
	}

	RemoteBuf_Close( r_sTV )
	RemoteBuf_Close( r_txt )
	RemoteBuf_Close( bufID )

	return %child%
}


;----------------------------------------------------------------------------------------- 
; Function: GetTxt
;			Get the text of the item with given handle
;
; Parameters:
;			item	- Handle of the item which text is to be returned
;
; Returns:
;			Item's text
;
TV_GetTxt( item )
{
	global TV_hwHost, TV_hwTV, TVM_GETITEM

	;open remote buffers 
	bufID   := RemoteBuf_Open(TV_hwHost, 128) 
	bufAdr  := RemoteBuf_Get(bufID) 

	r_sTV	 := RemoteBuf_Open(TV_hwHost, 40) 
	r_stvAdr := RemoteBuf_Get(r_sTV) 

	VarSetCapacity(sTV,   40, 1)    ;10x4 = 40 
	NumPut(0x011,  sTV, 0)   ;set mask to TVIF_TEXT | TVIF_HANDLE  = 0x001 | 0x0010  
	NumPut(bufAdr, sTV, 16)  ;set txt pointer 
	NumPut(127,    sTV, 20)  ;set txt size 

	;set TVITEM item handle 
    NumGet(item, sTV, 4)    
    RemoteBuf_Write(r_sTV, sTV, 40)

	;get the text
    SendMessage TVM_GETITEM, 0, r_stvAdr ,, ahk_id %TV_hwTV% 

	;read from remote buffer
	VarSetCapacity(txt, 128, 1)
    RemoteBuf_Read(bufID, txt, 64 ) 

	RemoteBuf_Close( bufID )
	RemoteBuf_Close( r_sTV )

	return txt
}

;----------------------------------------------------------------------------------------- 
; Get the location of selected item in the TreeView hierarchy
;
;	Returns: item1\item2...\...\selected_item
;
TV_GetPath() 
{ 
    global TV_hwHost, TV_hwTV, TVM_GETITEM, TVM_GETNEXTITEM, TVGN_PARENT, TVGN_NEXT, TVGN_ROOT, TVGN_CARET

   ;open remote buffers 
	bufID   := RemoteBuf_Open(TV_hwHost, 64) 
	bufAdr   := RemoteBuf_Get(bufID) 

	r_sTV   := RemoteBuf_Open(TV_hwHost, 40) 
	r_stvAdr   := RemoteBuf_Get(r_sTV) 

	;get root 
	SendMessage TVM_GETNEXTITEM, TVGN_ROOT, 0, ,ahk_id %TV_hwTV% 
	root = %ErrorLevel% 
    
	;get current selection 
	SendMessage TVM_GETNEXTITEM, TVGN_CARET, 0, ,ahk_id %TV_hwTV% 
	item = %ErrorLevel% 

	VarSetCapacity(sTV,   40, 1)     ;10x4 = 40 
	NumPut(0x011,   sTV, 0)   ;set mask to TVIF_TEXT | TVIF_HANDLE  = 0x001 | 0x0010  
	NumPut(bufAdr,  sTV, 16)  ;set txt pointer 
	NumPut(127,     sTV, 20)  ;set txt size 
    
	VarSetCapacity(txt, 64, 1) 

	loop 
	{ 
      ;set TVITEM item handle 
      NumPut(item, sTV, 4)    
      RemoteBuf_Write(r_sTV, sTV, 40) 

      ;send tv_getitem message 
      SendMessage TVM_GETITEM, 0, r_stvAdr ,, ahk_id %TV_hwTV% 

      ;read from remote buffer and append the path 
      RemoteBuf_Read(bufID, txt, 64 )

      ;check for the drive 
      StringGetPos i, txt, :
      if i > 0 
      { 
         StringMid txt, txt, i, 2 
         epath = %txt%\%epath%
         break 
      } 
      else 
         epath := txt "\" epath

      ;get parent
      SendMessage TVM_GETNEXTITEM, TVGN_PARENT, item, ,ahk_id %TV_hwTV% 
      item = %ErrorLevel% 
      if (item = root) 
         break 
   } 

	RemoteBuf_Close( bufID ) 
	RemoteBuf_Close( r_sTV ) 


	StringLeft epath, epath, strlen(epath)-1 
	return epath 
} 

;----------------------------------------------------------------------------------------- 
; PRIVATE
;-----------------------------------------------------------------------------------------

TV_getResString( p_clsid )
{
	key = SOFTWARE\Classes\CLSID\%p_clsid%
	RegRead res, HKEY_LOCAL_MACHINE, %key%, LocalizedString
	
;get dll and resource id 
	StringGetPos idx, res, -, R
    StringMid, resID, res, idx+2, 256
	StringMid, resDll, res, 2, idx - 2
	resDll := TV_ExpandEnvVars(resDll)
	
;get string from resource
	VarSetCapacity(buf, 256)
	hDll := DllCall("LoadLibrary", "str", resDll)
	Result := DllCall("LoadString", "uint", hDll, "uint", resID, "str", buf, "int", 128)

	return buf
}

;----------------------------------------------------------------------------------------- 

TV_expandEnvVars(ppath)
{
	VarSetCapacity(dest, 2000) 
	DllCall("ExpandEnvironmentStrings", "str", ppath, "str", dest, int, 1999, "Cdecl int") 
	return dest
}

;--------------------------------------------------------------------------------------------------------------------- 
; Group: About 
;      o Ver 1.0 by majkinetor. See <http://www.autohotkey.com/forum/topic17299.html>
;      o Licenced under Creative Commons Attribution-Noncommercial <http://creativecommons.org/licenses/by-nc/3.0/>

Check out my scripts.  (MyIpChanger) (XPSnap) (SavePictureAs) All my scripts are tested on Windows 7, AutoHotkey 32 bit Ansi unless otherwise stated.

BrandonHotkey
  • Members
  • 691 posts
  • Last active: Oct 21 2015 09:41 PM
  • Joined: 21 May 2012
Thanks a lot!

DataLife
  • Members
  • 1022 posts
  • Last active: Nov 27 2015 01:09 AM
  • Joined: 27 Apr 2008
I recommend anyone that posts a NEW link to a AutoHotkey.net deleted file should also go to the original thread and post the same NEW link.

So that anyone that is attempting to download from the original thread finds the link broken they can continue reading thru the posts and find the NEW link.

I suspect as time goes on this thread will get quite large and difficult to look for a particular repost of an AutoHotkey.net deleted script.
DataLife
Check out my scripts.  (MyIpChanger) (XPSnap) (SavePictureAs) All my scripts are tested on Windows 7, AutoHotkey 32 bit Ansi unless otherwise stated.

rbrtryn
  • Members
  • 1177 posts
  • Last active: Sep 11 2013 08:04 PM
  • Joined: 22 Jun 2011
Finally got around to updating this thread, sorry for the delay.

I also found this resource for majkinetor's scripts here.

My Scripts are written for the latest released version of AutoHotkey.

Need a secure, accessible place to backup your stuff? Use Dropbox!


BrandonHotkey
  • Members
  • 691 posts
  • Last active: Oct 21 2015 09:41 PM
  • Joined: 21 May 2012
[module] RemoteBuffer 2.0
<!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?t=12251&highlight=remote+buffer">viewtopic.php?t=12251&highlight=remote+buffer</a><!-- l -->

Download link is broken.

BTW:
The RTV 1.0 (?) script above depends on RemoteBuffer, but I need to know what version of RemoteBuffer I need. I have now some version and it does not work with it (AHK-L). The example which is by RTV link uses call RemoteBuf_Open(TV_hwHost, 128) but the function is definated as 3 args fnc RemoteBuf_Open(ByRef H, hwnd, size).

DataLife
  • Members
  • 1022 posts
  • Last active: Nov 27 2015 01:09 AM
  • Joined: 27 Apr 2008

[module] RemoteBuffer 2.0
<!-- l --><a class="postlink-local" href="http://www.autohotkey.com/community/viewtopic.php?t=12251&highlight=remote+buffer">viewtopic.php?t=12251&highlight=remote+buffer</a><!-- l -->

Download link is broken.

BTW:
The RTV 1.0 (?) script above depends on RemoteBuffer, but I need to know what version of RemoteBuffer I need. I have now some version and it does not work with it (AHK-L). The example which is by RTV link uses call RemoteBuf_Open(TV_hwHost, 128) but the function is definated as 3 args fnc RemoteBuf_Open(ByRef H, hwnd, size).


Here is Ver 2.0 by majkinetor
;	Title:	Remote Buffer
;			*Read and write process memory*
;

/*-------------------------------------------------------------------------------
	Function: Open
			  Open remote buffer

	Parameters:
			H		- Reference to variable to receive remote buffer handle
			hwnd    - HWND of the window that belongs to the process
			size    - Size of the buffer

	Returns:
			Error message on failure
 */
RemoteBuf_Open(ByRef H, hwnd, size) {
	static MEM_COMMIT=0x1000, PAGE_READWRITE=4

	WinGet, pid, PID, ahk_id %hwnd%
	hProc   := DllCall( "OpenProcess", "uint", 0x38, "int", 0, "uint", pid) ;0x38 = PROCESS_VM_OPERATION | PROCESS_VM_READ | PROCESS_VM_WRITE
	IfEqual, hProc,0, return A_ThisFunc ">   Unable to open process (" A_LastError ")"
      
	bufAdr  := DllCall( "VirtualAllocEx", "uint", hProc, "uint", 0, "uint", size, "uint", MEM_COMMIT, "uint", PAGE_READWRITE)
	IfEqual, bufAdr,0, return A_ThisFunc ">   Unable to allocate memory (" A_LastError ")"

	; Buffer handle structure:
	 ;	@0: hProc
	 ;	@4: size
	 ;	@8: bufAdr
	VarSetCapacity(H, 12, 0 )
	NumPut( hProc,	H, 0) 
	NumPut( size,	H, 4)
	NumPut( bufAdr, H, 8)
}

/*----------------------------------------------------
	Function: Close
			  Close the remote buffer

	Parameters:
			  H - Remote buffer handle
 */
RemoteBuf_Close(ByRef H) {
	static MEM_RELEASE = 0x8000
	
	handle := NumGet(H, 0)
	IfEqual, handle, 0, return A_ThisFunc ">   Invalid remote buffer handle"
	adr    := NumGet(H, 8)

	r := DllCall( "VirtualFreeEx", "uint", handle, "uint", adr, "uint", 0, "uint", MEM_RELEASE)
	ifEqual, r, 0, return A_ThisFunc ">   Unable to free memory (" A_LastError ")"
	DllCall( "CloseHandle", "uint", handle )
	VarSetCapacity(H, 0 )
}

/*----------------------------------------------------
	Function:   Read 
				Read from the remote buffer into local buffer

	Parameters: 
         H			- Remote buffer handle
         pLocal		- Reference to the local buffer
         pSize		- Size of the local buffer
         pOffset	- Optional reading offset, by default 0

Returns:
         TRUE on success or FALSE on failure. ErrorMessage on bad remote buffer handle
 */
RemoteBuf_Read(ByRef H, ByRef pLocal, pSize, pOffset = 0){
	handle := NumGet( H, 0),   size:= NumGet( H, 4),   adr := NumGet( H, 8)
	IfEqual, handle, 0, return A_ThisFunc ">   Invalid remote buffer handle"	
	IfGreaterOrEqual, offset, %size%, return A_ThisFunc ">   Offset is bigger then size"

	VarSetCapacity( pLocal, pSize )
	return DllCall( "ReadProcessMemory", "uint", handle, "uint", adr + pOffset, "uint", &pLocal, "uint", size, "uint", 0 ), VarSetCapacity(pLocal, -1)
}

/*----------------------------------------------------
	Function:   Write 
				Write local buffer into remote buffer

	Parameters: 
         H			- Remote buffer handle
         pLocal		- Reference to the local buffer
         pSize		- Size of the local buffer
         pOffset	- Optional writting offset, by default 0

	Returns:
         TRUE on success or FALSE on failure. ErrorMessage on bad remote buffer handle
 */

RemoteBuf_Write(Byref H, byref pLocal, pSize, pOffset=0) {
	handle:= NumGet( H, 0),   size := NumGet( H, 4),   adr := NumGet( H, 8)
	IfEqual, handle, 0, return A_ThisFunc ">   Invalid remote buffer handle"	
	IfGreaterOrEqual, offset, %size%, return A_ThisFunc ">   Offset is bigger then size"

	return DllCall( "WriteProcessMemory", "uint", handle,"uint", adr + pOffset,"uint", &pLocal,"uint", pSize, "uint", 0 )
}

/*----------------------------------------------------
	Function:   Get
				Get address or size of the remote buffer

	Parameters: 
         H		- Remote buffer handle
         pQ     - Query parameter: set to "adr" to get address (default), to "size" to get the size or to "handle" to get Windows API handle of the remote buffer.

	Returns:
         Address or size of the remote buffer
 */
RemoteBuf_Get(ByRef H, pQ="adr") {
	return pQ = "adr" ? NumGet(H, 8) : pQ = "size" ? NumGet(H, 4) : NumGet(H)
}

/*---------------------------------------------------------------------------------------
Group: Example
(start code)
	;get the handle of the Explorer window
	   WinGet, hw, ID, ahk_class ExploreWClass

	;open two buffers
	   RemoteBuf_Open( hBuf1, hw, 128 ) 		
	   RemoteBuf_Open( hBuf2, hw, 16  ) 

	;write something
	   str := "1234" 
	   RemoteBuf_Write( hBuf1, str, strlen(str) ) 

	   str := "_5678" 
	   RemoteBuf_Write( hBuf1, str, strlen(str), 4) 

	   str := "_testing" 
	   RemoteBuf_Write( hBuf2, str, strlen(str)) 


	;read 
	   RemoteBuf_Read( hBuf1, str, 10 ) 
	   out = %str% 
	   RemoteBuf_Read( hBuf2, str, 10 ) 
	   out = %out%%str% 

	   MsgBox %out% 

	;close 
	   RemoteBuf_Close( hBuf1 ) 
	   RemoteBuf_Close( hBuf2 ) 
(end code)
 */

/*-------------------------------------------------------------------------------------------------------------------
	Group: About
	o Ver 2.0 by majkinetor. See http://www.autohotkey.com/forum/topic12251.html
	o Code updates by infogulch
	o Licenced under Creative Commons Attribution-Noncommercial <http://creativecommons.org/licenses/by-nc/3.0/>.  
 */

Check out my scripts.  (MyIpChanger) (XPSnap) (SavePictureAs) All my scripts are tested on Windows 7, AutoHotkey 32 bit Ansi unless otherwise stated.