alphanumeric numbering

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Basic
Newbie
Posts: 1
Joined: Sun Feb 10, 2008 3:21 am

alphanumeric numbering

Post by Basic » Sun Feb 10, 2008 3:31 am

I wanted to name this post as please god help but decided against it, also couldn't remember username so just went Basic

Have this script, I believe its from Aldos, really need to get this into Macro Scheduler in a bad way, if anyone has their ear to the ground and hears me, please send help, thanks

{script}
counter = 297

letter1 = 0
letter2 = 0

'-- set name
sname = chr(65 + letter1) & chr(65 + letter2)

'-- Increase letter AA to AB, AC, AD, ... BA, BB, ... etc.
letter2 = letter2 + 1
if letter2 >= 26 then
letter2 = 0
letter1 = letter1 + 1
end if

sendkeys2 "name " & sname
wait 100
clickdown 545,369
wait 172
clickup 545,369
loop
{/script}

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sun Feb 10, 2008 7:12 pm

Here:

Code: Select all

VBSTART
VBEND

//advisable to to focus the app first unless you run this from a hotkey
//SetFocus>window_title

Let>counter=297
Let>letter1=0
Let>letter2=0

Label>start
  '-- set name
  VBEval>chr(65 + %letter1%) & chr(65 + %letter2%),sname

  '-- Increase letter AA to AB, AC, AD, ... BA, BB, ... etc.
  Let>letter2=letter2+1
  if>letter2>25
    Let>letter2=0
    Let>letter1=letter1+1
  Endif

  Send>name %sname%
  Wait>0.5
  MouseMove>545,369
  LClick

  Wait>0.1
Goto>start
This will loop indefinitely. Not sure if that's what you want. I'd advise you to add the SetFocus line at the top to focus the window you want the keys sent to, unless you don't care that they land on whichever window is active (when you run this script from the Macro Scheduler window Macro Scheduler itself will be active).
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

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