Jump to content

Recommended Posts

Posted

Hello, I have the following problem:

I have 1 Input and 1 button - the goal is If clik the button to copy(grab) Ctrl+C information from the Input and then send it in notepad with Ctrl+V.

help me please - for a 1 week I trying to find a solution

Thancks

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>

Local $data
#Region ### START Koda GUI section ###
$Form1 = GUICreate("form1", 658, 441, 432, 160)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT)
$Dl_Input = GUICtrlCreateInput("", 16, 40, 121, 21)
$b_Down = GUICtrlCreateButton("Download", 144, 40, 75, 25, $WS_GROUP)

$Dowlnloadfile  =     IniWrite("config.ini", "DowlnloadList", "Dowlnloadfile1", $data)



GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $b_Down
          Send($Dowlnloadfile & "^c")
            Sleep(1000)
            Send("^c")



            Run(@WindowsDir & "\Notepad.exe", "", @SW_MAXIMIZE)
             Sleep(1000)
             Send("^v")

        EndSwitch

WEnd





 ;$bak = ClipGet()
; MsgBox(0, "Clipboard contains:", $bak)

; ClipPut($bak & "additional text")
; MsgBox(0, "Clipboard contains:", ClipGet())
Posted (edited)

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>

Local $data
#Region ### START Koda GUI section ###
$Form1 = GUICreate("form1", 658, 441, 432, 160)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH + $GUI_DOCKHEIGHT)
$Dl_Input = GUICtrlCreateInput("", 16, 40, 121, 21)
$b_Down = GUICtrlCreateButton("Download", 144, 40, 75, 25, $WS_GROUP)

$Dowlnloadfile  =     IniWrite("config.ini", "DowlnloadList", "Dowlnloadfile1", $data)



GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $b_Down
            Run(@WindowsDir & "\Notepad.exe", "", @SW_MAXIMIZE)
            WinWaitActive("[CLASS:Notepad]")
            Send(GUICtrlRead($Dl_Input))
    EndSwitch
WEnd

Edit: what m`i missing, and how this connect with IniRead problem?

Whats the point of iniread and Send($Dowlnloadfile & "^c")? explaind what r you trying to do

Edited by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Posted (edited)

I'm not sure to understand your problem Posted Image

#include <File.au3>

$_LogFilePath = _TempFile ( @TempDir, "", ".log", 7 )

$tempfile = FileOpen ( $_LogFilePath, 1 )
FileWrite ( $tempfile, GUICtrlRead ( $Dl_Input ) & @CRLF )
FileClose ( $tempfile )
Run ( @WindowsDir & '\notepad.exe ' & $_LogFilePath, '', @SW_MAXIMIZE )

Is that help you ?

Edited by wakillon

AutoIt 3.3.18.0 X86 - SciTE 5.5.7WIN 11 24H2 X64 - Other Examples Scripts

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
×
×
  • Create New...