Shift-Tab

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Shift-Tab

Post by mightycpa » Mon Mar 15, 2021 5:47 pm

Will this code:

Code: Select all

  Press Shift
  Repeat>v_tab_repeat
    Press Tab
    Let>v_tab_repeat=%v_tab_repeat%-1
  Until>%v_tab_repeat%=0
  Release Shift
press a successive number of Shift-Tabs? My script is acting like it is pressing Shift-Enter instead, and also, I think when Shift gets released, Macro Scheduler in the tray opens up. Is there some keyboard shortcut that opens MS from the tray?

Also, CWD seems to care more about where the log is, rather than where the script resides.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Re: Shift-Tab

Post by mightycpa » Mon Mar 15, 2021 6:42 pm

Check it out:

Image
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Re: Shift-Tab

Post by mightycpa » Mon Mar 15, 2021 9:34 pm

Also, I'm starting to get a Dangerous Assignment error for this line:

Code: Select all

    Let>v_tab_repeat=%v_tab_repeat%-1
It says it is a self-referencing assignment and then it wants to reset the value to zero. I don't want it to be zero.

How is this any different than:

Code: Select all

Let>k=0
Repeat>k
   Let>k=k+1   <------ THIS LINE
  Message>file_names_%k%
Until>k,file_names_count
Is it the percent signs?
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

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

Re: Shift-Tab

Post by obfusc88 » Tue Mar 16, 2021 1:36 am

Be sure to use
Let>VAREXPLICIT=1
for the %....% variables. It then requires the %..% when referencing the variable.
If VAREXPLICIT=0, then it always uses the literal values that follow.
The default if you do not define it =0.

From the HELP file:

Code: Select all

Explicit Variable Resolution - VAREXPLICIT 

You can tell Macro Scheduler only to resolve variables that are contained within % symbols and to leave 
anything else as literals by setting the VAREXPLICIT variable to 1:

Let>VAREXPLICIT=1

The default is 0 and will cause default behaviour as described above - i.e. Macro Scheduler will look at
any parameter to see if it is a variable. If a variable with that name exists, the value assigned to
that variable is used, otherwise just that literal value is used.  Setting VAREXPLICIT to 1 stops this
behaviour and tells Macro Scheduler only to resolve a variable if it is contained within % symbols.  

Eg.
Let>VAREXPLICIT=1
Let>Name=Fred
Send>Name
Send>%Name%

In this case the first Send> command will send the literal 'Name' and the second would send the value 'Fred'.  In the following example, which is the default behaviour, both Send> commands would send the value 'Fred':

Let>VAREXPLICIT=0
Let>Name=Fred
Send>Name
Send>%Name%

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Re: Shift-Tab

Post by mightycpa » Tue Mar 16, 2021 2:08 pm

Thanks. I ended up reverting back to the way that Marcus does it, and that resolved my problems. I don't know for certain, but I think that this structure is what bothers it:

Code: Select all

Repeat>X

Until>X=Y
It seems to like this instead:

Code: Select all

Repeat>Y

Until>Y=X
It's a subtle difference, but it is different.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

mightycpa
Automation Wizard
Posts: 343
Joined: Mon Jan 12, 2004 4:07 pm
Location: Vienna, VA

Re: Shift-Tab

Post by mightycpa » Tue Mar 16, 2021 2:11 pm

Because MS won't click the Tab buttons my particular case (it seems to work in other cases, although I haven't checked if the keys light up), I went in the other direction, and now I use the keyboard wherever an MS key click in ineffective. The keyboard is easy to summon and dismiss, and its keys are easy to identify with a picture and easy to click. So, works in a pinch.
"A facility for quotation covers the absence of original thought." - Lord Peter Wimsey

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