Jump to content

Recommended Posts

Posted (edited)

Hello everyone!

I know there are many programs (including freeware) for this purpose, but the best ones are paid (very expensive), only give you 5 minutes section...

I thought about: Why not in AutoIt? So I did!

Is not full, there is still a few things to be done, but it is quite functional!

What already does:

1 - Remote Viewing (of course)

2 - Control by mouse, clicks, 2 clicks, scrolling (MouseWheel)

3 - Control by keyboard, now is complete!

4 - Supports all languages​​, currently English and Portuguese

5 - ChatBox conversation

6 - Save the current image into file

7 - Two types of compression: LZMA (level 2) and LZNT native

8 - Show remote cursor (Yes, you can use!)

9 - Capture only the window that is active (very fast, recommended!)

What left to do:

1 - Save the section on avi movie (in progress)

2 - Send and receive files in a simple gui

3 - Drag & Drop files and folders to remote computer (in progress)

4 - Need more?

Here are some sample images:

Posted ImagePosted ImagePosted ImagePosted ImagePosted Image

Posted Image

Update (02/10/2011 - 11:57)

Download:

DVI-Remote_(RedirectLink).html

2.09k (Previous downloads: 817)

I have tested on:

Product: VMware® Workstation

Version: 7.1.0 build-261024

Network Adapter: Bridged (Connected directly to the physical network)

and: Two real PCs (in different networks)

Credits:

ProgAndy: Keyboard and Mouse functions.

Yashied: WinAPIEx.au3, NotifyBox.au3

trancexx: _LZNTCompress.au3

Ward: LZMA Compression Machine Code UDF

Free Software

Redistribute and change under these terms:

1 - This program is free software: you can redistribute it and / or modify it under the terms of the GNU General Public License

As published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

2 - This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without even the implied warranty

of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

3 - You should have received a copy of the GNU General Public License along with this program.

If not, see http://www.gnu.org/licenses.

João Carlos.

Edited by JScript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Posted

I will have to test as it didn't work in VB (VirtualBox), though I was trying local loopback! (same machine) I will let you know about performance when I get the chance in the next couple of days.

UDF List:

 
_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_ArrayFilter/_ArrayReduce_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 22/04/2018

Posted (edited)

@guinness

OK, as Loopback truly it would not work!

Works for me on:

Product: VMware® Workstation

Version: 7.1.0 build-261024

Network Adapter: Bridged (Connected directly to the physical network)

João Carlos.

Edited by jscript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Posted

Question: Someone know how to send all keys to the remote computer?

I think, you should register a keyboard-hook, send the event and then recreate it with keybd_event.

http://msdn.microsoft.com/en-us/library/ms644990%28VS.85%29.aspx - WH_KEYBOARD

http://msdn.microsoft.com/en-us/library/ms646304%28VS.85%29.aspx

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Posted

WinAPIEx contains _WinAPI_Keybd_Event and all constants, WinAPI contains _WinAPI_SetWindowsHookEx.

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Posted

I know... But I could not yet! I'm doing some tests...

Play around with this function off the help docs, shows you just exactly how to do it right there.

#AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <WinAPI.au3>
#include <WindowsConstants.au3>
#include <StructureConstants.au3>
Opt('MustDeclareVars', 1)
Global $hHook, $hStub_KeyProc, $buffer = ""
_Main()
Func _Main()
    OnAutoItExitRegister("Cleanup")
    Local $hmod
    $hStub_KeyProc = DllCallbackRegister("_KeyProc", "long", "int;wparam;lparam")
    $hmod = _WinAPI_GetModuleHandle(0)
    $hHook = _WinAPI_SetWindowsHookEx($WH_KEYBOARD_LL, DllCallbackGetPtr($hStub_KeyProc), $hmod)
    MsgBox(4096, "", "Click OK, then in notepad type..." & _
            @LF & @LF & "Jon" & @LF & "AutoIt" & @LF & @LF & "Press Esc to exit script")
    Run("Notepad")
    WinWait("Untitled -")
    WinActivate("Untitled -")
    While 1
        Sleep(10)
    WEnd
