Hints, tips and tricks for newbies
Moderators: JRL, Dorian (MJT support)
-
koleviko
- Junior Coder
- Posts: 45
- Joined: Thu Nov 20, 2008 2:59 pm
Post
by koleviko » Thu Aug 20, 2009 11:14 am
BlockInput>1
ExecuteFile>cmd.exe,
GetTime>Time
let>b=Time
Let>WW_TIMEOUT=2
WaitWindowOpen>C:\WINDOWS\system32\cmd.exe*
If>WW_RESULT=FALSE,End
Send Character/Text>The time is :
wait>0.2
send>b
wait>0.3
send> o.k.
wait>0.2
press enter
wait>2
Send Character/Text>Good Bye
BlockInput>0
label>End
Do not send the message in the CMD window open, and open windows of other programs, Skype, IE and others. How to get text to go in the CMD window ???
-
Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
-
Contact:
Post
by Bob Hansen » Thu Aug 20, 2009 12:50 pm
You need to use a SetFocus> commnad before you use Send/Press/MouseMove* commands. Only need to do once for the window until you move focus to another window, then will need to do it again for that window.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
-
gdyvig
- Automation Wizard
- Posts: 447
- Joined: Fri Jun 27, 2008 7:57 pm
- Location: Seattle, WA
Post
by gdyvig » Thu Aug 20, 2009 2:30 pm
Hi koleviko,
In addition to Bob's advice you may also need to add this command prior to the Send/Press commands to command prompt (DOS) windows:
Let>SK_LEGACY=1
For most other windows this is not required.
Gale
-
koleviko
- Junior Coder
- Posts: 45
- Joined: Thu Nov 20, 2008 2:59 pm
Post
by koleviko » Thu Aug 20, 2009 2:31 pm
That already works well.
Thanks!
