1. anon(4113192)'s Avatar
    ONE618 ShortcutMe Macro Archive
    Macros available bellow, after this post
    Toggles, Launchers, Tools, How-to


    About me
    Just some guy who wrote macros for ShortcutMe
    I don't work for the company
    I don't get kickbacks


    About the macros
    Any macros not by me will note it with author credit
    The macros are direct copies of the ones I use now or have previously
    I wrote the macros to be fast, not user friendly nor universally bullet proof


    Color Guide

    Warnings are in red
    Instructions are in green
    Features are in blue
    Notes are in gray
    Macro code quoted for instruction is in black the portion to replace is underlined


    Macro Syntax Info

    = set it equal
    ! while/if it is false, without this the default is while/if it is true
    != while/if it is not equal to it
    == while/if it is equal to it
    && while/if it and it is
    || while/if it or it is
    > while/if it is greater than it
    < while/if it is less than it
    ; end function
    , separate parameters
    _ underline
    - negative number
    /* comment */ comment will not be read by the macro program
    $ commonly used as a prefix for user defined variables, but not required

    Disclaimer

    Use at your own risk
    I am not responsible for any damage or grievance caused by these macros
    Only tested on a Bold 9900 with the latest ShortcutMe release
    You may need to add delays where bugs appear, since not all devices run at the same speed
    In general, it is slower but safer to navigate by using MenuItemFrom____# instead of NavMove____#
    And if you actually read the disclaimer, you are awesome


    Please do not leave comments


    QUESTIONS? Click here for the official thread
    This thread is for archive purposes only
    Last edited by ONE618; 10-30-11 at 12:53 AM.
    10-22-11 03:50 PM
  2. anon(4113192)'s Avatar
    Toggles


    Show Hidden Icons Toggle
    Assumes that you're on the home screen
    Code:
    MenuItemFromTop3;
    MENUKey;
    NavMoveDown2;
    NavClick;

    Alarm Toggle
    Code:
    LaunchAndWaitnet_rim_bb_clock;
    MENUKey;
    NavClick;
    Keyo;
    NavClick;
    
    While0 IsAppForegroundnet_rim_bb_clock;Do0;
      ESCKey;
    EndWhile0;

    Password Toggle
    Replace YOURPASSWORD text with your actual password
    Then press the MENU key while in the macro editor and select encrypt
    Code:
    LaunchAndWaitToolkit;
    MenuItemFromTop6;
    NavMoveRight1;
    NavClick;
    NavClick;
    ESCKey;
    *Keys;
    
    If0 IsPasswordEnabled;
      PasswordKey YOURPASSWORD;
      NavClick;
      Else0;
        PasswordKey YOURPASSWORD;
        NavClick;
    EndIf0;
    
    While0 !IsAppForegroundHome Screen;Do0;
      ESCKey;
    EndWhile0;

    Radio Toggle

    LED, vibrate, and dialog box indicators
    Option to auto Fix SOS Signal

    Requires Fix SOS Signal macro and assumes it's shortcut is MRR

    The macro tries to stop as fast as possible
    this is because you can't use ShortcutMe while this or any other macro is running
    and I often use SCM right after this

    Code:
    Vibrate30;
    
    If0 HasRadioConnection;
      Then0;
        LaunchRadio_Off;
        SetLedColorR; 
        LedBlink;
        STOP;
    EndIf0;
    
    If1 !IsRadioOn;
      Then1;
        LaunchRadio_On;
        SetLedColorG; 
        LedBlink;
        STOP;
    EndIf1;
    
    LaunchRadio_Off;
    Show
    
    Fix SOS Signal?
    
    ;
      ImportMacroMRR;

    Wifi Toggle

    LED, vibrate, and dialog box indicators
    Option to auto or manually fix lost signal

    Requires Wifi Lost Signal Fix macro and assumes its shortcut is MWW

    The macro tries to stop as fast as possible
    this is because you can't use ShortcutMe while this or any other macro is running
    and I often use SCM right after this

    Code:
    Vibrate30;
    
    If0 !IsWifiOn;
      Then0;
        LaunchWifi_On;
        SetLedColorG; 
        LedOn;
        Delay120;
        LedOff;
        STOP;
    EndIf0;
    
    If1 HasWifiConnections;
      Then1;
        LaunchWifi_Off;
        SetLedColorR; 
        LedOn;
        Delay120;
        LedOff;
        STOP;
    EndIf1;
    
    Input$var,Fix Wifi Signal?
    
    M  = Manually Retry
    A   = Auto Retry;
    
    If2 $var==;
      Then2;
        LaunchWifi_Off;
        SetLedColorR; 
        LedOn;
        Delay120;
        LedOff;
        STOP;
    EndIf2;
    
    If3 $var==m;
      Then3;
        Launchnet_rim_wlan_wizard;
        STOP;
    EndIf3;
    
    If4 $var==a;
      Then4;
        ImportMacroMWW;
    EndIf4;
    Last edited by ONE618; 10-29-11 at 08:48 PM.
    10-22-11 05:26 PM
  3. anon(4113192)'s Avatar
    Launch Apps


    Launch Files App
    Only way to launch the native Files app without clicking the icon
    Code:
    LaunchMediaExplorer;
    MenuItemFromTop3;
    MENUKey;
    *Keye;
    NavClick;
    Launch Music
    Like an iPhone, If you press back while music is playing, it'll go to the music library instead of the Home Screen
    If music isn't playing, it'll just open the music library
    When music is playing, it'll bring up the Now Playing screen
    Works great as a shortcut key with the MyOwnIcons app
    Code:
    If0 IsAppRunningnet_rim_bb_medialibraryplayer;
      Then0;
        LaunchMediaCommon_BG;
        Launchnet_rim_bb_medialibraryplayer_BG;
      Else0;
        LaunchMedia_Music;
    EndIf0;
    Last edited by ONE618; 10-26-11 at 09:51 PM.
    10-22-11 05:29 PM
  4. anon(4113192)'s Avatar
    Web Search


    Wolfram Alpha
    If you're doing addition, replace the "+" sign with "%2B"
    typing sum 1 and 2 is the same as typing 1 %2B 2
    It's a Worlfram Alpha thing
    Code:
    Input$i,Search Wolfram Alpha;
    LaunchBrowser,http://m.wolframalpha.com/input/?i=$i&;

    Stock Market
    Ticker symbol must be in ALL CAPS
    Code:
    Input$i,Search Bloomberg;
    LaunchBrowser,http://mobile.bloomberg.com/apps/quote?ticker=$i;

    Dictionary
    Code:
    Input$i,Search Dictionary;
    LaunchBrowser,http://freedictionary.mobi/$i;

    Thesaurus
    Code:
    Input $i,Search Thesaurus;
    LaunchBrowser,http://freethesaurus.mobi/$i;

    Google
    SCM already has this and more
    I just prefer how this looks/functions
    Code:
    Input$i,Search Google;
    LaunchBrowser,http://www.google.com/search?client=ms-rim&hl=en&q=$i&ie=UTF-8&oe=UTF-8&channel=browser;

    Wikipedia
    See note above under google
    Code:
    Input$i,Search Wikipedia;
    LaunchBrowserhttp://en.m.wikipedia.org/wiki/$i;

    Wapedia
    You can change the preferences on Wapedia
    It's a lot faster than Wikipedia but not as sexy
    Code:
    Input$i,Search Wapedia;
    LaunchBrowserhttp://wapedia.mobi/en/$i;

    ShortcutMe
    Menu to launch ShortcutMe sites
    Typing any letter except M,A,S will launch the updates page
    Code:
    Input $i,ShortcutMe
    
    M  =  Macro
    A   =  This Archive
    S   =   Syntax
    U  =   Updates;
    
    If0 $i==m;
      Then0;
        Launch Browser,http://forums.crackberry.com/blackberry-apps-f35/handy-shortcutme-5-0-macro-shortcuts-549683/index999.html;
      ElseIf0 $i==a;
        Launch Browser,http://forums.crackberry.com/blackberry-apps-f35/macro-archive-663605/;
      ElseIf0 $i==s;
        Launch Browser,http://forums.crackberry.com/blackberry-apps-f35/macros-shortcutme-637024/index99.html;
      Else0;
        Launch Browser,http://forums.crackberry.com/blackberry-apps-f35/shortcutme-updated-all-bb-models-more-macros-recurring-auto-launch-etc-653707/index999.html;
    EndIf0;
    
    Delay2000;
    *Keyb;
    Last edited by ONE618; 11-21-11 at 08:50 PM.
    10-22-11 05:31 PM
  5. anon(4113192)'s Avatar
    Tools


    World Clock

    Display times for 4 cities, including local
    Code can handle a lot more than 4 cities


    HOW TO CHANGE CITY NAMES
    Local City = Victoria
    City1 = New York
    City2 = London
    City3 = Dallas

    *change the names to whatever you want


    HOW TO ADJUST TIME ZONES
    3 is hour diff between New York "City1" and Victoria "Local City" Sum $hr,3;
    8 is hour diff between London "City2" and Victoria "Local City" Sum $hr,8;
    3 is hour diff between Dallas 'City3" and Victoria "Local City" Sum $hr,2;

    *if your local city's time is 11:00PM and City#'s time is 1:00AM then hour diff = 2
    *if your local city's time is 11:00PM and City#'s time is 8:00PM then hour diff = -3


    HOW TO ALIGN TEXT
    After show The spaces between city name and $ need to be manually adjust for alignment
    Code:
    Set $t=GetTime;
    Div $t,100;
    Set $hr=$$Result;
    
    If0 $$Rest<10;
      Then0;
        Set $$Rest=0$$Rest;
    EndIf0;
    
    Set $c=0;
    
    While0 $c<4;Do0;
      If3 $c==1;
        Then3;
          Sum $hr,3;
          Set $lt=$t;
        ElseIf3 $c==2;
          Sum $hr,8;
          Set $1t=$t;
        ElseIf3 $c==3;
          Sum $hr,2;
          Set $2t=$t;
      EndIf3;
      If1 $$Result>-1 && $$Result<12;
        Then1;
     Set $i=AM;
        ElseIf1 $$Result>11 && $$Result<24;
          Sum $$Result,-12;
          Set $i=PM;
        ElseIf1 $$Result>23;
          Sum $$Result,-24;
          Set $i=AM    Tomorrow;
        Else1;
          Mult $$Result,-1;
          Set $i=PM    Yesterday;
      EndIf1;
      If2 $$Result==0;
        Then2;
          Set $$Result=12;
        EndIf2;
      If3 $$Result<10;
        Then3;
          Set $t=$$Result:$$Rest     $i;
        Else3;  
          Set $t=$$Result:$$Rest   $i;
      EndIf3;
      Inc $c;
    EndWhile0;
    
    ShowWorld Clock
    
    Victoria          $lt
    New York       $1t
    London          $2t
    Dallas            $t
    ;

    New Word Substitution & Dictionary

    Single menu for both dictionary and word substitution additions
    If you only enter a word beside "New" then it'll be added to the Dictionary
    If you enter a word beside "Replace" then it'll be added to the word Substitution

    Code:
    Inputs $n,Edit Dictionary
    
    ?              New,
    $r,?        Replace;
    
    If0 IsAppRunning Options;
      Then0;
        LaunchAndWait Options;
        While0 IsAppForeground Options;Do0;
          ESCKey;
        EndWhile0;
    EndIf0;
    
    LaunchAndWait Options;
    NavMoveDown 3;
    NavClick;
    
    If1 $r==;
    Then1;
    NavMoveDown5;
    NavClick;
    Key$n;
    ENTERKey;
    ENTERKey;
    Else1;
    NavMoveDown 3;
    NavClick;
    MENUKey;
    NavMoveUp 1;
    NavClick;
    ToCB$r;
    PasteFromCB;
    ENTERKey;
    ToCB$n;
    PasteFromCB;
    EscKey
    Delay10;
    NavClick;
    EndIf1;
    
    While1 IsAppRunning Options;Do1;
      ESCKey;
    EndWhile1;

    Task Manager

    Messing with other settings in the escreen can permanently screw up your device
    Requires the engineering screen to be unlocked
    Code:
    WaitTil IsAppForegroundHome Screen;
    AltPlusKeyescr;
    
    WaitTil IsAppForegroundnet_rim_escreen_app;
    MenuItemFromTop5;
    NavClick;
    Delay10;
    NavClick;

    Restart Device

    Created by Juggalo20, not me
    You may have to press ESC after for the restart to occur

    Code:
    While0 IsAppRunning Home Screen;Do0;
      BackLightOff;
      BackLightOff;
      BackLightOff;
      BackLightOff;
      BackLightOff;
      BackLightOff;
      BackLightOff;
      BackLightOff;
      BackLightOff;
      BackLightOff;
      BackLightOff;
    EndWhile0;

    Reminder (Requires BugMe!, puZZed alarm, and Nap app)

    instructions on the way
    Code:
    Inputs $n,Reminder
    ? * * *Note,$a,? * *Alarm;ToCB$a;
    If0 IsCBEmpty;* Then0;* * If1 $n==;* * * Then1;* * * * LaunchAndWait BugMe!;* * * * Keys;* * * * STOP;* * * ElseIf1 $n==a;* * * * LaunchAndWait puZZed;* * * ElseIf1 $n==n;* * * * LaunchAndWait Nappin';* * * Else1;* * * * LaunchAndWait BugMe!;* * * * ToCB$n;* * * * Keyo;* * * * NavMoveUp 1;* * * * PasteFromCB;* * * * NavMoveDown 3;* * EndIf1;* Else0;* * If2 $n==a;* * * Then2;* * * * LaunchAndWait puZZed;* * * * Div $a,100;* * * * NavMoveDown 2;* * * * NavClick;* * * * Key$$Result;* * * * NavMoveRight 1;* * * * Key$$Rest;* * * * NavMoveRight 1;* * * * Keya;* * * * NavMoveRight 1;* * * ElseIf2 $n==n;* * * * LaunchAndWait Nappin';* * * * NavClick;* * * * If3 $a<10;* * * * * Then3;* * * * * * Key$a;* * * * * * NavMoveRight 2;* * * * * Else3;* * * * * * Div $a,100;* * * * * * Key$$Result;* * * * * * NavMoveRight 1;* * * * * * Key$$Rest;* * * * * * NavMoveRight 1;* * * * EndIf3;* * * * NavClick;* * * Else2;* * * * Launch BugMe!;* * * * ToCB$n;* * * * Keyo;* * * * NavMoveUp 1;* * * * PasteFromCB;* * * * MENUKey;* * * * NavClick;** * * * If4 $a<31;* * * * * Then4;* * * * * * If5 $a==1;* * * * * * * Then5;* * * * * * * * NavMoveDown 5;* * * * * * * ElseIf5 $a==3;* * * * * * * * NavMoveDown 6;* * * * * * * ElseIf5 $a==9;* * * * * * * * NavMoveDown 7;* * * * * * * ElseIf5 $a==15;* * * * * * * * NavMoveDown 3;* * * * * * * ElseIf5 $a==30;* * * * * * * * NavMoveDown 4;* * * * * * EndIf5;* * * * * Else4;* * * * * * NavClick;* * * * * * Div $a,100;* * * * * * Key$$Result;* * * * * * ENTERKey;* * * * * * Key$$Rest;* * * * * * Set $t=GetTime;* * * * * * Sub $t,$a;* * * * * * If6 $$Result<1300 && $$Result>-1;* * * * * * * Then6;* * * * * * * * ENTERKey;* * * * * * * * SPACEKey;* * * * * * EndIf6;* * * * * * NavMoveDown 3;* * * * EndIf4;* * * * NavClick;* * * * NavMoveDown 3;* * * EndIf2;EndIf0;
    NavClick;ESCKey;

    Reminder (Requires BugMe! app)

    Launches app and sorts list, or auto enters reminder/alarm pending your input
    To just launch BugMe! without creating a new reminder, just enter nothing
    Reminder name must start with a letter
    Setting the Alarm
    No alarm = o
    1 hour from now = 1
    3 hours from now = 3
    Tomorrow morning = 9
    Next week = 7
    Specific time in current am/pm = ###

    example 1200 or 100
    Specific hour with toggled am/pm = #01
    example 1201 or 101

    I didn't make a specific time with toggled am/pm
    simply because I wouldn't use it, but it can be done

    Code:
    Input$r,Reminder;
    
    If0 $r==;
      Then0;
        LaunchBugMe!;
        keys;
        STOP;
      Else0;
        Input$a,Alert;
        LaunchBugMe!;
        ToCB$r;
        Keyo;
        NavMoveUp1;
        PasteFromCB;
    EndIf0;
    
    If1 $a<1;
      Else1;
        MENUKey;
        NavClick;
        If2 $a<10;
          Then2;
            If3 $a==1;
              Then3;
                NavMoveDown5;
              ElseIf3 $a==3;
                NavMoveDown6;
              ElseIf3 $a==9;
                NavMoveDown7;
              ElseIf3 $a==7;
                NavMoveDown9;
            EndIf3;
          Else2;
            NavClick;
            Div $a,100;
            Key$$Result;
            ENTERKey;
            If4 $$Rest!=0;
              Then4;
                If5 $$Rest==1;
                  Then5;
                    ENTERKey;
                    SPACEKey;
                  Else5;          
                    Key$$Rest;
               EndIf5;
            EndIf4;
            NavMoveDown3;
        EndIf2;
        NavClick;
    EndIf1;
    
    NavMoveDown3;
    NavClick;
    ESCKey;

    SOS Signal Fix

    Attempts to repair SOS signal
    Progressively allows for longer connection attempts as repair fails
    If the repair attempt fails 3 times, then you'll be asked if you'd like to retry
    LED, vibrate, and dialog box indicators


    You can have this auto check/fix signal every X amount of time
    This is done in ShortcutMe's CommonConfig screen

    I tried to make the macro as fast a possible (see while1)
    but the OS can still hang for half a second while it checks the signal

    Code:
    If0 !IsRadioOn || HasRadioConnection || IsAppForegroundShortcutMe_Touch;
      Then0;
        STOP;
    EndIf0;
    
    Set $loop=1;
    Set $$Result=16;
    
    While0 !HasRadioConnection;Do0;
      Set $check=1;
      LaunchRadio_Off;
      WaitTil !IsRadioOn;
      LaunchRadio_On;
      WaitTil IsRadioOn;
      While1 !HasRadioConnection && $check<$$Result;Do1;
        Delay500;
        Inc$check;
      EndWhile1;
      If1 $loop>3;
        Then1;
          SetLedColorR;
          LedOn;
          Vibrate300;
          LedOff;
          ShowConnection Failed, Retry?;
            Set $loop=1;
            Set $$Result=16;
        Else1;
          Inc$loop;
          Sum $$Result,10;
      EndIf1;
    EndWhile0;
    
    SetLedColorG;
    LedBlink;
    Last edited by ONE618; 11-21-11 at 09:07 PM.
    10-22-11 06:03 PM
  6. anon(4113192)'s Avatar
    How-to


    Change GetTime format from hhmm to hh:mm am/pm
    Show; function at the end is just to display the result. It's not needed.
    Code:
    Set $time=GetTime;
    Div $time,100;
    
    If0 $time>1159;
      Then0; 
        Set $ampm=PM;
        Sub $$Result,12;
      Else0; 
        Set $ampm=AM;
    EndIf0;
    
    If1 $$Rest<10;
        Then1;
          Set $$Rest=0$$Rest;
    EndIf1;
    
    Set $time=$$Result:$$Rest $ampm;
    Show$time;

    Single letter shortcut category name

    You'll only have to do this once
    First change the name of a shortcut to start with "."
    Example... change RadioToggle to .RadioToggle
    Now create your new single letter category name and save
    Don't close the shortcut settings window
    Then change the shortcut category to the one you just created and save
    The "." will automatically disappear from the shortcut name
    Done


    Create a custom web search for almost any site

    Copy this into your macro
    Input$i,DISPLAYED TEXT;
    LaunchBrowser,PARAMETER;

    Search the website as you normally would from your BlackBerry
    Remember what you entered into the search
    Once the site has loaded, copy the full URL into your macro, replacing PARAMETER
    Input$i,DISPLAYED TEXT;
    LaunchBrowser,http://www.google.com/search?client=ms-rim&hl=en&q=WHAT YOU SEARCHED&ie=UTF-8&oe=UTF-8&channel=browser;

    Find the word, term, or whatever you entered as your search in the URL and replace it with $i
    Input$i,DISPLAYED TEXT;
    LaunchBrowser,http://www.google.com/search?client=ms-rim&hl=en&q=$i&ie=UTF-8&oe=UTF-8&channel=browser;

    Replace DISPLAYED TEXT with whatever you'd like displayed in the search popup box
    Input$i,Google Search;
    LaunchBrowser,http://www.google.com/search?client=ms-rim&hl=en&q=$i&ie=UTF-8&oe=UTF-8&channel=browser;

    Done


    Passing a variable across macros using the clipboard

    This allows you to make custom IsWHATEVER, as well as, passing a variable across macros
    Use ToCB to post a string to the clipboard
    Macro 1
    - resulted in event A so ToCBeventA;
    - or
    - resulted in event B so ToCBeventB;

    Then use ClipboardText to answer a logic question in your next macro
    Macro 2
    - If0 ClipboardText=WHATEVER;
    - Then0; DONESOMETHING;
    - Else0; DOSOMETHINGELSE;
    - EndIf0;

    There are a lot of applications for this, I'll post examples in the near future


    Last edited by ONE618; 10-30-11 at 04:57 PM.
    axemcc and fbloise like this.
    10-22-11 06:15 PM
LINK TO POST COPIED TO CLIPBOARD