Jump to content

detecting a paste command


Grantson
 Share

Recommended Posts

Hi guys 

I'm working on a script to partially automate data entry.

The process starts with the user copying and pasting a unique id from a form 

I want the script to kick in at that point and auto populate the form.

I'm just curious if there is a more elegant way of detecting the paste command than using _ispressed in a nested if 

while 1
If _IsPressed("11") Then
    If _IsPressed("56") Then
        MsgBox(0,"","paste")
        ExitLoop
        EndIf
    EndIf
WEnd

Thanks

Grant

Link to comment
Share on other sites

You are only checking for a 'control v' and there are at least three other methods to paste from the clipboard. It would probably be easier to check if what you want is where you want it.

 

Sadly the later is not an option 

The form is part of our asset database it is a very old version of the software and the windows within the app show up as controls but the buttons and fields within them are invisible

The script is for a small team of us replacing PCs to auto populate the information thats the same for each of the new pcs after they are rolled out so as long as the script will consistently trap ctrl-v im happy to warn them to hit ctrl-v rather than right click > paste

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...