1. Vijik's Avatar
    Hi Vijik,

    first of all thanks for your great apps (I have bought both NFCShortcuts and ShortcutMe) + your tutorials here at CrackBerry forums. After quite a short time I was able to create my first macro and assign it to an NFC tag
    Glad to hear that. Let me know if anything is missing with the tutorials (I will add a post to the tutorial about connecting several macro shortcuts together.

    But I just can't figure out how to do this second one:

    If profile Normal --> Set to Vibrate and launch music player (the default one);
    else --> Set to Normal and close music player;


    I managed to create two separate macros to toggle profiles and to start music, but wasn't able to put it all together, would you please help me with that? Thanks in advance!
    You can use 'GetProfileVolume' to detect Normal mode (at least on my BB).

    On my BB when Profile is on Normal, the volume returned by 'GetProfileVolume' is 80 (Profile=High, Vol=100, Profile=Medium, Vol=50, Profile=VibrateOnly, Vol=0).

    So this works on my BB:

    If2 GetProfileVolume == 80;
    Then2;

    /*macro for stuff that you want to do when profile is set to Normal*/
    Else2;
    /*macro for other profiles*/
    EndIf2;



    In your case you can try this:


    If2 GetProfileVolume == 80;
    Then2;


    ImportMacro STV; /*Assuming you have made a STV shortcut with AppName set to Macro and with Macros set to the macro set to switch to Vibrate mode*/
    ImportMacro LMP; /*Assuming you have made a LMP shortcut with AppName set to Macro and with Macros set to the macro set to launch Music Player*/

    Else2;

    ImportMacro STN; /*Assuming you have made a STN shortcut with AppName set to Macro and with Macros set to the macro set to switch to Normal mode*/
    ImportMacro CMP; /*Assuming you have made a CMP shortcut with AppName set to Macro and with Macros set to the macro set to close Music Player*/


    EndIf2;




    For your Info:

    To run one shortcut after the other you can use one of the methods below:

    1- Use 'StopAndRunShortcut' macro at the end of macros in one shortcut to run a second macro shortcut.

    Ex:
    StopAndRunShortcut ABC; /*means run shortcut ABC*/


    2- Cascades Shortcuts

    AppName: CascadedShortcuts
    Parameter: ABC;FDS;
    /*Runs shortcut ABC and then FDS.

    3- Use 'ImportMacro' to run macros in a macro shortcut.
    Ex:
    ImportMacro ABC; /*means run macros in shortcut ABC*/
    09-22-12 11:53 AM
  2. Ruslan Botsyurko's Avatar
    Thanks very much for your help, I'll try to put all these together to make it work. I'm just missing one element - I don't know how to close apps using macros (didn't find it yet at forums), so I don't have the CMP macro, would you halep me with that please?
    09-22-12 12:03 PM
  3. Vijik's Avatar
    Thanks very much for your help, I'll try to put all these together to make it work. I'm just missing one element - I don't know how to close apps using macros (didn't find it yet at forums), so I don't have the CMP macro, would you halep me with that please?
    How do you close media player manually?

    For example if you close it by hitting the BB/Menu key and then hit Close (last menu option in the menu of media player), you can do it with the macros below:

    MenuKey;
    ItemFromBottom 1;
    Click;
    09-22-12 12:51 PM
  4. Ruslan Botsyurko's Avatar
    Oh, I see, it's that easy, I thought you have to evoke some kind of process that kills the app.

    I just see one small hole in this plan - I do a bunch of stuff on my BlackBerry while listening to music (browser, emails, etc), so I would first have to switch to he music app before running this macro.
    09-22-12 01:02 PM
  5. Vijik's Avatar
    Oh, I see, it's that easy, I thought you have to evoke some kind of process that kills the app.

    I just see one small hole in this plan - I do a bunch of stuff on my BlackBerry while listening to music (browser, emails, etc), so I would first have to switch to he music app before running this macro.
    Try this to launch Media Player (when music is played)

    LaunchModule net_rim_bb_medialibraryplayer;
    09-22-12 01:35 PM
  6. Ruslan Botsyurko's Avatar
    Good idea, thanks!
    09-22-12 04:02 PM
  7. Ruslan Botsyurko's Avatar
    I'm back and looks like everything works like maaaagic (*use the Steve Jobs voice to read this one*) Made a short video to show the result:


    The primary idea was that every morning when I walk out of my house I switch my profile to vibrate only, put my earphones on and launch a music player. In the afternoon I come home, switch profile back to normal and manually close the music player. So now I got all this process covered with just one NFC tag that will be on my door tomorrow

    In case anyone needs the exact code or its parts, here it is:

    PMS (Profile/Music Switch)
    Code:
    If2 IsProfileOnVibOnly;
    Then2;
    
    ImportMacro STN; 
    ImportMacro CMP; 
    
    Else2;
    
    ImportMacro STV;
    Delay 100; 
    ImportMacro LMP; 
    
    
    EndIf2;
    STV (Set To Vibrate)
    Code:
    Launch Profiles;
    Delay 100;
    KeyV;
    NavClick;
    STN (Set To Normal)
    Code:
    Launch Profiles;
    Delay 100;
    KeyN;
    NavClick;
    LMP (Launch Music Player)
    Code:
    Launch Media_Music;
    Delay 200;
    NavMoveDown 1;      //These two extra lines are to switch to artist view//
    NavClick;
    CMP (Close Music Player)
    Code:
    LaunchModule net_rim_bb_medialibraryplayer;
    Delay 200;
    MenuKey;
    NavMoveDown 1;
    NavClick;
    Last edited by Ruslan Botsyurko; 10-07-12 at 06:00 PM.
    Vijik likes this.
    09-22-12 06:16 PM
  8. ionarhum's Avatar
    Hi,

    I'm new to this whole macro thing, but have been trying to create a macro to divert all calls to a different number.

    My plan is to have a NFC tag in my car to swipe that would divert all calls to my car phone.

    Is this possible?

    ...also I would need one to turn off call forward.

    any help would be appreciated

    Thanks in advance
    09-26-12 03:06 AM
  9. Ruslan Botsyurko's Avatar
    @ionarhum: Please write how you perform those two actions manually step by step, try to find the quickest and easiest way to achieve it, we'll try to help you with the code part
    09-26-12 03:28 AM
  10. Vijik's Avatar
    Below is a question I have been asked (moving it here so that others can also comment/see):

    --------------------------------
    Vijik,

    You have helped me previously but can you let me have basic macro please:

    (assume I have media_music launched) and I want to:

    Turn Bt off
    Turn wifi on
    Turn normal profile on
    Launch home screen

    I would grateful if you could do that for me.

    Thanks again for excellent product and service.
    -----------------------------------------------------

    Answer:
    The macro below should do the job (running ShortcutMe 6.2.6.0):

    TurnBtOff; /* Turns Bt off */

    TurnWifiOn; /* Turns Wifi on */

    /* Sets profile to Normal */
    LaunchAndWait Profiles;
    KeyN;
    Click;

    Launch Home Screen; /*Launches BB Home Screen */
    09-26-12 08:46 PM
  11. mavbard's Avatar
    Restart the blackberry does not use 3rd applications:
    Appname: home screen:
    Shortcut: option
    Marco code:
    While0 IsIdleSeconds<1;
    Do0;KEYPADLOCKKey;
    EndWhile0;
    stop;

    or:

    While0 IsIdleSeconds==0;
    Do0;KEYPADLOCKKey;
    EndWhile0;
    10-15-12 07:06 AM
  12. ionarhum's Avatar
    Hi,

    I have a speed dial (key i) set up that dials **21*<car phone number># that works fine but could a macro do this function?

    Note speed dial (key o) dials ##002# to cancel all diverts.

    Thanks in advance
    10-17-12 12:24 AM
  13. rustmonkey's Avatar
    Is there a way to trigger a shortcut to be launched when plugging in a smart accessory? My car dock is a "smart dock" that the blackberry can use to autolaunch an app - however, I want the dock to autolaunch the music app AND automatically start playing my music... can't get this to work with either the stock blackberry settings nor shortcutme... is this possible?

    THANKS
    10-20-12 10:44 AM
  14. Vijik's Avatar
    Hi,

    I have a speed dial (key i) set up that dials **21*<car phone number># that works fine but could a macro do this function?

    Note speed dial (key o) dials ##002# to cancel all diverts.

    Thanks in advance
    Yes, you should be able to do this with a macro like this:
    LaunchAndWait Phone;
    Key**21*x#; /*x is your car phone number*/

    If you have MyOwnHotkeys or MyOwnIcons, you can make the above shortcut to launch directly from a hotkey in BB Home Screen.
    10-20-12 11:30 AM
  15. Vijik's Avatar
    Is there a way to trigger a shortcut to be launched when plugging in a smart accessory? My car dock is a "smart dock" that the blackberry can use to autolaunch an app - however, I want the dock to autolaunch the music app AND automatically start playing my music... can't get this to work with either the stock blackberry settings nor shortcutme... is this possible?

    THANKS

    I did not find a BB OS event (for USB connection) that SCMEventLauncher app could listen to and launch a shortcut in ShortcutMe.

    You can use macros to check if the device gets connected to a charger or a PC, but that is not an event and require your macro to run and check the USB port.
    10-20-12 11:34 AM
  16. rustmonkey's Avatar
    Thanks! So is there a differnce between recognizing USB connected and Charger connected or are they the same according to the system?

    Posted with my Playbook via Tapatalk
    10-20-12 11:44 AM
  17. Vijik's Avatar
    Thanks! So is there a differnce between recognizing USB connected and Charger connected or are they the same according to the system?

    Posted with my Playbook via Tapatalk
    There are two macros (see below) that can be used to check the USB connection.
    IsConnectedToCharger will return TRUE if the BB is connected to a PC, Wall Charger, or a USB Host device.
    If the BB Battery is not fully charged, and a USB connection causes the battery to get charged then IsCharging returns TRUE.

    IsConnectedToCharger (Returns TRUE if the device's USB port is connected to a charging device)

    IsCharging (Returns TRUE if battery is getting charged)
    10-21-12 07:07 PM
  18. AxKxB's Avatar
    10-24-12 06:24 AM
  19. AxKxB's Avatar
    Looking forward to the update release
    11-04-12 05:02 AM
  20. AxKxB's Avatar
    11-06-12 01:18 PM
  21. AxKxB's Avatar
    Vijik likes this.
    11-06-12 01:20 PM
  22. AxKxB's Avatar
    11-06-12 01:22 PM
  23. AxKxB's Avatar
    11-07-12 01:50 PM
  24. AxKxB's Avatar
    11-07-12 01:58 PM
  25. AxKxB's Avatar
    Vijik likes this.
    11-07-12 02:00 PM
1,385 ... 53545556
LINK TO POST COPIED TO CLIPBOARD