Jump to content
Sign in to follow this  

TightVNC AutoitGUI

Recommended Posts

Hello Everyone,

I am clearly a beginner in Autoit. I am planning to create  a Gui Interface to run a Tightvnc Viewer extension(.vnc) files as grid. I have about 36  Vnc files that i need to show as a grid.I found a code in this forum calling notepad.exe inside a autoit gui interface. Here is the code..

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
$PID    = Run("notepad.exe", "", @SW_HIDE)

$hWnd    = 0
$stPID    = DllStructCreate("int")
    $WinList = WinList()
    For $i = 1 To $WinList[0][0]
        If $WinList[$i][0] <> "" Then
            DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $WinList[$i][1], "ptr", DllStructGetPtr($stPID))
            If DllStructGetData($stPID, 1) = $PID Then
                $hWnd = $WinList[$i][1]
Until $hWnd <> 0
$stPID = 0
If $hWnd <> 0 Then
    $nExStyle = DllCall("user32.dll", "int", "GetWindowLong", "hwnd", $hWnd, "int", -20)
    $nExStyle = $nExStyle[0]
    DllCall("user32.dll", "int", "SetWindowLong", "hwnd", $hWnd, "int", -20, "int", BitOr($nExStyle, $WS_EX_MDICHILD))
    DllCall("user32.dll", "int", "SetParent", "hwnd", $hWnd, "hwnd", $hGUI)
    WinSetState($hWnd, "", @SW_SHOW)
    WinMove($hWnd, "", 0, 0, 600, 400)
While 1
    $msg = GUIGetMsg()
    If $msg = -3 Then ExitLoop


But what I need is to call for example 7892.vnc,8963.vnc,7895.vnc...etc. like  36 files in a proper coordination in a 6x6 grid.Can someone who is familar with autoit and vnc give me some advice is a big help...

Edited by JOHN1990

Share this post

Link to post
Share on other sites

After opening all of your VNC windows, use WinMove() to put them in a fixed location and size.  Since TightVNC puts the name of the remote PC in the window title, you should have no trouble differentiating each window.

I do this with AS400 sessions on my system.

Share this post

Link to post
Share on other sites

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...