shortcut will not work

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Aaron
Pro Scripter
Posts: 113
Joined: Mon Apr 09, 2007 1:35 am
Location: Wyoming

shortcut will not work

Post by Aaron » Tue May 15, 2007 6:35 pm

Im having trouble with getting the shortcut on firefox to go to the address bar
shortcut is ctrl + L

Code: Select all

wait>1
SetFocus>Mozilla Firefox
Press>Ctrl
Send>L
Release>Ctrl
any thoughts would be helpful

thanks
Aaron

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 May 15, 2007 8:05 pm

Try lowercase

Send>l
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Tue May 15, 2007 10:12 pm

Hi Aaron,

Bob's probably right about that Capital L... you want to use a lowercase l.

Also... "Press>Ctrl" and "Release>Ctrl" is not proper syntax, you want just "Press CTRL" and "Release CTRL", try the code below:

Code: Select all

Wait>1
SetFocus>Mozilla Firefox
Press CTRL
Send>l
Release CTRL
This should work fine... as long as no one presses your "Caps Lock" key. As soon as that happens, the script will likely fail as the Send> command is now going to be sending a Capital L... and we're back to the same old problem.

Thankfully, we now have a slick solution to this problem that was implimented in Version 9.0 11/10/2006 - see this post for the background. Here it is, copied straight from the Help file on the Send> command:
  • Note that this command sends keystrokes and therefore any keys sent will be subject to the current state of modifier keys and the caps lock key. To ignore the caps lock state and send the text as entered set SK_IGNORECAPS to 1. (Let>SK_IGNORECAPS=1).
So... here's your code again, only this version will keep working no matter what state your Caps Lock key is in:

Code: Select all

Let>SK_IGNORECAPS=1
Wait>1
SetFocus>Mozilla Firefox
Press CTRL
Send>l
Release CTRL
Hope this was helpful. Let us know if this works for you... and take care.
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

Aaron
Pro Scripter
Posts: 113
Joined: Mon Apr 09, 2007 1:35 am
Location: Wyoming

Thanks again

Post by Aaron » Wed May 16, 2007 4:22 pm

Let>SK_IGNORECAPS=1 Dose not work but the lower case will.

Not sure if its a version problem or something else.

Thanks
Aaron

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 » Wed May 16, 2007 4:30 pm

For the record, I have used both of these formats for years with success:

Press CTRL
Press>CTRL

I think I started by using the ">" and had no issues. Then some years later I discovered that I had been doing it "wrong" and started to leave out the ">", but old habits are hard to break, and I still find myself using "Press>"
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Post by jpuziano » Wed May 16, 2007 5:12 pm

Bob Hansen wrote:For the record, I have used both of these formats for years with success:

Press CTRL
Press>CTRL

I think I started by using the ">" and had no issues. Then some years later I discovered that I had been doing it "wrong" and started to leave out the ">", but old habits are hard to break, and I still find myself using "Press>"
:shock: Thanks for bringing that to light Bob. If you enter the following two lines into the Advanced Editor...
  • Press CTRL
    Press>CTRL
...you'll see that the first line gets colored blue (a recognized command) while the second line stays black (unrecognized... which I took to mean... not a valid command).

Also, in the "Press" topic in the Help file, there is not a > character anywhere so... I assumed including the > was not proper syntax. :oops:

Since Press commands of the form: Press>SOME_KEY currently work, I know they'll have to keep working. We're not going to get around that one... to change that would break old scripts and that would be very bad.

As it stands though, this functionality is undocumented and the way the syntax highlighting works for this is actually misleading. To maintain the highest standards of documentation and consistency we've come to expect from Macro Scheduler, I'd recommend the following two fixes:

  1. The Advanced Editor color syntax highlighting should recognize both forms of the Press commands; both with and without the > should show up in bright blue because... they are both valid.
  2. A note should be added to the "Press" topic in the Help file (and the on-line help) that the "Press>SOME_KEY" form of the command is also valid (though perhaps not preferred).
Do you agree Marcus?

Thanks again Bob for clarifying that... :)
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

User avatar
jpuziano
Automation Wizard
Posts: 1085
Joined: Sat Oct 30, 2004 12:00 am

Re: Thanks again

Post by jpuziano » Wed May 16, 2007 5:19 pm

Aaron wrote:Let>SK_IGNORECAPS=1 Dose not work but the lower case will.

Not sure if its a version problem or something else.

Thanks
What version are you using?
jpuziano

Note: If anyone else on the planet would find the following useful...
[Open] PlayWav command that plays from embedded script data
...then please add your thoughts/support at the above post - :-)

Aaron
Pro Scripter
Posts: 113
Joined: Mon Apr 09, 2007 1:35 am
Location: Wyoming

what version

Post by Aaron » Wed May 16, 2007 8:34 pm

Version 9.054 pro
Aaron

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Wed May 16, 2007 9:06 pm

Yes, thanks Bob. I always found that very confusing.

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