Jump to content

Why isnt the copying & pasting working in this?


bb01
 Share

Recommended Posts

Why isnt the copy & pasting working??

Any ideas??

Have tried multiple things & never getting it right...

#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=psi.ico
#AutoIt3Wrapper_Compression=4
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt('MustDeclareVars', 1)


Example()

; Simple example: Embedding an Internet explorer Object inside an AutoIt GUI
;
; See also: http://msdn.microsoft.com/workshop/brows...r/reference/objects/internetex
Func Example()
    Local $oIE, $GUIActiveX, $GUI_Button_A, $GUI_Button_USB, $GUI_Button_Copy, $GUI_Button_Paste
    Local $GUI_Button_CD, $GUI_Button_Delete, $msg, $iItems, $aDrive, $aButtons, $oHTTP

$aDrive = DriveGetDrive("all")



    $oIE = ObjCreate("Shell.Explorer.2")

    ; Create a simple GUI for our output
    GUICreate("Resume Templates", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
    $GUIActiveX = GUICtrlCreateObj ($oIE, -215, 0, 855, 550)
    $GUI_Button_A    = GUICtrlCreateButton("A:\", 10, 560, 80, 20)
    $GUI_Button_CD = GUICtrlCreateButton("CD", 95, 560, 80, 20)
    $GUI_Button_USB = GUICtrlCreateButton("USB", 180, 560, 80, 20)
    $GUI_Button_Delete = GUICtrlCreateButton("Delete", 265, 560, 80, 20)
    $GUI_Button_Copy = GUICtrlCreateButton("Copy", 350, 560, 80, 20)
    $GUI_Button_Paste = GUICtrlCreateButton("Paste", 435, 560, 80, 20)

    GUISetState()       ;Show GUI

    $oIE.navigate(@DesktopDir & "\SAVE")

    ; Waiting for user to close the window
    While 1

        $msg = GUIGetMsg()

        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop

            Case $msg = $GUI_Button_CD
                $oIE.navigate($aDrive[3]&"\")

            Case $msg = $GUI_Button_A
                $oIE.navigate($aDrive[1]&"\")

            Case $msg = $GUI_Button_USB
               $oIE.navigate($aDrive[4]&"\")

            Case $msg = $GUI_Button_Delete
               Send("{DELETE}")

               Case $msg = $GUI_Button_Copy
               Send("{COPY}")

               Case $msg = $GUI_Button_Paste
               Send("{PASTE}")

        EndSelect

    WEnd

    GUIDelete()
EndFunc
Edited by bb01
Link to comment
Share on other sites

Why isnt the copy & pasting working??

Any ideas??

Have tried multiple things & never getting it right...

Case $msg = $GUI_Button_Copy
               Send("{COPY}")

               Case $msg = $GUI_Button_Paste
               Send("{PASTE}")

{COPY} AND {PASTE} are not keys that can be sent

A list of things that can be sent can be found here

http://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm

Link to comment
Share on other sites

There isnt key in send named

{COPY} or {PASTE}

Look in the help file for CTRL operator and then do ctrl+c ctrl+v

(in the help file send() command ! ^ + )

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.

 
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...