Jump to content
Sign in to follow this  
notwilltoledo

Copy/Paste and opening inspect element

Recommended Posts

My little simple script works fine up until line 41, where it doesn't copy the text I've highlighted (code below). While doing Ctrl V, it still pastes what I previously had in my clipboard, but also opens inspect element? Any Ideas? At the bottom of the SciLite window it tells me:

>
>The parameter is incorrect.
#include <AutoItConstants.au3>
;#include <EditConstants.au3>
;#include <GUIConstantsEx.au3>
;#include <WindowsConstants.au3>
;#include <FileConstants.au3>
;#include <MsgBoxConstants.au3>
;#include <WinAPIFiles.au3>
AutoItSetOption("MouseCoordMode", 0)
HotKeySet("!{F12}","leave") ; press alt+f12 to insta quit
Func leave()
    Exit
EndFunc

; Double click at the x, y position of 0, 500.
MouseClick($MOUSE_CLICK_LEFT, 347, 1013, 2)

sleep(1500)

MouseClick($MOUSE_CLICK_LEFT, 70, 300, 1)

sleep(1500)

MouseClick($MOUSE_CLICK_LEFT, 70, 150, 1)

Send("Name")

Send("{TAB}");<= to change to some other field

Send("Pass")

sleep(1500)

MouseClick($MOUSE_CLICK_LEFT, 70, 220, 1)

sleep(1500)

MouseClickDrag($MOUSE_CLICK_LEFT, 90, 130, 50, 130)

;attempted copy paste
;Send("{LCTRL DOWN}")
Send("^{C}")
;Send("{LCTRL UP}")

MouseClick($MOUSE_CLICK_LEFT, 50, 130, 0)

Send("{TAB}")
;Send("")
;Send()
Send("^{V}")

 

Share this post


Link to post
Share on other sites

@notwilltoledo

The "c" character is not a special key, so, just use "^c" to Copy and "^v" to paste.

Pay attention at the capitalization of the characters, since "c" and "C" are threatened differently in the Send() function :)

Edited by FrancescoDiMuro

Click here to see my signature:

Spoiler

ALWAYS GOOD TO READ:

 

Share this post


Link to post
Share on other sites
5 minutes ago, FrancescoDiMuro said:

@notwilltoledo

The "c" character is not a special key, so, just use "^c" to Copy and "^v" to paste.

Pay attention at the capitalization of the characters, since "c" and "C" are threatened differently in the Send() function :)

Thank you so much! Any way I can +rep?

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...