how do u press ctrl+L?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Oblodra
Newbie
Posts: 6
Joined: Sat Jun 07, 2003 1:22 pm

how do u press ctrl+L?

Post by Oblodra » Sat Jun 07, 2003 1:25 pm

i cant seem to be able to do a command of ctrl+L, or any other letter anyway. there isnt a command for Press L...

also, how do u repeat a command for 17 times, then move on to the next process/command?

i would like specific examples for both questions pls. thx for ur time.

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Jun 07, 2003 8:50 pm

Ypu asked:
i cant seem to be able to do a command of ctrl+L, or any other letter anyway. there isnt a command for Press L...
This is how to do that:
Press CTRL
Send Character/Text>L
Release CTRL
Notes:
1. You can use the abbreviation Sen> vs. Send Character/Text>

2. Sometimes you may need a command to Wait>2 or some other value, after each Press or Sen command to adjust to some unknown timing issues.

3. You can also use the line Let>SK_DELAY=2 or some other value, to address some unknkown timing issues with the Sen> command. The default value is 0. This variable can be set at the beginning of your script.
========================

Hope this helps..........good luck,
Bob

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sat Jun 07, 2003 9:23 pm

You asked:
how do u repeat a command for 17 times, then move on to the next process/command?
This is one example of repeating the Message> command multiple times:

Label>Start
Input>Count,How many time do you want to do this? (Between 3-25)
If>%Count%=,End
If>%Count%>25,OutOfRange
If>%Count%OK

Label>OutOfRange
MessageModal>Please enter a number between 3 and 25.
Goto>Start

Label>OK
Let>k=0
Repeat>k
Let>k=k+1
MessageModal>This is message %k% of %Count%.
Until>k,%Count%
Ask>Want to repeat this test?,Result
If>%Result%=YES,Start

Label>End
Message>Tests have been completed.
=========================

Notes:
1. There are multiple ways of repeating commands or creating loops, this is just one sample, with some extra examples too.
2. When using Input> command it is a good idea to check the input value for range of acceptable inputs, or format before continuing to the next step. See example above
3. It is also important to check for no value in case Cancel is selected. See example above.
4. The sequence of validations can be important. If you move the check for no value after the check for less than 3, then this will not work if Cancel was selected.
=========================

Hope this helps..............good luck,
Bob

asdasd

thx

Post by asdasd » Sun Jun 08, 2003 8:14 am

thx for ur help, but i cant get the repeat part right

for example, if i want to leftclick 60 times, then right click 17 times, then go back to left clicking 60 times, then right clicking 17 times, etc etc, how would i do that?

Oblodra
Newbie
Posts: 6
Joined: Sat Jun 07, 2003 1:22 pm

sry for repeating

Post by Oblodra » Sun Jun 08, 2003 8:39 am

i forgot to paste my script in it
can you pls tell me what is wrong wif my script too? i keep getting a msg box error saying

"Error - Label Not found"

this is a part of my script...


Label>start
*etc etc*
MouseMove>100,340
Wait>0.02
Press F3
Wait>0.02
LClick
Wait>0.02
MouseMove>110,340
Wait>0.02
Press F3
Wait>0.02
LClick
Wait>0.02
MouseMove>120,340
Wait>0.02
Press F3
Wait>0.02
LClick
Wait>0.02
MouseMove>130,340
Wait>0.02
Press F3
Wait>0.02
LClick
Wait>0.02
MouseMove>140,340
Wait>0.02
Press F3
Wait>0.02
LClick
Wait>0.02
Goto>ok
Label>ok
Let>k=0
Let>k=k+1
Until>k=60
If>k=60, Goto>gogo
If>kstart
Label>gogo
Press F7
wait>3.0
Press CTRL
wait>0.01
sen>l
wait>0.01
Release CTRL
wait>170.0
Press CTRL
wait>0.01
sen>l
wait>0.01
Release CTRL
Goto>start

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sun Jun 08, 2003 4:11 pm

I saw an Until>k=60.

Two errors there:
1. Wrong syntax for until.
2. Needs a Repeat> statement earlier
=====================
I have tried to modify your sample code as follows:

I have added the red lines outside the quotes. (I have ignored the content of your other existing lines, assuming they are correct). Try this:

let k=0

Label>start
*etc etc*
MouseMove>100,340
Wait>0.02
Press F3
Wait>0.02
LClick
Wait>0.02
MouseMove>110,340
Wait>0.02
Press F3
Wait>0.02
LClick
Wait>0.02
MouseMove>120,340
Wait>0.02
Press F3
Wait>0.02
LClick
Wait>0.02
MouseMove>130,340
Wait>0.02
Press F3
Wait>0.02
LClick
Wait>0.02
MouseMove>140,340
Wait>0.02
Press F3
Wait>0.02
LClick
Wait>0.02
// I have removed the following lines and replaced with the next two following lines
// Goto>ok
// Label>ok
// Let>k=0
// Let>k=k+1
// Until>k=60
// If>k=60, Goto>gogo
// If>kstart
Let>k=k+1
If>k=60,gogo,start

Label>gogo
Press F7
wait>3.0
Press CTRL
wait>0.01
sen>l
wait>0.01
Release CTRL
wait>170.0
Press CTRL
wait>0.01
sen>l
wait>0.01
Release CTRL
Goto>start
==========================
You are also using wrong syntax with your IF> statements. There is no need to put Goto> as part of the decision. That is already built in. The syntax for If> is:
If>ConditionToCheck,TrueDestinationLabel,FalseDestinationLabel. See from example above: If>k=60,gogo,start

Suggest you look at the Help files for each command. They have excellent examples of syntax and usage.
==========================
Hope this helps................good luck,
Bob

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sun Jun 08, 2003 4:17 pm

:oops: OOPS! Watch our for MY MISTAKE:
On the first line I added, I made an error. :oops:

Change from:
let k=60

Change to:
let>k=60

Sorry about that.

(It looks like we can no longer edit our posts!)

Lumumba

Re: thx

Post by Lumumba » Sun Jun 08, 2003 8:25 pm

asdasd wrote:... for example, if i want to leftclick 60 times, then right click 17 times, then go back to left clicking 60 times, then right clicking 17 times, etc etc, how would i do that?

Code: Select all

Let>maxl=60
Let>maxr=77
Let>cc=0

Label>LeftClick
Add>cc,1
LClick
If>cc=%maxl%,RightClick
Goto>LeftClick

Label>RightClick
Add>cc,1
RClick
If>cc=%maxr%,Reset
Goto>RightClick

Label>Reset
Let>cc=0
Goto>LeftClick

Oblodra
Newbie
Posts: 6
Joined: Sat Jun 07, 2003 1:22 pm

thx alot both

Post by Oblodra » Mon Jun 09, 2003 6:18 am

that really helped me out alot... my macro works...

i would like to compliment u for actively helping newbies like me in our queries and questions...



THX

Oblodra
Newbie
Posts: 6
Joined: Sat Jun 07, 2003 1:22 pm

opps

Post by Oblodra » Mon Jun 09, 2003 6:19 am

:oops: eeek! dont tell me wat was wrong... i know =X

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