EndFunc   ;==>_Main
Func EvaluateKey($keycode)
    If (($keycode > 64) And ($keycode < 91)) _ ; a - z
            Or (($keycode > 96) And ($keycode < 123)) _ ; A - Z
            Or (($keycode > 47) And ($keycode < 58)) Then ; 0 - 9
        $buffer &= Chr($keycode)
        Switch $buffer
            Case "Jon"
                ToolTip("What can you say?")
            Case "AutoIt"
                ToolTip("AutoIt Rocks")
        EndSwitch
    ElseIf ($keycode > 159) And ($keycode < 164) Then
        Return
    ElseIf ($keycode = 27) Then ; esc key
        Exit
    Else
        $buffer = ""
    EndIf
EndFunc   ;==>EvaluateKey
;===========================================================
; callback function
;===========================================================
Func _KeyProc($nCode, $wParam, $lParam)
    Local $tKEYHOOKS
    $tKEYHOOKS = DllStructCreate($tagKBDLLHOOKSTRUCT, $lParam)
    If $nCode < 0 Then
        Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam)
    EndIf
    If $wParam = $WM_KEYDOWN Then
        EvaluateKey(DllStructGetData($tKEYHOOKS, "vkCode"))
    Else
        Local $flags = DllStructGetData($tKEYHOOKS, "flags")
        Switch $flags
            Case $LLKHF_ALTDOWN
                ConsoleWrite("$LLKHF_ALTDOWN" & @CRLF)
            Case $LLKHF_EXTENDED
                ConsoleWrite("$LLKHF_EXTENDED" & @CRLF)
            Case $LLKHF_INJECTED
                ConsoleWrite("$LLKHF_INJECTED" & @CRLF)
            Case $LLKHF_UP
                ConsoleWrite("$LLKHF_UP: scanCode - " & DllStructGetData($tKEYHOOKS, "scanCode") & @TAB & "vkCode - " & DllStructGetData($tKEYHOOKS, "vkCode") & @CRLF)
        EndSwitch
    EndIf
    Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam)
EndFunc   ;==>_KeyProc
Func Cleanup()
    _WinAPI_UnhookWindowsHookEx($hHook)
    DllCallbackFree($hStub_KeyProc)
EndFunc   ;==>Cleanup
Posted (edited)

The lowlevel-hook is not a good choice. Here is an example for WH_KEYBOARDHOOK. Click start, while the GUI is active type some keys, then stop, then choose an edit-area as target and press F9 :graduated:

#include<WinAPI.au3>
#include<WinAPIEx.au3>
 
Global $sStoredData = "", $fRecord = False
HotKeySet("{F9}", "_Resend")
 
$myGUI = GUICreate("")
$btn = GUICtrlCreateButton("Start", 10, 10)
GUISetState()
 
 
Global Const $ghcbKeyboardProc = DllCallbackRegister("_KeyboardProc", "lresult", "int;wparam;lparam")
Global Const $ghKeybordHook = _WinAPI_SetWindowsHookEx($WH_KEYBOARD, DllCallbackGetPtr($ghcbKeyboardProc), 0, _WinAPI_GetCurrentThreadId())
OnAutoItExitRegister("_gc")
 
While 1
 
    Switch GUIGetMsg()
        Case -3
            Exit
        Case $btn
            $fRecord = Not $fRecord
            GUICtrlSetData($btn, "Start")
            If $fRecord Then GUICtrlSetData($btn, "Stop")
    EndSwitch
 
WEnd
 
