DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 47VAFBsV026851 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=YtJ9XsBX X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F9F73864C5D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1725099309; bh=89VXIykaPolWD6QtvMKOtFNpeq4wXJMmUMVwTih/DkY=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=YtJ9XsBXpwyJYJJ26bQSSbpqXFlo45agj2eDc4dwYpWlR4rN6D+VCe+9TlThP3kAk m2/5mJLrvim4iCaUBYsWGJzrF7FEFCCh52rjtuwYaw+VGAn84t6WeQ9p4YsI1v6o5G CvC3Od13ouGYaTDcBjIdC1g75P0/+PBPm5wjShcI= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 337D73858D28 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 337D73858D28 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725099258; cv=none; b=dFLyVjiejqLDEtLkvjyrsOPKgyBUJARrZkTwoqgltM6FocidyiZWQiyN2RV5eW1UMCaS02Mxk1RzezrB74wRT68NUUM/8P9y5IV6NXL41AZRqcnK1GkJwCKMkCjIGye3/jAPoRBTzuTQLZddjOSwWqfam3HtzjxvvAWixAf5sLM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725099258; c=relaxed/simple; bh=MPJxfPcXycwoL61/p/8UCDlB5kkpVpatZW6pGAhT4MY=; h=DKIM-Signature:Date:To:From:Subject:Message-ID:MIME-Version; b=SpqT/qf6nknC8x3wnugCBFsa2KlUrG3L0dUxrTHgFtWJso4In3iXqfDMd6YO2CkgKDPCJ14pxd4AxQ05eBmGck436hhJvI32oTMpMTTFW3dMZ+gS/Mmjkek99mgm8HlwKMb2ww93o7zhC00plabd6LUxoQx1MpW1tJLZls8Svwg= ARC-Authentication-Results: i=1; server2.sourceware.org Date: Sat, 31 Aug 2024 10:14:09 +0000 To: "cygwin AT cygwin DOT com" Subject: Fw: tcl puzzle for cygwin tcl'ers SOLVED Message-ID: Feedback-ID: 65268012:user:proton X-Pm-Message-ID: 5978e8f22118856077ec647706419854ec795d8f MIME-Version: 1.0 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_INFOUSMEBIZ, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Jim McNamara via Cygwin Reply-To: Jim McNamara Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Cygwin" Hi- with AI I got this solution to fly. sorry for the confusion. I wasnt breaking it into steps and then expanding it in eval. I also fixed my display issues. thanks so much, have coolest day. jim #!/usr/bin/env wish package require Tk # Function to dynamically build and execute a command proc execute_docker_cp {} { set container_id "dde8bab92d8cd55efa7946bc0184c23e3f1f3c7e6d0f070fd45f0a7f2ebd4932" set container_path "/home/masterblasterx1001/foo/xyz" set local_path "c:/Users/stealth_droid" # Construct the Docker cp command dynamically set docker_command "\"$container_id:$container_path\" \"$local_path\"" # Output the command for debugging purposes # puts "Executing command: $docker_command" # Execute the Docker command using exec try { # Store the command and its arguments in a list set docker_command [list "docker" "cp" "$container_id:$container_path" "$local_path"] # Execute the command and capture its output # Print the output set output [exec {*}$docker_command] } on error {msg} { puts "Output of '[join $docker_command " "]':" tk_messageBox -message $msg } } # Create GUI proc create_gui {} { global top set top [toplevel .t] wm title $top "Docker Command Executor" # Create and pack the button button $top.execute -text "Execute Docker Command" -command execute_docker_cp pack $top.execute -padx 10 -pady 10 # Start the Tk event loop tkwait window $top } # Main script create_gui -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple