Jump to content
Sign in to follow this  

hotkey("^v", "Paste")

Recommended Posts


I tried this this script and it kept sending the details I copied

#include <MsgBoxConstants.au3>
ToolTip('Script is "Running"', 0, 0)
Global $fPaused = False
HotKeySet("^v", "Paste");1st option, keeps on sending the copied details even if I did not press hotkey

Func Paste()
Local $1 = WinWaitActive("[CLASS:TFrmSpec]")

If $1 then
ControlSend($1, "", "TDBEdit1", "^v")

Endfunc; forgot to put this

While 1 ;2nd option

    If _IsPressed('11') = 1 Then
        ControlClick("Title", "", "[CLASS:TDBEdit; INSTANCE:1]")
        Send("^v"); keeps on sending the copied details even if I did not press 11

Func _IsPressed($hexKey)

   Local $aR, $bO

    $hexKey = '0x' & $hexKey
    $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey)
    If Not @error And BitAND($aR[0], 0x8000) = 0x8000 Then
        $bO = 1
        $bO = 0

    Return $bO
EndFunc   ;==>_IsPressed

what am I doing wrong?

EDIT: forgot to put endfunc. but its working fine the problem is, it keeps sending data that i copied, to the edit box, if windows is active. I did not even press the hotkey. you can try it to other edit box

Edited by 232showtime

ill get to that... i still need to learn and understand a lot of codes graduated.gif

Correct answer, learn to walk before you take on that marathon.

Share this post

Link to post
Share on other sites

example not working here, had to add:

#include <Misc.au3>
 Local $vDLL = 'user32.dll'

And gives syntax error at:

Func _IsPressed($hexKey)


Paster - Main function is to paste text, but has more functions.

OpenW - Open With... alternative, Open any file with any application, set it's icon, set application as default.

Renamer - Rename files and folders, remove portions of text from the filename etc.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples


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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.