You have to login in order to post a reply to this topic.

4 replies [Last post]
schmutly
User offline. Last seen 28 weeks 3 days ago. Offline
Joined: 12/22/2009
Posts: 18

Hello all. I was looking for a bit of some guidence on this one.
What i am trying to do is this:
1.open a txt file full of items and simply PASTE those items into a software window
i have open. These items are for example tools, ie: screwdriver,hammer,blade etc...
I wrote the script and if i use NOTEPAD to test it...it works. Each item is taken from list and using the send keys:{Control}({V}) it pastes it into notepad, then another sendkey: ENter
to toggle to the next line. Great...exactly what i wanted.

Now the problem is i don't want to use notepad...i want this clipboard  text to be pasted into a software program window i have open. I used the FOCUS window...and it pops up BUT nothing gets pasted into the text window.
Yet...if i manually CTRL+V into the text box the clipboard pastes it in.
So WHY isnt it focus on the window and paste into text box?
OR...do i need to use image capture to tell it EXACTLY where to paste it?
INTO the caption PART..is what i need.
Also...if i want to CLICK "save and new" button...i need to use WHAT to click it?
Is this possible with winautomation?

Here is a screengrab of window i want populated:

Heres a pic of the script so far:

THANKS   for any help,

Robbie.

AttachmentSize
propertyopen.jpg17.72 KB
winautoscript.jpg37.62 KB
D.M.Altizer
User offline. Last seen 1 year 11 weeks ago. Offline
Joined: 01/12/2010
Posts: 204
Re: Wont paste into software window

 Hm... Are you sure that the cursor is actually in the field that you want it to be?

Basically, I can see 3 different reasons why the specific job may not be working for you:

1) The cursor is not placed in the specific field where you want to send the Ctrl+V. Solution: Send a mouse click or use tabs to get the cursor there.

2) The Control+V is being sent too fast. Solution: add a {Delay 1000} in the send keys action before the Control+V that will pause the job for 1 second.

3) The application may not be accepting Control+V for some weird reason. Solution: Try sending the text directly without placing it into the clipboard. Place the %CurrentItem% directly in the Send keys action.

__________________

==Dedicated Automation Solutions==

__________________

==Dedicated Automation Solutions==

schmutly
User offline. Last seen 28 weeks 3 days ago. Offline
Joined: 12/22/2009
Posts: 18
Re: Wont paste into software window

Ok...thanks..i will give that a try.
but it doesnt seem to be No 1...as i can click mouse MANUALLY in that field ( to HELP it along)
and it still not pastes...but if i use the keyboard it works.

I will test out 2 and 3 and report back,

Thanks muchly,
Robbie

schmutly
User offline. Last seen 28 weeks 3 days ago. Offline
Joined: 12/22/2009
Posts: 18
Re: Wont paste into software window

UPdate:

I got it to work...i can give details later.

What my problem is NOW: When i compile it as exe it does nothing, and only works in the designer....any thoughts?

Thanks,
Robbie

UPDATE:

I needed to give the executable Admin Priv. and then it worked...excellent :P

Chow, Robbie

D.M.Altizer
User offline. Last seen 1 year 11 weeks ago. Offline
Joined: 01/12/2010
Posts: 204
Re: Wont paste into software window

 haha glad that it worked m8 :D

__________________

==Dedicated Automation Solutions==

__________________

==Dedicated Automation Solutions==