JOHN1990 Posted April 28, 2015 Share Posted April 28, 2015 (edited) 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>$hGUI = GUICreate("Test", 800, 600, -1, -1, BitOr($WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $WS_CLIPCHILDREN))$PID = Run("notepad.exe", "", @SW_HIDE)$hWnd = 0$stPID = DllStructCreate("int")Do $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] ExitLoop EndIf EndIf Next Sleep(100)Until $hWnd <> 0$stPID = 0If $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)EndIfGUISetState()While 1 $msg = GUIGetMsg() If $msg = -3 Then ExitLoopWEnd 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 April 28, 2015 by JOHN1990 Link to comment Share on other sites More sharing options...
willichan Posted April 28, 2015 Share Posted April 28, 2015 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. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now