08-25-13 05:45 AM
1,385 ... 4445464748 ...
tools
  1. paulsdv's Avatar
    You are right.
    ShortcutMe checks for "stopmacro" message each time it reads a new macro command in your macro shortcut.
    So after it starts "Delay 1800000" (30 min delay) it doesn't check for that message in 30 minutes.

    Try this instead of "Delay 1800000":

    Set $DelayCounter = 1800;
    While3 $DelayCounter > 0;
    Do3;
    Delay 1000;
    Dec $DelayCounter;
    EndWhile3;

    that works well and has given me an idea, could i do something like this?

    Set $DelayCounter = 1800;
    While3 $DelayCounter > 0;
    Do3;
    While4 ischarging = yes
    Delay 1000;
    Dec $DelayCounter;
    EndWhile4:
    EndWhile3;

    what would be the correct syntax? that would mean that when i removed the phone from the charging pod, the macro would stop...?

    Also what happens if the phone rings mid macro?
    03-22-12 05:07 AM
  2. paulsdv's Avatar
    even better?

    Set $DelayCounter = 1800;
    While3 $DelayCounter > 0;
    If5 IsConnectedToCharger=TRUE;
    Then5;

    Do3;
    backlighton;
    Delay 1000;
    Dec $DelayCounter;
    EndWhile3;
    Else5 stopmacro;
    ESCKey;
    ESCKey;
    ESCKey;
    ESCKey;
    03-22-12 05:25 AM
  3. paulsdv's Avatar
    Ended up with


    Set $DelayCounter = 1800;
    While3 $DelayCounter > 0;
    if5 isconnectedtocharger=true;
    then5;
    Do3;
    backlighton;
    Delay 1000;
    Dec $DelayCounter;
    else5;
    stop;
    esckey;
    esckey;
    esckey;
    endif5;
    EndWhile3;


    seems to work, but realised that the stop stops the macro and the esckeys then do not work...lol

    so changed it to

    Set $DelayCounter = 1800;
    While3 $DelayCounter > 0;
    if5 isconnectedtocharger=true;
    then5;
    Do3;
    backlighton;
    Delay 1000;
    Dec $DelayCounter;
    else5;
    delay 50;
    esckey;
    delay 50;
    esckey;
    delay 50;
    esckey;
    delay 50;
    stop;
    endif5;
    EndWhile3;


    The stop works but the esckeys do not...
    Any thoughts?
    Last edited by paulsdv; 03-22-12 at 05:51 AM.
    03-22-12 05:40 AM
  4. Vijik's Avatar
    Try this one instead:

    Set $DelayCounter = 1800;
    While3 $DelayCounter > 0;
    Do3; /* moved this line up */
    if5 isconnectedtocharger==true; /* changed '=' to '==' Edit: */
    then5;
    backlighton;
    Delay 1000;
    Dec $DelayCounter;
    else5;
    delay 50;
    esckey;
    delay 50;
    esckey;
    delay 50;
    esckey;
    delay 50;
    stop;
    endif5;
    EndWhile3;
    Last edited by Vijik; 03-22-12 at 07:48 AM.
    03-22-12 07:41 AM
  5. hardikjakharia's Avatar
    Kinda a new thing, dunno if its been already discussed, but how do we have auto run f macros depending on time, location (cell based, in future), etc..

    I come frm android and i really loved the tasker app on android and this app does somethings better than the tasker app(simulating keypresses) but that app had direct communication with the apps api's and hence was more streamlined and less trial and error by simulating keypresses.

    Also one more thing, in whatsapp i wanted a shortcut that can send msg to a certain person, now unlike sms, it doesnt accept parameters, you have to simulate the prcess, however if whatsapp was already open in dialogue box, it goes into different context, if its in settings, other tab on tab, search doesnt work, and so on.. is there any better way for whatsapp msging to a certain contact?

    Best option i have found is

    Use ESCKey twice to come out of app, then LaunchAndWait Whatsapp, and then do the search for contact by keypress and NavMoveDown and select and type pre-defined text. THe esc and relaunch seems unnecessary and wastes time and looks shabby(espc when showing off the app) so any better option?
    03-22-12 07:50 AM
  6. paulsdv's Avatar
    Have ammended... What does == do?

    The esckey commands do nothing, any idea as to why...

    What happens to a macro when an incomming call occurs?

    I think I am almost there now... Thanks so much for your support!
    03-22-12 07:51 AM
  7. Vijik's Avatar
    Have ammended... What does == do?

    The esckey commands do nothing, any idea as to why...

    What happens to a macro when an incomming call occurs?

    I think I am almost there now... Thanks so much for your support!
    = is for setting a value to a variable ($var1=4)
    == is for testing a condition (used for IF, WHILE, etc)

    In my original post I forgot to end the '/*' comment with a '*/'.
    I have edited my post now, please just copy the macro from my post again into your macro shortcut.


    If you want to avoid key simulation in the phone app then you need to check what app is in foreground before doing a key simulation.
    Use "IsAppForeground" macro for that.
    Last edited by Vijik; 03-22-12 at 09:15 AM.
    03-22-12 08:15 AM
  8. Vijik's Avatar
    @hardikjakharia,

    New features are getting added to a new version of ShortcutMe as we discuss.

    Even that ShortcutMe macros can do a lot of things, but they are still limited by the OS.
    I don't know about Android OS, but for BB OS, launching other apps is not always a trivial thing, let alone being able to communicate directly with other apps.

    Anyone else using Whatsapp and can help out with answring hardikjakharia's question?
    03-22-12 12:15 PM
  9. hardikjakharia's Avatar
    So is the ability to launch shortcut based on time, and other parameters being thought upon?

    if not now, hope to see it soon.. i have made a macro that exits all unnecessary apps like my RSS reader, Gmaps, opera if i forget to close it, same for wifi etc.. and i would like it to run hourly..

    Also hourly chime, and memory cleaning

    and also some actions to b taken on low battery, lke dim screen, wifi off, screentime out less, and vibration off.

    Lemme know what u feel..
    03-22-12 12:49 PM
  10. Vijik's Avatar
    Launching shortcuts based on time is already supported (since early 5 series).

    Just go to SCM>BB/Menu/CommonConfig and find 'Scheduled Launch' section.

    You can set SCM to launch a shortcut with the interval you want (each hour).

    Your macro shortcut should then preferably, check and wait until you don't use your BB before starting its task (use "if2 IdleSeconds>10; ...").

    Other automatic launchings will be added soon.
    03-22-12 01:00 PM
  11. hardikjakharia's Avatar
    Cool.. guess didnt go through the config page properly.. the 10 lists for various options make it hard to read it.. Having seperate tabs/nestes settings would be better?

    AM tesing it now.. will let you know how it goes..

    Meanwhile no whatsapp users??
    03-23-12 04:01 AM
  12. Vijik's Avatar
    I might actually move them to a separate page.

    As you can see in the text, if you want your macro shortcut to launch every hour, set
    Min=60,
    Hour=200

    You can even tell ShortcutMe what day of week your shortcut should launch once every hour.
    03-23-12 04:20 AM
  13. JAKrzysztow's Avatar
    I tried to search this, but probably no phrasing correctly.

    At 11:00 PM I wish phone to change Profiles, but the Profiles are displayed and nothing else happens. I know the Profile Selector works when I trigger it manually, but I am guessing it does not work here because the phone is keyboard locked? I use Easy Lock that does this after the screen goes off.

    Is there a solution to this problem?

    If the solution is already in the thread, point me to it please!

    I know 7.1 is out for my phone and that os can change without regards to any kind of locking, but I am not ready to spend all that time in upgrading.....

    Thanks!
    03-23-12 10:59 AM
  14. hardikjakharia's Avatar
    the automac launching works fine with the 200 and 59 parameters. however, how do i have it launch at exactly 00 mins every hour? Do i set it at 00 hours, so it will repeat at that time?
    03-24-12 01:07 PM
  15. paulsdv's Avatar
    Thanks for all your help Vijik...

    Here is my working macro if anyone is interested.

    First create a folder SS and put 12 images you want to use for your slideshow in it..

    App name media pictures

    Macros

    delay50;Keys
    ;delay50;keys;
    set $count=20;
    while6 $count>1;
    do6;
    navclick;
    MENUKey;MenuItemFromBottom6;delay 50;NavClick;delay50;navmovedown 1;navclick;
    Set $Time=GetUpTime;
    div $time , 14;
    set $right=$$rest;
    While2 $right>1;
    Do2;
    NavMovedown 1;
    Delay 50;
    Dec $right;
    Endwhile2;
    NavClick;
    Set $DelayCounter = 180;
    While3 $DelayCounter > 0;
    Do3;
    if5 isconnectedtocharger==true;
    then5;
    backlighton;
    Delay 1000;
    Dec $DelayCounter;
    else5;
    delay 50;
    MENUKey;MenuItemFromBottom1;delay 50;NavClick;delay 50;
    MENUKey;MenuItemFromBottom1;delay 50;NavClick;delay 50;
    esckey;
    delay 50;
    esckey;
    delay 50;
    esckey;
    delay 50;MENUKey;MenuItemFromBottom1;delay 50;NavClick;
    stop;
    endif5;
    EndWhile3;
    dec $count;
    MENUKey;MenuItemFromBottom1;delay 50;NavClick;MENUKey;MenuItemFromBottom1;delay 50;NavClick;
    endwhile6;
    delay 50;
    MENUKey;MenuItemFromBottom1;delay 50;NavClick;
    delay 50;
    MENUKey;MenuItemFromBottom1;delay 50;NavClick;
    delay 50;
    esckey;
    delay 50;
    esckey;
    delay 50;
    esckey;
    delay 50;
    MENUKey;MenuItemFromBottom1;delay 50;NavClick;

    Works perfectly
    Thanks again
    03-24-12 03:10 PM
  16. Maiev's Avatar
    Hay one more question! I'm getting the hang of your macro program

    Lets say I have shortcut me to

    Turn to 2g SHORTCUT as G (so that's the parameter I passed to NFC Shortcut)
    Silent All (Shortcut as S)
    Turn Off Wifi (Shortcut as W)

    as all separate shortcutme macros

    How can I make it so that I scan 1 NFC and it does/perform all 3 macros :O!?

    THanks man !

    How can I make the NFC to
    03-24-12 06:34 PM
  17. Devil's Avatar
    Hello.
    I'm using 7.1 on 9900 and I like to switch to 3G at times, and when reception is bad for no reason, I want to put it at 2G & oter times at default to 3G & 2G. First I'm not sure if the macro listed in the following thread would even work for 7.1 .. So need some help on that.

    http://forums.crackberry.com/forum-f...83/index6.html
    Also, was hoping to make this a timed macro in future. "Enable 3G only for 10 minutes" etc.
    Any help?
    03-24-12 10:55 PM
  18. Maiev's Avatar
    g damn... shortcut me on sale... i had to buy it 2 days early - -"
    03-25-12 08:56 AM
  19. Vijik's Avatar
    @paulsdv,

    Very nice macro. Congrats, you have now written your own application!

    With the newer version of ShortcutMe (currently being alpha tested), you can turn that macro into a Plugin Function file (new feature), and hide its complexity and allow it to accept parameter.
    In addition, others can just download your file (plugin function) and start using it without knowing anything about macros.
    03-25-12 09:14 AM
  20. Vijik's Avatar
    Hay one more question! I'm getting the hang of your macro program

    Lets say I have shortcut me to

    Turn to 2g SHORTCUT as G (so that's the parameter I passed to NFC Shortcut)
    Silent All (Shortcut as S)
    Turn Off Wifi (Shortcut as W)

    as all separate shortcutme macros

    How can I make it so that I scan 1 NFC and it does/perform all 3 macros :O!?

    THanks man !

    How can I make the NFC to
    CascadedShortcuts in ShortcutMe couples several shortcuts together.

    Create a new shortcut that runs your shortcuts one after the other:
    App Name: CascadedShortcuts
    Parameter: G;S;W;
    Shortcut Keys: GWS
    (or anything else you want)

    Now in NFCShortctus set an NFC tag like this:
    Launches: ShortcutMe
    Parameter: GWS
    03-25-12 09:42 AM
  21. Vijik's Avatar
    Hello.
    I'm using 7.1 on 9900 and I like to switch to 3G at times, and when reception is bad for no reason, I want to put it at 2G & oter times at default to 3G & 2G. First I'm not sure if the macro listed in the following thread would even work for 7.1 .. So need some help on that.

    http://forums.crackberry.com/forum-f...83/index6.html
    Also, was hoping to make this a timed macro in future. "Enable 3G only for 10 minutes" etc.
    Any help?
    This macro works on my 9900 to toggle to 3G:

    Launch Options; Key Mobile Network; /* Find Mobile Network in BB Options */
    NavMoveDown1;Delay50; /* Assuming that only 2 items are shown and the second one is 'Mobile Network' */
    NavClick;Delay100;
    NavMoveDown4; /* Go to Network Mode in Mobile Network */
    NavClick;MenuItemFromTop1;Delay50; /*Select 3G from the list */
    NavClick;Delay50;
    EscKey;EscKey;EscKey; /*Close Options */

    Add this part before the macro above if you want your macro to close any Options screen first:

    Set $loop=1;
    While0 IsAppRunning Options && $loop<9;
    Do0;
    LaunchAndWait Options;
    EscKey;
    Inc $loop;
    EndWhile0;


    You should be able to make 2 shortcuts, one the above to switch to 3G, and the other one a modified version that switches to "3G & 2G".
    03-25-12 01:20 PM
  22. Maiev's Avatar
    Hay man, back again!

    Sorry to hammer you with questions :O

    So I read all your functions. Here is me trying to make a macro to do a 1 click call Long Distance with phone card.

    Lets say I wanna call! Password to my phone card is "1234"

    Macros:
    Call 123456789; // long distance card number
    Delay 5000;
    Key1234; // enter authorization code
    Delay 5000;
    Key 987654321 // destination phone number

    ----

    I try using SPKey doesn't work :O

    It calls but

    it then types

    4400

    lol :x

    Soryr :O hope you can help me a little here as well
    03-25-12 05:25 PM
  23. paulsdv's Avatar
    ok here is my final final

    made some changes to make it simpler and more "random"

    delay50;Keys
    ;delay50;keys;
    set $count=20;
    while6 $count>1;
    do6;
    navclick;
    MENUKey;MenuItemFromBottom6;delay 50;NavClick;delay50;navmovedown 1;navclick; Set $Time=GetUpTime; div $time , 14; set $right=$$rest;
    While2 $right>1;
    Do2;
    NavMovedown 1;
    Delay 50;
    Dec $right;
    Endwhile2;
    NavClick;
    Set $DelayCounter = 180;
    While3 $DelayCounter > 0;
    Do3;
    if5 isconnectedtocharger==true;
    then5;
    backlighton;
    Delay 1000;
    Dec $DelayCounter;
    else5;
    delay 50;
    stop;
    endif5;
    EndWhile3;
    dec $count;
    MENUKey;MenuItemFromBottom1;delay 50;NavClick;MENUKey;MenuItemFromBottom1;delay 50;NavClick; endwhile6; delay 50; MENUKey;MenuItemFromBottom1;delay 50;NavClick; delay 50; MENUKey;MenuItemFromBottom1;delay 50;NavClick; delay 50; esckey; delay 50; esckey; delay 50; esckey; delay 50; MENUKey;MenuItemFromBottom1;delay 50;NavClick;


    Thanks again for all your help! Look forward to the new SCM
    Vijik likes this.
    03-26-12 11:24 AM
  24. Devil's Avatar
    Is there a macro writing tutorial somewhere?
    The PDF manual and the online FAQ doesn't mention much on how the macros even work. :S

    Thank you to the author who responded to me for 3G macro.
    I can't wait to Alt+R and expect for it to change to 3G right away.
    03-27-12 05:52 AM
  25. TomCanuck's Avatar
    Mmm not really as far as I know. You can refer to this thread, but I beg of you not to post. It's a great reference thread and yeah... Better to to post here with questions rather than the reference thread imo. http://forums.crackberry.com/blackbe...tcutme-637024/

    Feel free to ask any questions, my life calmed down a bit so I'll be around to explain as best as I can.
    Vijik likes this.
    03-27-12 05:57 AM
1,385 ... 4445464748 ...
LINK TO POST COPIED TO CLIPBOARD