problem whit two macroscheduler

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
luca1974wow
Newbie
Posts: 15
Joined: Sat Dec 12, 2009 11:20 pm

problem whit two macroscheduler

Post by luca1974wow » Sun Dec 27, 2009 8:39 pm

I use prgram A i want all keys (F1-F12) for make 12 macros
but when i use program B i want keys (F1-F12) make a 12 different macros

i try to copy Macroscheduler box and cange name but dont work

example:
Box macroscheduler1 (whit macro for program A)
Box macroscheduler2 (whit macro for program B)

but when i save macro in boxmacroscheduler1 save the same macro in boxmacroscheduler2

can you help me (sorry for my english)

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Mon Jun 14, 2010 9:41 pm

This uses a custom dialog to select which program "A" or "B" you are working with, and then sets up custom OnEvent Key_Down handlers for whichever program you are using. This should let you in theory setup almost unlimited macros mapped to Function keys - as long as you only use one at a time.

Code: Select all

Dialog>Dialog1
   Caption=Select Program
   Width=232
   Height=208
   Top=132
   Left=40
   Max=1
   Min=1
   Close=1
   Resize=1
   Button=Activate Macro Keys,5,138,140,20,2
   RadioGroup=msRadioGroup1,Select Program,16,8,185,113,Program A%CRLF%Program B,0
EndDialog>Dialog1

  Show>Dialog1,result
  If>result=2,Activate

Label>WaitLoop
  Wait>0.01
Goto>WaitLoop

SRT>Activate
  If>Dialog1.msRadioGroup1=Program A
    OnEvent>KEY_DOWN,VK112,0,SubA_F1
    OnEvent>KEY_DOWN,VK113,0,SubA_F2
    OnEvent>KEY_DOWN,VK114,0,SubA_F3
    OnEvent>KEY_DOWN,VK115,0,SubA_F4
    OnEvent>KEY_DOWN,VK116,0,SubA_F5
    OnEvent>KEY_DOWN,VK117,0,SubA_F6
    OnEvent>KEY_DOWN,VK118,0,SubA_F7
    OnEvent>KEY_DOWN,VK119,0,SubA_F8
    OnEvent>KEY_DOWN,VK120,0,SubA_F9
    OnEvent>KEY_DOWN,VK121,0,SubA_F10
    OnEvent>KEY_DOWN,VK122,0,SubA_F11
    OnEvent>KEY_DOWN,VK123,0,SubA_F12
  Endif
  If>Dialog1.msRadioGroup1=Program B
    OnEvent>KEY_DOWN,VK112,0,SubB_F1
    OnEvent>KEY_DOWN,VK113,0,SubB_F2
    OnEvent>KEY_DOWN,VK114,0,SubB_F3
    OnEvent>KEY_DOWN,VK115,0,SubB_F4
    OnEvent>KEY_DOWN,VK116,0,SubB_F5
    OnEvent>KEY_DOWN,VK117,0,SubB_F6
    OnEvent>KEY_DOWN,VK118,0,SubB_F7
    OnEvent>KEY_DOWN,VK119,0,SubB_F8
    OnEvent>KEY_DOWN,VK120,0,SubB_F9
    OnEvent>KEY_DOWN,VK121,0,SubB_F10
    OnEvent>KEY_DOWN,VK122,0,SubB_F11
    OnEvent>KEY_DOWN,VK123,0,SubB_F12
  Endif
END>Activate

//Program A Subroutines
SRT>SubA_F1
   MessageModal>Program A - F1 key was pressed
END>SubA_F1
SRT>SubA_F2
   MessageModal>Program A - F2 key was pressed
END>SubA_F2
SRT>SubA_F3
   MessageModal>Program A - F3 key was pressed
END>SubA_F3
SRT>SubA_F4
   MessageModal>Program A - F4 key was pressed
END>SubA_F4
SRT>SubA_F5
   MessageModal>Program A - F5 key was pressed
END>SubA_F5
SRT>SubA_F6
   MessageModal>Program A - F6 key was pressed
END>SubA_F6
SRT>SubA_F7
   MessageModal>Program A - F7 key was pressed
END>SubA_F7
SRT>SubA_F8
   MessageModal>Program A - F8 key was pressed
END>SubA_F8
SRT>SubA_F9
   MessageModal>Program A - F9 key was pressed
END>SubA_F9
SRT>SubA_F10
   MessageModal>Program A - F10 key was pressed
END>SubA_F10
SRT>SubA_F11
   MessageModal>Program A - F11 key was pressed
END>SubA_F11
SRT>SubA_F12
   MessageModal>Program A - F12 key was pressed
END>SubA_F12
//Program A Subroutines


//Program B Subroutines
SRT>SubB_F1
   MessageModal>Program B - F1 key was pressed
END>SubB_F1
SRT>SubB_F2
   MessageModal>Program B - F2 key was pressed
END>SubB_F2
SRT>SubB_F3
   MessageModal>Program B - F3 key was pressed
END>SubB_F3
SRT>SubB_F4
   MessageModal>Program B - F4 key was pressed
END>SubB_F4
SRT>SubB_F5
   MessageModal>Program B - F5 key was pressed
END>SubB_F5
SRT>SubB_F6
   MessageModal>Program B - F6 key was pressed
END>SubB_F6
SRT>SubB_F7
   MessageModal>Program B - F7 key was pressed
END>SubB_F7
SRT>SubB_F8
   MessageModal>Program B - F8 key was pressed
END>SubB_F8
SRT>SubB_F9
   MessageModal>Program B - F9 key was pressed
END>SubB_F9
SRT>SubB_F10
   MessageModal>Program B - F10 key was pressed
END>SubB_F10
SRT>SubB_F11
   MessageModal>Program B - F11 key was pressed
END>SubB_F11
SRT>SubB_F12
   MessageModal>Program B - F12 key was pressed
END>SubB_F12
//Program B Subroutines


Label>End

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