Func _Resend()
    If WinActive($myGUI) Then Return
    $s = $sStoredData
    $sStoredData = ""
    ConsoleWrite($s & @LF)
    For $s In StringSplit($s, "|", 2)
        If $s = "" Then ContinueLoop
        $a = StringSplit($s, ";", 2)
        $iFlags = 0
        If $a[1] = "true" Then $iFlags = BitOR($iFlags, $KEYEVENTF_EXTENDEDKEY)
        If $a[2] = "true" Then $iFlags = BitOR($iFlags, $KEYEVENTF_KEYUP)
        _WinAPI_Keybd_Event(Number($a[0]), $iFlags)
    Next
EndFunc
 
Func _gc()
    _WinAPI_UnhookWindowsHookEx($ghcbKeyboardProc)
EndFunc
 
 
 
Func _KeyboardProc($nCode, $wParam, $lParam)
    If $nCode < 0 Or Not $fRecord Then Return _WinAPI_CallNextHookEx($ghKeybordHook, $nCode, $wParam, $lParam)
 
    Local $nVKeyCode = Number($wParam)
    Local $fExtendedKey = BitAND($lParam, 2^24) <> 0
    Local $fKeyUp = BitAND($lParam, 2^31) <> 0
 
    $sStoredData &= $nVKeyCode & ";" & $fExtendedKey & ";" & $fKeyUp & "|"
 
    Return 0xDEAD ; kill the key event
    Return _WinAPI_CallNextHookEx($ghKeybordHook, $nCode, $wParam, $lParam)
EndFunc

PS: This should cover all keyboard input, even Winkey, Ctrl etc. As a result, keycombinations like Ctrl-C, Ctrl-V can be sent, too.

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Posted (edited)

@THAT1ANONYMOUSEDUDE

I had already seen this example, I'm just having difficulty adapting...

@ProgAndy

I'll do some tests and then I return!

Edit: Wonderful example, I will try to adapt this code!

João Carlos.

Edited by jscript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Posted (edited)

@ProgAndy

Perfect! Now the challenge is the mouse event...

How to send these mouse codes using the same function as in the example you posted?

; 0x01 - Left mouse button
; 0x02 - Right mouse button
; 0x03 - Control-break processing
; 0x04 - Middle mouse button (three-button mouse)
; 0x05 - X1 mouse button
; 0x06 - X2 mouse button

What do you think of including in your UDF (WinAPIEx.au3) this function:

_WinAPI_Mouse_Event()

References:

http://msdn.microsoft.com/en-us/library/ms646260%28v=vs.85%29.aspx

http://msdn.microsoft.com/en-us/library/ms646310%28v=vs.85%29.aspx

João Carlos.

Edited by jscript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Posted

The mouse events should be captured with WH_MOUSEHOOK and MouseProc. It should be very similar to the keyboard hook.

http://msdn.microsoft.com/en-us/library/ms644988%28VS.85%29.aspx

Using _WinAPI_Keybd_Event as an example, you should be able to create the dllcall for mouse_event, too :graduated:

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Posted

Muito bom cara parabens! admiro seus scripts.

Poxa percebi que tu ta entrando la no autoit script brasil, eu era mod la tambem...

tem como me add msn pra trocar umas ideias? xbenny@live.com Obrigado.

Posted (edited)

@XBenny

Thank you, glad you enjoyed!

Note: Comments here only in English, we will respect the native language of the forum!

And no, I do not use MSN and exchange of information about AutoIt, only in related forums, so we will enrich the database of information so that other people have access and knowledge!

João Carlos.

Edited by jscript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Posted

The mouse events should be captured with WH_MOUSEHOOK and MouseProc. It should be very similar to the keyboard hook.

http://msdn.microsoft.com/en-us/library/ms644988%28VS.85%29.aspx

Using _WinAPI_Keybd_Event as an example, you should be able to create the dllcall for mouse_event, too :graduated:

OK, Thanks for the info, I'll try this!

João Carlos.

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Posted

The mouse events should be captured with WH_MOUSEHOOK and MouseProc. It should be very similar to the keyboard hook.

http://msdn.microsoft.com/en-us/library/ms644988%28VS.85%29.aspx

