I wrote a script:
Run Program>C:\WINNT\system32\CMD.EXE
Run Program>C:\WINNT\system32\calc.exe
WindowAction>1,C:\WINNT\system32\CMD.EXE
Send Character/Text>d:\unison
I find it realy works in normal situation but failed when computer locked. It seemed setFoucus can not work when computer lock. Anybody help me?
setFocus and Lock computer
Moderators: Dorian (MJT support), JRL
Hi,
When your computer is locked there are no windows. There is no console and windows do not exist. You can't see them, they aren't there. Therefore SetFocus isn't going to work.
Macro Scheduler works by simulating a user and needs the same same level of access and visibility. For GUI automation which involves sending keystrokes, mouse events and detecting and focusing windows the machine needs to be unlocked as it does if you were going to use the computer yourself.
When your computer is locked there are no windows. There is no console and windows do not exist. You can't see them, they aren't there. Therefore SetFocus isn't going to work.
Macro Scheduler works by simulating a user and needs the same same level of access and visibility. For GUI automation which involves sending keystrokes, mouse events and detecting and focusing windows the machine needs to be unlocked as it does if you were going to use the computer yourself.
MJT Net Support
[email protected]
[email protected]
Re: Support
Thanks for your reply.
I am in trouble in writing scrpit. I want to implement following function.
1. Open command window.
2. Key in command line to execute specify program.(This program can not execute by Run Program mode directly.)
3. Execute this command.
How can I do it? Thank you very very much.
I am in trouble in writing scrpit. I want to implement following function.
1. Open command window.
2. Key in command line to execute specify program.(This program can not execute by Run Program mode directly.)
3. Execute this command.
How can I do it? Thank you very very much.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
I tried to write a batch file like this:
d:\unison -batch
Then I put it in Run Program and call this file. Unfortunately, it cannot work. The DOS interface only flashed for one second then disappeared.
I am crazing. Now I have to execute the command manually.
Please help me to reslove it. Thanks a lot.
d:\unison -batch
Then I put it in Run Program and call this file. Unfortunately, it cannot work. The DOS interface only flashed for one second then disappeared.
I am crazing. Now I have to execute the command manually.
Please help me to reslove it. Thanks a lot.
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
(Assuming Windows OS)
Name of batch file can be like pgm_name.bat
Batch file could look something like this:
==================
c:
cd\program_path
command_to_run_program.exe
=======================
Macro Scheduler script commands could look like:
1. You may also need to create a PIF file for the batch file to control other attributes when running the program. After the batch file has been created, just right click on the batch file in Explore, Click on Properties, and set values on tabbed pages as needed.
2. Read the MS Help section on Run Program command.
3. You can also activate logging and look at the log results. (Currently the log writes at the end of a command executing, not when it is initally called).
4. You can also debug from Editor, using Debug, turn on Show Watch List, Insert a **BREAKPOINT** at the end of the script, click on the RUN icon, and see the final values of the variables in the watch list. Or on a more complex script, use Single Step to see the result of the script commands after each line.
Hope this helps.........good luck.
Name of batch file can be like pgm_name.bat
Batch file could look something like this:
==================
c:
cd\program_path
command_to_run_program.exe
=======================
Macro Scheduler script commands could look like:
Notes:Label>Start
Let>RP_WINDOWMODE=1
Let>RP_WAIT=1
Run Program>command.com /c pgm_name.bat
If>RP_RESULT>31,Good,Bad
Label>Bad
MessageModal> Program did not run properly%CRLF%Error code was %RP_RESULT%.
Goto>End
Label>Good
MessageModal>Program ran successfully
Goto>End
Label>End
1. You may also need to create a PIF file for the batch file to control other attributes when running the program. After the batch file has been created, just right click on the batch file in Explore, Click on Properties, and set values on tabbed pages as needed.
2. Read the MS Help section on Run Program command.
3. You can also activate logging and look at the log results. (Currently the log writes at the end of a command executing, not when it is initally called).
4. You can also debug from Editor, using Debug, turn on Show Watch List, Insert a **BREAKPOINT** at the end of the script, click on the RUN icon, and see the final values of the variables in the watch list. Or on a more complex script, use Single Step to see the result of the script commands after each line.
Hope this helps.........good luck.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact: