Sign in to follow this  
Followers 0
ffutskrow

run/display external program inside autoitWindow?

4 posts in this topic

Is it possible to run, display (and interact with) external applications inside a parent window or in multiple child windows just like embedded IE?

...just curious

Share this post


Link to post
Share on other sites



Is it possible to run, display (and interact with) external applications inside a parent window or in multiple child windows just like embedded IE?

...just curious

Here's a small example with Notepad, but it can be done with any window.

#include <windowsconstants.au3>

$hGui = GUICreate("Captured NotePad", 500, 600, 0, 0, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPCHILDREN))
GUISetState()
If Not WinExists("Untitled") Then MsgBox(0, "Waiting", "Please start NotePad")
WinWait("Untitled")
WinMove("Untitled", "", 0, 0)
$hNotePad = WinGetHandle("Untitled")
guisetstyle ($WS_POPUP, -1, $hNotePad)
Opt("OnExitFunc")

$hOldParent = DllCall("user32.dll", "hwnd", "SetParent", "hwnd", $hNotePad, "hwnd", $hGui)
While 1
    
    If GUIGetMsg() = -3 Then;return NotePad to original owner
        $hOldParent = DllCall("user32.dll", "hwnd", "SetParent", "hwnd", $hNotePad, "hwnd", $hOldParent)
        Exit
    EndIf
    
    
WEnd

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

thank you, martin!

that is exactly what i was looking for

great :)

Share this post


Link to post
Share on other sites

You could also look at: http://www.autoitscript.com/forum/index.ph...st&p=428355 for even more options that are possible.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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  
Followers 0