Jump to content

Search the Community

Showing results for tags 'tabsheet multiple-script'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Probably the title is not correct,but here is what i would like to learn.. 1) I have 2 scripts from other users that embed a cmd window in their own guis. 2) I made a gui with 2 tab sheets and i want to put the one script in one tabsheet and the other script to the other tabsheet. (cmd's functions and buttons) is that possible ? this is a simple gui i made with koda This is the code #include #include #include #include #include #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 627, 416, 192, 114) $Tab1 = GUICtrlCreateTab(8, 16, 609, 361) $TabSheet1 = GUICtrlCreateTabItem("TabSheet1") $Button1 = GUICtrlCreateButton("Button1", 16, 328, 75, 25) $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") $Button2 = GUICtrlCreateButton("Button2", 24, 344, 75, 25) GUICtrlCreateTabItem("") $StatusBar1 = _GUICtrlStatusBar_Create($Form1) _GUICtrlStatusBar_SetMinHeight($StatusBar1, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd This is the 1 script by autoit/user Country73 #include #include #include Opt("GUIOnEventMode", 1) Global $MAIN, $CMD_WINDOW Global $IP_CONFIG, $OTHER, $BUTT_CLOSE #Region ### START Koda GUI section ### Form= $MAIN = GUICreate("CMD FUNCTIONS", 623, 449, 192, 114) $CMD_WINDOW = GUICtrlCreateEdit("", 10, 10, 600, 289, BitOR($ES_AUTOVSCROLL,$ES_AUTOHSCROLL,$ES_READONLY,$WS_VSCROLL)) GUICtrlSetFont($CMD_WINDOW, 12, 800, 0, "Times New Roman") GUICtrlSetColor($CMD_WINDOW, 0xFFFFFF) GUICtrlSetBkColor($CMD_WINDOW, 0x000000) $IP_CONFIG = GUICtrlCreateButton("IP_CONFIG", 10, 310, 75, 25) GUICtrlSetOnEvent($IP_CONFIG, "_IP_CONFIGClick") $OTHER = GUICtrlCreateButton("OTHER", 95, 310, 75, 25) GUICtrlSetOnEvent($OTHER, "_OTHERClick") $BUTT_CLOSE = GUICtrlCreateButton("EXIT", 535, 310, 75, 25) GUICtrlSetOnEvent($BUTT_CLOSE, "_ExitNow") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func _ExitNow() Exit EndFunc Func _IP_CONFIGClick() Local $foo = Run(@ComSpec & " /c " & "IPCONFIG /ALL",@SystemDir,@SW_HIDE,$STDOUT_CHILD) Local $line While 1 $line = StdoutRead($foo) If @error Then ExitLoop If Not $line = "" Then GUICtrlSetData($CMD_WINDOW,$line) WEnd EndFunc Func _OTHERClick() GUICtrlSetData($CMD_WINDOW,"Create a CMD Function to be ran here") EndFunc And this is the 2 script by autoit/user MrCreatoR (4 years old but works) #include Opt("GUIOnEventMode", 1) Global $Init_Dir = "C:" $Main_GUI = GUICreate("Embed Command Line Prompt", 550, 300, 10, 10) GUISetOnEvent($GUI_EVENT_CLOSE, "Quit") GUIRegisterMsg(0xF, "WM_PAINT") $iCmd_PID = Run(@ComSpec & " /k CD " & $Init_Dir, "", @SW_HIDE) ProcessWait($iCmd_PID) $Embed_hWnd = _GetHWndByPID($iCmd_PID) WinMove($Embed_hWnd, "", -2, -23, 549, 342) WinSetState($Embed_hWnd, "", @SW_SHOWMINIMIZED) GUISetState(@SW_SHOW, $Main_GUI) DllCall("user32.dll", "hwnd", "SetParent", "hwnd", $Embed_hWnd, "hwnd", $Main_GUI) While 1 Sleep(100) If WinActive($Main_GUI) Then WinActivate($Embed_hWnd) WEnd Func Quit() ProcessClose($iCmd_PID) Exit EndFunc Func _GetHWndByPID($iPID) Local $aWinList = WinList() For $i = 1 To UBound($aWinList)-1 If WinGetProcess($aWinList[$i][1]) = $iPID Then Return $aWinList[$i][1] Next Return 0 EndFunc Func WM_PAINT($hWnd, $Msg, $wParam, $lParam) DllCall("user32.dll", "int", "InvalidateRect", "hwnd", $hWnd, "ptr", 0, "int", 0) EndFunc Thanks in advance
×
×
  • Create New...