Using _WinAPI_Keybd_Event as an example, you should be able to create the dllcall for mouse_event, too :graduated:

I tried, but crashed the entire computer! If you could help me just one more time...

João Carlos.

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Posted

When I think about it, it will be better to register the window messages for mouse events and use them:

GUIRegisterMsg($WM_LBUTTONDBLCLK, "_WM_MOUSE")
GUIRegisterMsg($WM_LBUTTONDOWN, "_WM_MOUSE")
GUIRegisterMsg($WM_LBUTTONUP, "_WM_MOUSE")

GUIRegisterMsg($WM_MBUTTONDBLCLK, "_WM_MOUSE")
GUIRegisterMsg($WM_MBUTTONDOWN, "_WM_MOUSE")
GUIRegisterMsg($WM_MBUTTONUP, "_WM_MOUSE")

GUIRegisterMsg($WM_RBUTTONDBLCLK, "_WM_MOUSE")
GUIRegisterMsg($WM_RBUTTONDOWN, "_WM_MOUSE")
GUIRegisterMsg($WM_RBUTTONUP, "_WM_MOUSE")

GUIRegisterMsg($WM_XBUTTONDBLCLK, "_WM_MOUSE")
GUIRegisterMsg($WM_XBUTTONDOWN, "_WM_MOUSE")
GUIRegisterMsg($WM_XBUTTONUP, "_WM_MOUSE")

GUIRegisterMsg($WM_MOUSEHWHEEL, "_WM_MOUSE")
GUIRegisterMsg($WM_MOUSEWHEEL, "_WM_MOUSE")
GUIRegisterMsg($WM_MOUSEMOVE, "_WM_MOUSE")
 
...
 

Func _WM_MOUSE($hWnd, $uMsg, $wParam, $lParam)
    Switch $uMsg

        Case $WM_LBUTTONDBLCLK
            $iMouse_Event = $MOUSEEVENTF_LEFTDOWN
        Case $WM_LBUTTONDOWN
            $iMouse_Event = $MOUSEEVENTF_LEFTDOWN
        Case $WM_LBUTTONUP
            $iMouse_Event = $MOUSEEVENTF_LEFTUP

        Case $WM_MBUTTONDBLCLK
            $iMouse_Event = $MOUSEEVENTF_MIDDLEDOWN
        Case $WM_MBUTTONDOWN
            $iMouse_Event = $MOUSEEVENTF_MIDDLEDOWN
        Case $WM_MBUTTONUP
            $iMouse_Event = $MOUSEEVENTF_MIDDLEUP

        Case $WM_MOUSEHWHEEL
            $iMouse_Event = $MOUSEEVENTF_HWHEEL

        Case $WM_MOUSEMOVE
            $iMouse_Event = $MOUSEEVENTF_MOVE

        Case $WM_MOUSEWHEEL
            $iMouse_Event = $MOUSEEVENTF_WHEEL

        Case $WM_RBUTTONDBLCLK
            $iMouse_Event = $MOUSEEVENTF_RIGHTDOWN
        Case $WM_RBUTTONDOWN
            $iMouse_Event = $MOUSEEVENTF_RIGHTDOWN
        Case $WM_RBUTTONUP
            $iMouse_Event = $MOUSEEVENTF_RIGHTUP

        Case $WM_XBUTTONDBLCLK
            $iMouse_Event = $MOUSEEVENTF_XDOWN
        Case $WM_XBUTTONDOWN
            $iMouse_Event = $MOUSEEVENTF_XDOWN
        Case $WM_XBUTTONUP
            $iMouse_Event = $MOUSEEVENTF_XUP
        Case Else
            Return 'GUI_RUNDEFMSG'
    EndSwitch
... send mouse_event here
EndFunc

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Posted (edited)

@ProgAndy

Thanks for your help!

New Source!

Download Link on the first page! http://www.autoitscript.com/forum/topic/...ensource/page__view__findpost_

João carlos.

Edited by jscript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...