F9 forces the Debug Menu to open

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
obfusc88
Pro Scripter
Posts: 85
Joined: Wed Mar 14, 2007 6:22 pm

F9 forces the Debug Menu to open

Post by obfusc88 » Sat Apr 17, 2021 2:44 am

Trying to step thru code. Using F8 is ok, then pressing F9 pops up the Debug Menu. It normally would go into the Run mode from that point. Happens in many locations. Here is current code with problem:

Code: Select all

//Earlier code that opens FireFox for the first time.
.....
.....
Let>vOpen=NO
GoSub>OpenWebPage
....
//Processing data on first web page.
.....
// Need to change web pages now
//cannot get URL to update.
**BREAKPOINT**
Label>Personal
Let>vWebPage=https://dashboard.xxxx_private_xxxx/admin/people/%vID_1%/edit
Let>vPageTitle=%vName_1% - ZZZ*
//Next line is the second time opening a FireFox page.  Do Not use RunProgram.
Let>vOpen=YES
//Already have Focus on page
//Use F6 or ALT-D or CTL-L to get to address bar
//Press F6
Press ALT
SendText>D
Release>ALT
SendText>%vWebPage%
Press ENTER
**BREAKPOINT**
GoSub>OpenWebPage
Here is the SRT that opens the web page.

Code: Select all

SRT>OpenWebPage
//Only RunProgram when first starting to control multiple Firefox tabs
If>%vOpen%=NO
  RunProgram>C:\Program Files\Mozilla Firefox\firefox.exe %vWebPage%
EndIf

WaitWindowOpen>%vPageTitle%
SetFocus>%vPageTitle%

//Other lines tried to make the SendText> section to work
//WaitWindowFocused>%vPageTitle%
//Use WW_TIMEOUT ?
//Use WW_RESULT ?
Wait>3
End>OpenWebPage

The actual problem is that I am trying to change web pages in FireFox and it is not executing.
I tried F6 and it was working for a while, then stopped, so I am now trying ALT-D, with same result. Trying to step thru, but need RUN on keystrokes, find that cannot do ALT/CRL-keys with F8.

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1347
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: F9 forces the Debug Menu to open

Post by Dorian (MJT support) » Mon Apr 19, 2021 12:30 pm

I'm hoping I've understood correctly. If you're sending ALT-D to an application and the Macro Scheduler Editor Debug menu is opening, that suggests you've lost focus and it's focused on Macro Scheduler instead. Alt-D is the shortcut for debug. So let's ensure the window is focused.

Also it seems that Ctrl-D isn't doing what you're expecting - Ctrl-d does.

As an aside, I have also replaced Send> with putting the new URL in the clipboard and then using CTRL-v. Sometimes long text strings can cause issues (not all characters being accepted, speed, bogging down the target. The way around this (when it happens) is to put the variable into the clipboard and then paste it.

Code: Select all

Let>NewURL=https://www.mjtnet.com/
RunProgram>C:\Program Files\Mozilla Firefox\firefox.exe https://uk.yahoo.com/?p=us&guccounter=1
WaitWindowOpen>Yahoo UK*
Wait>0.5

setfocus>Yahoo UK*
WaitWindowFocused>Yahoo UK*
Wait>1

//Lower case d
Press Alt
Send>d
Release Alt
wait>1

putclipboard>NewURL
press ctrl
send>v
release ctrl
press enter
Yes, we have a Custom Scripting Service. Message me or go here

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