NEWBIE - HOW TO DO A SIMPLE COPY PASTE

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
jazzjon
Newbie
Posts: 3
Joined: Tue Mar 20, 2007 12:53 pm
Contact:

NEWBIE - HOW TO DO A SIMPLE COPY PASTE

Post by jazzjon » Tue Mar 20, 2007 1:14 pm

Hi. Trying this out because of this problem:
I use opera, firefox and IE. I'm usually in opera and then need to either: save a webpage with Web Research app I have, or Send webpage to OneNote. Both of these only really work right in IE.

I'm very tired of having to go to URL field copy address, switch to IE, paste, load then save the page.

So, using this macro program I did this:

SetFocus>Use Opera without a Mouse - Opera
Press F8
Press F3
SetFocus>vBulletin® - Instant Community - Microsoft Internet Explorer
Press F6
Press F4
Press Enter

SEVERAL PROBLEMS

1. using setfocus: a. I didn't know whether to use window titles or handles. b. didn't know how to find the window handles.

So, I chose the window from the dropdown list.

2. i know it must be there but I can't find commands for simple copy/paste in the script. I couldn't even find out how to do CTRL-C, etc.
So, having a keyboard with a builtin macro function, I assigned copy paste to two F Keys. Those are in the dropdown list for Keyboard Commands. But.. Running the macro, copy/paste doesn't work so it seems like macroscheduler passes the F3 and F4 key along but it doesn't then trigger the copy/paste function setup in the keyboard macro...


I don't want to record it because the windows position change, etc.

Anyway, after trying to fool with this for almost an hour [so I could save time] I'm posting this here to see if someone could help me.

Thanks

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Mar 20, 2007 1:23 pm

For SetFocus, use the window title. The window title is the caption of the window which appears in the top bar of the window.

CTRL-C = press control, then the 'c' key and then release the control key. So in Macro Scheduler this befomres:

Press CTRL
Send>c
Release CTRL

Paste is CTRL-V so you would do:

Press CTRL
Send>v
Release CTRL

It might pay to have a short delay between those, as the script will run faster than it might take the clipboard to refresh. You can use a simple Wait or WaitClipBoard (or both):

Wait>1
WaitClipBoard
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

jazzjon
Newbie
Posts: 3
Joined: Tue Mar 20, 2007 12:53 pm
Contact:

STILL CONFUSED

Post by jazzjon » Tue Mar 20, 2007 3:47 pm

Hi. Thanks for answering.

Re: using the window title. I can see how to do that from the drop down list, but then I have to edit the macro everytime I use it because the window title changes everytime I load a new page. This of course would defeat the purpose of the macro program which was to save time and keystrokes.

Re: copy/paste I'm not sure what you mean. This sounds like instructions for recording while doing.

I have the macro up in the editor and I don't see how to do it.
You didn't tell me which command to use. I assumed it must be under Keyboard commands... but using 'Press' it doesn't let me hold down ctrl etc.. nothing happens.. it has a drop down list though.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Mar 20, 2007 3:57 pm

For changing window titles you can tell it to use a substring match:

SetFocus>- Microsoft Internet Explorer*

That would match any window whose title contained the string "- Microsoft Internet Explorer".

Regarding copy/paste I showed you the script code to perform a copy and a paste. The script for pressing CTRL, then pressing C and then releasing CTRL (holding ctrl down while pressing C) is:

Press CTRL
Send>c
Release CTRL

You can just type that into the editor. Or you can select the Press command form under the Keyboard Commands section of the command locator and select CTRL from the list. Send is also in the list.

E.g. the following macro will set focus to Notepad, peform a select all (CTRL-A) followed by a Copy to Clipboard (CTRL-C):

SetFocus>Notepad*
//CTRL-A
Press CTRL
Send>a
Release CTRL
//CTRL-C
Press CTRL
Send>c
Release CTRL

Press essentially "holds down" the key until there is a corresponding Release. So to press and hold CTRL while pressing 'C' you would do:

Press CTRL
Send>c
Release CTRL

I would encourage you to read the "Scripting Windows for Beginners" guide in the help file before you do anything else.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

jazzjon
Newbie
Posts: 3
Joined: Tue Mar 20, 2007 12:53 pm
Contact:

WHAT? READ THE INSTRUCTIONS FIRST?

Post by jazzjon » Tue Mar 20, 2007 5:19 pm

Ok, I see. Thanks. Must be frustrating for you spelling out things for people in a hurry who don't want to study how to use the program. I see this is a powerful program and could be very useful if I take the time to learn it.

I used to use a program called quickkeys years ago [on apples, no less] and really loved it. Point, click do everything. But somehow when I switched to pc's the version they ported to windows was much worse and so I didn't use it and have been without a macro program since then. Hope this is the one for me.

I think I'll read the instructions now.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts