08-17-12 12:57 PM
46 12
tools
  1. Vijik's Avatar
    IF is part of the IF-THEN-ELSE-ENDIF sentence.
    The number after IF shows what THEN, ELSE, ENDIF it belongs to.

    If2 IsAppRunning Memopad;
    Then2;

    Delay 10;
    If3 IsAppRunning Options;
    THEN3;
    ...
    ELSE3;
    ....
    ENDIF3;

    ELSE2;
    ...
    ENDIF2;

    Macro engine uses the number to find out what IF-THEN-ELSE-ENDIF an IF (or THEN or ELSE or ENDIF) belongs to.
    Those numbers allow you to have one IF sentence within another one.
    01-17-12 06:10 PM
  2. franzfume's Avatar
    Well HOW I CAN concatenate script?
    For ex I like to execute Shortcut to toggle GPS and shortcut to toggle WIFI just tapping a single NFC tag.
    Is possible?
    01-30-12 01:01 PM
  3. Vijik's Avatar
    Well HOW I CAN concatenate script?
    For ex I like to execute Shortcut to toggle GPS and shortcut to toggle WIFI just tapping a single NFC tag.
    Is possible?
    Let's assume your shortcut to toggle WiFi has TWI shortcut keys, and the shortcut to toggle GPS has TGP as shortcut keys.
    Now create a shortcut like this:

    App. Name: CascadedShortcuts
    Parameter: TGP;TWI
    Shortcut Keys: TGW

    (When TGW shortcut is launched, first TGP is launched and then TWI)

    If you want this cascaded shortcut to be launched when you tap a NFC tag, just get NFCShortcuts to launch TGW shortcut in ShortcutMe.
    01-31-12 01:01 AM
  4. robsteve's Avatar
    Before I spend a lot of time learning the macro language, can this be done?

    I need to be able to go into Bluetooth connections, select a specific existing device name and then select the connect option.

    I have the programs NFC_Shortcuts and ShortCut Me.
    05-03-12 02:03 PM
  5. Vijik's Avatar
    Before I spend a lot of time learning the macro language, can this be done?

    I need to be able to go into Bluetooth connections, select a specific existing device name and then select the connect option.

    I have the programs NFC_Shortcuts and ShortCut Me.
    You can use macros to open Bluetooth Connections, select an item from the list (based on position of the item) and activate it.

    For the start, the following macro turns Bluetooth ON and then moves to the first paired device (you need to write the rest that fits to the paired devices on your BB):

    CloseOptions; /*Closes the BB Options if it is open*/
    LaunchAndWait Options; /*Opens BB Options*/
    Keybluetooth; /*Searches for Bluetooth page*/
    Delay 200;
    NavClick; /*Opens the found Bluetooth page*/
    Delay 100;
    NavClick; /*Opens the 'Blueooth' drop down menu*/
    NavMoveUp 1; /*Highlights ON */
    NavClick; /*Selects BT ON */
    Delay 400;
    NavMoveDown 3; /*Moves to first paired BB device. Change 3 to a number that is suitable for the location of the paired device on your BB*/
    NavClick;

    Now, if the above macro is in a shortcut with shortcut keys SBT, then get NFCShortcuts to launch ShortcutMe with parameter SBT.
    05-06-12 12:25 PM
  6. robsteve's Avatar
    Thanks for the quick reply. I am not sure it will do what I need. My bluetooth is always on but sometimes my car kit will not connect because another ( Wife's) phone was last connected to it. I need to to use some form of logical operators and if then else statement.

    In other words,. Check to see if the device is connected, if it isn't select it and choose the menu option connect. I suppose another way is to always try the menu item connect and I assume if it is already connected the menu item will not be available.

    In the end, it may just need to be written as an app in order to have access to the device name and connection status.
    Last edited by robsteve; 05-06-12 at 06:27 PM.
    05-06-12 06:20 PM
  7. krzeku's Avatar
    OK, another situation:

    I' ve got something like this:

    Macros:
    Launch Manage Connections;
    Delay 200;
    NavMoveDown 1;
    NavClick;
    Delay 400;
    ESCKey;

    launch profiles;
    delay 200;
    menuitemfromtop 5:
    navclick;
    delay 200;
    ESCKey

    It's work, but, for example: I have BT on, and that marco above will turn them off (which I don't want) and change the profile (OK). Is there any chance to write this macro in that way, that it's behave (if BT ON - no actions, if OFF - turn ON) depends from status of BT (on/off)?

    Thanks

    Sorry for my English
    05-11-12 02:27 PM
  8. Vijik's Avatar
    OK, another situation:

    I' ve got something like this:

    Macros:
    Launch Manage Connections;
    Delay 200;
    NavMoveDown 1;
    NavClick;
    Delay 400;
    ESCKey;

    launch profiles;
    delay 200;
    menuitemfromtop 5:
    navclick;
    delay 200;
    ESCKey

    It's work, but, for example: I have BT on, and that marco above will turn them off (which I don't want) and change the profile (OK). Is there any chance to write this macro in that way, that it's behave (if BT ON - no actions, if OFF - turn ON) depends from status of BT (on/off)?

    Thanks

    Sorry for my English
    You could use 'IF2 IsBtOn;' but BB OS will open a dialog box if Bluetooth is off.

    If you want to turn BT On, then use this macro in your macros:

    ImportMacro +Bluetooth_On;

    If you want to turn BT Off, use this macro in your macros:

    ImportMacro +Bluetooth_Off;

    The above macros work if you go to this thread and download (and load) Blueooth_On and Bluetooth_Off plugin functions:
    http://forums.crackberry.com/blackbe...8/#post7319325
    05-11-12 02:47 PM
  9. iririr's Avatar
    How do you enable Mobile Hotspot?

    I've written the following for my 9900 running OS 7.1:

    Launch Manage Connections;
    Code:
    Delay 200;
    NavMoveDown 2;
    NavClick;
    Delay 400;
    NavMoveDown 1; //to enable mobile hot spot, but it jumps to bluetooth!!
    NavClick;
    Delay 400;
    ESCKey;
    But after enabling WIFI, line
    Code:
     NavMoveDown 1;
    jumps to bluetooth.
    06-03-12 11:38 PM
  10. Vijik's Avatar
    @iririr,

    I tried your exact macro (except the number for the first NavMoveDown that needed to be changed to 1 instead of 2 to toggle Wifi), and it worked fine on my 9900, BB OS 7.1.0.402

    I would try the below macro shortcut instead to toggle Hotspot:

    --AppName: Macro

    --Macros:
    If2 IsWifiOn;
    Then2;
    LaunchAndWait Manage Connections;
    NavMoveDown 2;
    NavClick;
    Launch Wifi_Off;
    Else2;
    Launch Wifi_On;
    Delay 400;
    LaunchAndWait Manage Connections;
    NavMoveDown 2;
    NavClick;
    Delay 400;
    EndIf2;

    Delay 200;
    EscKey;
    06-04-12 01:23 AM
  11. athrie's Avatar
    Great thread, thanks a lot.
    I just bought some NFC-Tags, will start to write some macros thanks to this thread

    Sent from my BlackBerry 9900 using Tapatalk
    06-05-12 03:59 AM
  12. Vijik's Avatar
    Great thread, thanks a lot.
    I just bought some NFC-Tags, will start to write some macros thanks to this thread

    Sent from my BlackBerry 9900 using Tapatalk
    See also in the thread below. You might find some plugins for your NFCShortcuts + ShortcutMe solutions:

    http://forums.crackberry.com/blackbe...me-6-a-716748/
    06-05-12 08:21 AM
  13. athrie's Avatar
    Let's assume your shortcut to toggle WiFi has TWI shortcut keys, and the shortcut to toggle GPS has TGP as shortcut keys.
    Now create a shortcut like this:

    App. Name: CascadedShortcuts
    Parameter: TGP;TWI
    Shortcut Keys: TGW

    (When TGW shortcut is launched, first TGP is launched and then TWI)

    If you want this cascaded shortcut to be launched when you tap a NFC tag, just get NFCShortcuts to launch TGW shortcut in ShortcutMe.
    tried that but didnt worked. i added exactly these parameters, but nothing happens.

    edit: ok solved a minute after posting this. i thought the app name is just a name, but its a function actually!
    Last edited by athrie; 06-13-12 at 04:25 AM.
    06-13-12 04:22 AM
  14. Vijik's Avatar
    tried that but didnt worked. i added exactly these parameters, but nothing happens.

    edit: ok solved a minute after posting this. i thought the app name is just a name, but its a function actually!
    Good that it works now.

    FYI:
    I added a new macro recently called 'StopAndRunShortcut'.
    That allows you to cascade shortcuts without using CascadedShortcuts function.
    Example (run shortcut TGP and then TWI):


    AppName: Macro
    Shortcut Keys: TGP
    Macros:
    bla bla bla;
    StopAndRunShortcut TWI
    Last edited by Vijik; 06-13-12 at 06:42 AM.
    06-13-12 06:04 AM
  15. athrie's Avatar
    Good that it works now.

    FYI:
    I added a new macro recently called 'StopAndRunShortcut'.
    That allows you to run one cascade shortcuts without using CascadedShortcuts function.
    Example (run shortcut TGP and then TWI):


    AppName: Macro
    Shortcut Keys: TGP
    Macros:
    bla bla bla;
    StopAndRunShortcut TWI
    that is nice, as it means that we dont have to put up another shortcut only for cascading but simply add a shortcut into another one. great work!
    06-13-12 06:26 AM
  16. athrie's Avatar
    i discovered, that the order in which you cascade your macros matters a lot, am i right?
    I wrote a macro for toggeling wifi and anotherone for toggeling profiles from loud to silent (when i leave home i wanna touch a nfctag so that it turns wifi off and switches to silent,the other way around when i come home).

    I tried to cascade them both, first with wifitoggle -> profile toggle, and it did not work.
    Now i have set it up profile toggle -> wifi toggle and it does what it should.

    Sent from my BlackBerry 9900 using Tapatalk
    06-14-12 10:01 AM
  17. Vijik's Avatar
    The order matters depending on what your shortcuts do.

    Assuming you run shortcut A and then B in your cascaded shortcuts, if A runs a BB function that takes time to complete, the macros in shortcut B might not be "seen" by BB OS because it is busy completing the functions in A.

    Wifi toggle is one of those functions: when you switch ot the BB goes to "Thinking" mode with the running circle.
    06-14-12 10:17 AM
  18. mikeycollins13's Avatar
    Hi, just purchased and to be able to toggle, force wifi cAlling only.

    I think e program does not work if the sd card is not working, or not present?

    I can't seem to edit any macros etc, none,

    But basic, pre made shortcuts work of the short cute screen?
    07-06-12 06:48 AM
  19. Vijik's Avatar
    Hi, just purchased and to be able to toggle, force wifi cAlling only.

    I think e program does not work if the sd card is not working, or not present?

    I can't seem to edit any macros etc, none,

    But basic, pre made shortcuts work of the short cute screen?
    I suggest buying a micro SD card (1 or 2 GB card are very cheap). You need it to store your settings/shortcuts.

    The app should work without micro SD card.

    Have you set permissions (ShortcutMe>BB Key>Common Config>"Set App Permissions" button)?
    07-07-12 08:52 AM
  20. dony71's Avatar
    I have BB 9930 with OS 7.1 and SCM 5.9.2
    Bluetooth turning ON Macro as follows:
    If0 IsBtOn; Then0; Else0; Launch Manage Connections; MenuItemFromTop4; NavClick; NavClick; ENDKey;
    The problem is, BB always pop up message asking for confirmation
    "The ShortcutMe_Touch application requires Bluetooth to be enabled. Enabled Bluetooth?"
    How to avoid this pop up??
    08-15-12 09:52 PM
  21. Vijik's Avatar
    I have BB 9930 with OS 7.1 and SCM 5.9.2
    Bluetooth turning ON Macro as follows:
    If0 IsBtOn; Then0; Else0; Launch Manage Connections; MenuItemFromTop4; NavClick; NavClick; ENDKey;
    The problem is, BB always pop up message asking for confirmation
    "The ShortcutMe_Touch application requires Bluetooth to be enabled. Enabled Bluetooth?"
    How to avoid this pop up??
    This has been discussed earlier: BB OS API for checking if BT is on or not, behaves differently depending on BT ON/Off status (if BT is off, it brings up the screen and asks you if you want to turn on BT).

    Can you instead use TurnBtOff and TurnBtOn macros in latest version of ShortcutMe 6?
    08-17-12 12:57 PM
46 12
LINK TO POST COPIED TO CLIPBOARD