Jump to content
Sign in to follow this  
Grantson

detecting a paste command

Recommended Posts

Grantson

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

Share this post


Link to post
Share on other sites
FireFox

Hi,

You can set a non blocking hotkey on the Ctrl+V using Yashied's HotKey UDF.

Br, FireFox.


 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
somdcomputerguy

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.


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
Grantson

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

Share this post


Link to post
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
Sign in to follow this  

×