Debugger sends keystrokes to itself?

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
rsochan
Newbie
Posts: 2
Joined: Tue Aug 08, 2006 1:34 am

Debugger sends keystrokes to itself?

Post by rsochan » Tue Aug 08, 2006 2:24 am

I was hoping to debug my first very first script (yes, I'm a first time user) and instead it appears to send my commands and keystrokes to the script window instead of my app (i.e. "Press Tab * 3" ends up putting 3 unnecessary tabs in my script). Shouldn't the commands/keystrokes in the script be sent to the window that was active before I selected Debug / Step from the Script Editor window? I have the Refocus Windows option checked, but that doesn't seem to make any difference.

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 » Tue Aug 08, 2006 2:42 am

In the Edtor/Debug, be sure you have a checkmark in the box for Refocus Windows.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

rsochan
Newbie
Posts: 2
Joined: Tue Aug 08, 2006 1:34 am

Post by rsochan » Tue Aug 08, 2006 5:06 pm

As I already mentioned in my original post, I have already made sure that Refocus Windows is checked.

I wonder if it has something to do with the fact that the script is supposed to start when my app is on a modal dialog box, and Macro Scheduler is unable to get focus on that window?

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Tue Aug 08, 2006 5:09 pm

Probably. There are situations where the debugger is unable to switch focus and therefore keysends end up in the debugger. A conundrum of debugging an automation script I'm afraid. E.g. starting the script part way through after a focus line will also have that effect.
MJT Net Support
[email protected]

User avatar
pgriffin
Automation Wizard
Posts: 460
Joined: Wed Apr 06, 2005 5:56 pm
Location: US and Europe

Post by pgriffin » Tue Aug 08, 2006 6:25 pm

not that this solves the refocus issue when Debugging, but I find it very usefull to wrap ALL my variables in % (%variable%) and turn on logging so that the log file shows as many variable values as possible. You might also put a few MessageModal> commands in the script to report to you the current values held in some key variables or system settings.

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