Welcome! Log In Create A New Profile

Advanced

Re: Mouse movements

July 11, 2010 12:01AM
As a workaround on a Windows PC with Excel I put the following lines in a text file titled "movemouseleft100.vbs" and run the file from Tazti's custom commands. Other commands such as "Tab" can be mimiced with other ".vbs" files using the Wscript sendkeys function.


code modified from www.developerscloset.com/?tag=vbscript
----------------------------------------------------------------

Option Explicit
Dim Excel, GetMessagePos, x, y, Count, xChange, yChange

	xChange = "- 0"
	yChange = "- 100"

	Set Excel = Wscript.CreateObject("Excel.Application"winking smiley

	GetMessagePos = excel.ExecuteExcel4Macro("CALL(""user32"",""GetMessagePos"",""J""winking smiley"winking smiley

	x = CLng("&H" & Right(Hex(GetMessagePos), 4))
	y = CLng("&H" & Left(Hex(GetMessagePos), (Len(Hex(GetMessagePos)) - 4)))

	Excel.ExecuteExcel4Macro("CALL(""user32"",""SetCursorPos"",""JJJ""," & x & " " & xChange & "," & y & " " & yChange & "winking smiley"winking smiley
Subject Author Views Posted

Mouse movements

deland 3555 December 25, 2009 11:44AM

Re: Mouse movements

admin 2283 January 25, 2010 03:45AM

Re: Mouse movements

4lex 2455 July 11, 2010 12:01AM



Sorry, only registered users may post in this forum.

Click here to login