1. TomCanuck's Avatar
    Quick question... Using the Launch macro, what is the syntax to use alternate launching schemes (i.e., # or *)? I need to launch BlackBerry� App World (which requires the #) from within a macro.

    Posted from my CrackBerry at wapforums.crackberry.com
    just toss it on the end like
    Launch BlackBerry App World#
    10-16-11 09:46 AM
  2. visortgw's Avatar
    just toss it on the end like
    Launch BlackBerry App World#
    Thanks! It works perfectly -- I knew it could be done, but I didn't have the syntax quite right (I added a space before the #).

    Posted from my CrackBerry at wapforums.crackberry.com
    10-16-11 10:38 AM
  3. anon(4113192)'s Avatar
    non-essential macro suggestion:

    SuspendTill, WaitTill, or DelayTill functioning to delay the macro until boolean returned true.

    It would make creating bullet proof macros a lot easier and cleaner, as well as, reducing some of the needed uses of delays.


    example:

    Launch Options;
    WaitTill IsAppForeground Options;
    NavClick; Move; NavClick; Etc...


    I could see this leading to bigger errors if not used right. You'd know better than I if it's not worth it.

    Cheers.

    EDIT: may be safer as parameter to the launch function.
    Last edited by ONE618; 10-17-11 at 12:42 AM.
    10-17-11 12:19 AM
  4. TomCanuck's Avatar
    non-essential macro suggestion:

    SuspendTill, WaitTill, or DelayTill functioning to delay the macro until boolean returned true.

    It would make creating bullet proof macros a lot easier and cleaner, as well as, reducing some of the needed uses of delays.


    example:

    Launch Options;
    WaitTill IsAppForeground Options;
    NavClick; Move; NavClick; Etc...


    I could see this leading to bigger errors if not used right. You'd know better than I if it's not worth it.

    Cheers.
    Ooo I could get on board with this. Long macros can drive the WhileX pretty high. And would defiantly increase the cleanliness.

    Now, I cannot remember if I've mentioned these before, or just been thinking about them for a while now. So I'ma list them, forgive me if I'm repeating myself.

    On the topic of non-essential features though. Perhaps moving the ScreenShots into their own folder to make them easier to skip/delete during backup time.

    Also, non-essential, perhaps even impossible, but... GetMKBVersion, GetMOIVersion, GetNFCLVersion. I'm spoiled with GetSCMVersion now

    Edit #1
    I think I need a new set of eyes on this, if someone has some free time. I'm trying a much longer macro, but in debugging why it wouldn't work I've broken it down to this, and this part is behaving very oddly (I think)

    Macro:
    Show Start;
    SetLedColor o;
    Led On;
    Launch WiFi_Off;
    Delay1000;
    Launch Profile_Selector;
    Delay1000;
    *Keyn;
    Delay1000;
    NavClick;
    Delay1000;
    Ding100;
    Show rawr;

    ... What it's actually doing is
    Led comes on, Shows Start, if I choose Continue, WiFi turns off properly, Profile selector opens properly, 'Keyn is pressed properly, NavClick is done properly, Ding100 happens, but then it gets weird. Show rawr is skipped, LED stays on, Profile_Selector is launched again, *Keyn happens again, NavClick again, Ding100 again, Show rawr is again skipped and LED goes off as SCM exists.
    Can anyone spot why?

    I'm aware of the issue with some things like I ran into with MemoPad_New, does Launch Wifi_Off fall into that catagory? Cuz I never ran into an issue with it in my recurring Wifi check macro. Gunna make a video of this with Pocket Conroller :\

    ShortcutMe_Touch 5.9.2.1_OS7_T (from the beta page) on 9900/7.0.0.440

    Edit #2
    Never mind. my BlackBerry finally just froze up completely, reboot presented me with the White Screen of Death (JVM Error 528). I'm going to guess that was why the macro was behaving weirdly.

    Edit #3
    Annnnd I'm back from the WSOD. The macro from Edit #1 still acts weird, so I stripped out the built in commands and did it manually like so:

    Show Start;
    Ding50;
    SetLedColor o;
    Led On;
    Launch Manage Connections;
    Delay1000;
    NavMoveDown1;
    Delay1000;
    NavClick;
    Delay1000;
    EscKey;
    Delay1000;
    Launch Home Screen;
    Delay1000;
    NavMoveUp3;
    Delay1000;
    NavMoveDown1;
    Delay1000;
    NavMoveLeft1;
    Delay1000;
    NavClick;
    Delay1000;
    *Keyn;
    Delay1000;
    NavClick;
    Delay1000;
    Ding100;
    Show rawr;

    That behaved weird also. It'd run through everything twice skipping "show rawr;" the first time round but would show it at the end of the second.

    But if I strip the first "show start" like this

    Ding50;
    SetLedColor o;
    Led On;
    Launch Manage Connections;
    Delay1000;
    NavMoveDown1;
    Delay1000;
    NavClick;
    Delay1000;
    EscKey;
    Delay1000;
    Launch Home Screen;
    Delay1000;
    NavMoveUp3;
    Delay1000;
    NavMoveDown1;
    Delay1000;
    NavMoveLeft1;
    Delay1000;
    NavClick;
    Delay1000;
    *Keyn;
    Delay1000;
    NavClick;
    Delay1000;
    Ding100;
    Show rawr;

    It works as expected... The moral of my story seems to be... Don't start macros with a "show" ...

    Edit #4

    Found a problem with PasswordKey. It doesn't work with with 10 numbers. It only prints out 9. 11 number passwords seems to be fine :\ so does 9 numbers... I am so confuse
    Last Edit
    10 character passwords that end in a number
    aaaaaaaaa1 prints out only aaaaaaaaa, while aaaaaaaaaa prints out aaaaaaaaaa, while 1234567890 prints out 123456789... No moar testing or editing for me lol. Almost home time from work ^_^

    ShortcutMe_Touch 5.9.2.1_OS7_T on 9900/7.0.0.440
    Last edited by Juggalo20; 10-17-11 at 08:02 AM.
    10-17-11 12:39 AM
  5. Vijik's Avatar
    @ONE618,
    WaitTil macro sounds good. It will definitly make macros cleaner.

    It will replace the following macro set:

    While2 ! 'Test';
    Do2;
    Delay X;
    EndWhile2;


    What do you (all of you macro writers) think X should be for the WaitTil macro?

    (If X is too small, few mSecs, the BB's CPU gets too busy (more than neccessary) with the While loop. If X is too large it is a delay between the time the 'Test' result become TRUE and the time the macro continues past WaitTil)
    10-17-11 09:24 AM
  6. TomCanuck's Avatar
    @ONE618,
    WaitTil macro sounds good. It will definitly make macros cleaner.

    It will replace the following macro set:

    While2 ! 'Test';
    Do2;
    Delay X;
    EndWhile2;


    What do you (all of you macro writers) think X should be for the WaitTil macro?

    (If X is too small, few mSecs, the BB's CPU gets too busy (more than neccessary) with the While loop. If X is too large it is a delay between the time the 'Test' result become TRUE and the time the macro continues past WaitTil)
    how's 200 sound? (i'm just throwing it out wildly, with no concept of how few too few is :P)
    10-17-11 09:31 AM
  7. Vijik's Avatar
    Juggalo20, I will run the debugger and see what happens.
    Let you know.
    10-17-11 09:33 AM
  8. anon(4113192)'s Avatar
    Juggalo20, something that may also have caused the bug is launching Profiles from a MyOwnIcons shortcut that is followed by nav movements/key clicks. This is a bug I've found with every thirparty app that launches profiles from the home screen. It usually occurs when the top most area on the home screen is selected, and is especially prone with profile_selector.

    Posted from my CrackBerry at wapforums.crackberry.com
    10-17-11 11:51 AM
  9. anon(4113192)'s Avatar
    WaitTill delay,

    Oh that's hard to get a universally effecient delay time. I probably would just end up using a while statement if the delay defaulted over 30.

    These are the nav and key bug prevention delay times used on my 9900 v4.4.0

    Delay10.....most
    Delay30.....newly opened apps
    Delay60.....rare

    Except App World, of course...
    And, except when trying to communicate with BIS, and the entire OS bugs and panic attacks since it can't communicate fast enough...

    Posted from my CrackBerry at wapforums.crackberry.com
    Last edited by ONE618; 10-17-11 at 12:06 PM.
    10-17-11 12:00 PM
  10. TomCanuck's Avatar
    Juggalo20, something that may also have caused the bug is launching Profiles from a MyOwnIcons shortcut that is followed by nav movements/key clicks. This is a bug I've found with every thirparty app that launches profiles from the home screen. It usually occurs when the top most area on the home screen is selected, and is especially prone with profile_selector.

    Posted from my CrackBerry at wapforums.crackberry.com
    Why must you bring terrible news :< lol

    WaitTill delay,

    Oh that's hard to get a universally effecient delay time. I probably would just end up using a while statement if the delay defaulted over 30.

    These are the nav and key bug prevention delay times used on my 9900 v4.4.0

    Delay10.....most
    Delay30.....newly opened apps
    Delay60.....rare

    Posted from my CrackBerry at wapforums.crackberry.com
    Let's for a second assume the delay can be easily changed by Vijik... how about ... a few versions get tossed out on the beta site and we can report back with which WaitTill version worked best? Again i'm just wildly assuming things are easily changeable (as in, all that needs to be done is change a single value in the source)

    If i'm off base and it's not practically effortless to change the delay time then i withdraw this suggestion...
    10-17-11 12:06 PM
  11. anon(4113192)'s Avatar
    Another note on macros from the home screen. Any nav/key macros starting while the top most (or no area) is selected will be prone to bugs. An easy fix to this is using MenuItemFromTop3. That MenuItem macro is a beauty.

    Posted from my CrackBerry at wapforums.crackberry.com
    10-17-11 12:13 PM
  12. TomCanuck's Avatar
    Another note on macros from the home screen. Any nav/key macros starting while the top most (or no area) is selected will be prone to bugs. An easy fix to this is using MenuItemFromTop3. That MenuItem macro is a beauty.

    Posted from my CrackBerry at wapforums.crackberry.com
    true, I do love me some MenuItemFrom, but unless I used Launch Profile_Selector I'da been stuck using a NavMoveLeft anyways. Still puzzled by how a leading "Show" caused it to loop though. Gotta get some sleep here, but I'll be doing major experimenting at work later.

    Posted from my CrackBerry at wapforums.crackberry.com
    10-17-11 12:17 PM
  13. anon(4113192)'s Avatar
    true, I do love me some MenuItemFrom, but unless I used Launch Profile_Selector I'da been stuck using a NavMoveLeft anyways. Still puzzled by how a leading "Show" caused it to loop though. Gotta get some sleep here, but I'll be doing major experimenting at work later.

    Posted from my CrackBerry at wapforums.crackberry.com
    I see what you're saying now, yeah that is weird. I tried with varying delay times resulting in different bugs. Interesting. I think it only occurs when launching profiles manually or automatically. Maybe other non-full-screen apps too, but that's a complete geuss.

    Posted from my CrackBerry at wapforums.crackberry.com
    10-17-11 12:36 PM
  14. TomCanuck's Avatar
    In my attempt to confim statring a macro with a "Show" causes tha macro to loop through twice, I give you

    Show yes;
    Ding50;
    Led On;
    Launch Options;
    Delay1000;
    NavMoveDown6;
    Delay1000;
    NavClick;
    Delay1000;
    EscKey;
    Delay1000;
    EscKey;
    Show rawr;

    Just tried it and it looped

    Posted from my CrackBerry at wapforums.crackberry.com

    Oh right, ShortcutMe_Touch 5.9.2.1_OS7_T on 9900/7.0.0.440
    Last edited by Juggalo20; 10-17-11 at 10:55 PM.
    10-17-11 08:42 PM
  15. TomCanuck's Avatar
    @ONE618,
    WaitTil macro sounds good. It will definitly make macros cleaner.

    It will replace the following macro set:

    While2 ! 'Test';
    Do2;
    Delay X;
    EndWhile2;


    What do you (all of you macro writers) think X should be for the WaitTil macro?

    (If X is too small, few mSecs, the BB's CPU gets too busy (more than neccessary) with the While loop. If X is too large it is a delay between the time the 'Test' result become TRUE and the time the macro continues past WaitTil)
    Oooo what about a WaitDelay macro. Have it work the same as InjectDelay but for WaitTil D: people with tons of apps running might need a longer delay while those with very few can get away with a smaller delay. With a default of 20 or 30?

    Theoretical example:
    WaitDelay5;
    Launch puzzed;
    WaitTill IsAppForeground puzzed;
    NavClick;

    Would check every 5miliSecs vs

    Launch Puzzed;
    WaitTil IsAppForeground Puzzed;
    NavClick

    Would use 20 by default

    Posted from my CrackBerry at wapforums.crackberry.com
    Last edited by Juggalo20; 10-18-11 at 12:38 AM.
    10-18-11 12:20 AM
  16. anon(1603170)'s Avatar
    WaitTill Test -> D not set, defaults to 30? 20?, 30 should be pretty standard for launching apps or switching windows.
    WaitTill Test,D or D,Test -> D custom set (Test looks better first as its the "test")
    WaitDelay D -> Global D change for "WaitTill Test"

    Used with pre-set variables,

    WaitTill isappforeground eventlogviewer,$delay or the other way around depending on which is chosen.
    WaitTill isappforeground $app,$delay
    WaitTill isappforeground $app,10

    Now, onto semantics, it got me a bit confused,
    "WaitTill isappforeground A" would translate into "while !isappforeground A;do;delay", for some.
    Thus, it has to be noted that the straightforward meaning is irrelevant and just go straight ahead as a generic expansion of a while loop,
    "WaitTill !isappforeground A" -> "while !isappforeground A;do;delay"??
    Unless its translated exactly as vijik posted, being "isappforeground A" the test and the WaitTill being the "while !"/while not expansion,
    as in while not test. Thats the correct way right?

    Then you can either use till, the word from which until is made from, although they can be used interchangeably, or til / 'til the shorthand version of until.

    It could then be combined with WaitDelay X for a more global change for the default WaitTill T, while WaitTill T,D can be used for local changes overriding the waitdelay value.

    Further,
    Launch macro upon execution can create/return an SCM variable $$ap, or $$app as long as it doesn't conflict with $app, which,

    Launch myapplication;
    WaitTill isappforeground $$ap,40; where $$ap=myapplication.
    Last edited by gbsn; 10-18-11 at 01:40 AM.
    10-18-11 12:51 AM
  17. Vijik's Avatar
    Good idea.
    It helps to have a separate delay setting macro, either WaitDelay or WaitTilDelay. And let the WaitDelay use a default delay value, a value that can be overriden by WaitTilDelay.

    I will add this as soon as I get time (later on today or tomorrow).
    Currently I am working on an upgrade for MediaKeyBooster.
    10-18-11 07:53 AM
  18. Vijik's Avatar
    Gbsn, I didn't see your post when I posted mine above.

    WaitTil AppName,Delay;

    is a good idea. It was what I also had in mind. But it makes the syntax difficult for most users to understand.
    I would just have a macro for globaly setting WaitTil delay and then set the default delay for WaitTil to 100 mSec.
    10-18-11 08:13 AM
  19. anon(4113192)'s Avatar
    Gbsn, I didn't see your post when I posted mine above.

    WaitTil AppName,Delay;

    is a good idea. It was what I also had in mind. But it makes the syntax difficult for most users to understand.
    I would just have a macro for globaly setting WaitTil delay and then set the default delay for WaitTil to 100 mSec.
    Would it be possible to have it as a parameter to Launch, with a global set for any delay?

    Set $$Delay=global default milliseconds for any delays;

    Launch AppName, Delay;
    =
    launch appname;
    while !isappforeground appname;do;
    delay30;
    endwhile;

    Launch AppName, Delay200;
    =
    launch appname;
    while !isappforeground appname;do;
    delay200;
    endwhile;


    Delay;
    = Delay $$Delay;

    Delay 50;
    = Delay 50;

    if !isdefined $$Delay; then $$Delay=30;


    this maybe a simpler syntax with an added default delay feature.

    note: man i'm loving the !not, my macros just got way more pretty.
    Last edited by ONE618; 10-18-11 at 02:29 PM.
    10-18-11 02:18 PM
  20. dimm0k's Avatar
    Wanted a way to open up the file manager on the BB so I created a shortcut with "App Name" FileLauncher. Looks like it's broken with version 5.9.2.0 (beta) as it does nothing when you launch the shortcut. Weird thing is when you save the short cut, SCM tells you "App Name" is blank and if I want to set it even though FileLauncher is set!
    10-18-11 03:58 PM
  21. Vijik's Avatar
    5.9.2.2 is on beta link. (This 5.9.2.2 beta is only for 9900, 9930, 9850, 9860 and 9810)

    I just added 'WaitTil' and 'WaitTilDelay', but I have plan to add 'LaunchAndWait' macro in the next rev after reading the latest posts here.

    Another new thing in 5.9.2.2 is that 'Show' macro will show your message/info box on whatever screen that was in foreground when macro engine executes 'Show' macro.
    (currently SCM comes to foreground before showing the message).

    Edit:
    WaitTil delay is by default 100 mSec.
    WaitTilDelay macro will globally (for the shortcut) set the delay for WaitTil.
    Last edited by Vijik; 10-18-11 at 05:32 PM.
    TomCanuck likes this.
    10-18-11 05:29 PM
  22. TomCanuck's Avatar
    Wanted a way to open up the file manager on the BB so I created a shortcut with "App Name" FileLauncher. Looks like it's broken with version 5.9.2.0 (beta) as it does nothing when you launch the shortcut. Weird thing is when you save the short cut, SCM tells you "App Name" is blank and if I want to set it even though FileLauncher is set!
    Tested with ShortcutMe_Touch 5.9.2.1 on 9900/7.0.0.440 and FileLauncher works fine for me. :/

    App Name: FileLauncher
    Parameter: SDCard/BlackBerry/pictures/ScreenShot_Oct_17__22_54_14.jpg

    App Name: FileLauncher:
    Parameter: SDCard/BlackBerry/music/Media Sync/Castro The Savage/Army Of Darkness/01 - Castro The Savage - Army Of Darkness (Album Version).mp3

    both of those worked for me. :/ what version of SCM are you using?

    Update #1
    also works for me on ShortcutMe_Touch 5.9.2.2 (beta)
    Last edited by Juggalo20; 10-18-11 at 09:19 PM. Reason: updating
    10-18-11 08:41 PM
  23. TomCanuck's Avatar
    5.9.2.2 is on beta link. (This 5.9.2.2 beta is only for 9900, 9930, 9850, 9860 and 9810)

    I just added 'WaitTil' and 'WaitTilDelay', but I have plan to add 'LaunchAndWait' macro in the next rev after reading the latest posts here.

    Another new thing in 5.9.2.2 is that 'Show' macro will show your message/info box on whatever screen that was in foreground when macro engine executes 'Show' macro.
    (currently SCM comes to foreground before showing the message).

    Edit:
    WaitTil delay is by default 100 mSec.
    WaitTilDelay macro will globally (for the shortcut) set the delay for WaitTil.
    seems to be working. hard to tell though since generally speaking things load so fast.

    Using:

    WaitTilDelay <varying numbers>;
    Launch <appname>;
    WaitTil IsAppForeground <appname>;
    MenuKey;
    MenuItemFromBottom1;

    and i havent hit any problems with it yet though.
    10-18-11 09:14 PM
  24. anon(4113192)'s Avatar
    5.9.2.2 is on beta link. (This 5.9.2.2 beta is only for 9900, 9930, 9850, 9860 and 9810)

    I just added 'WaitTil' and 'WaitTilDelay', but I have plan to add 'LaunchAndWait' macro in the next rev after reading the latest posts here.

    Another new thing in 5.9.2.2 is that 'Show' macro will show your message/info box on whatever screen that was in foreground when macro engine executes 'Show' macro.
    (currently SCM comes to foreground before showing the message).

    Edit:
    WaitTil delay is by default 100 mSec.
    WaitTilDelay macro will globally (for the shortcut) set the delay for WaitTil.
    Confirmed working and awesome. Tested it in my radio toggle. Thanks Vijik.

    Code:
    Vibrate30;
    If0 HasRadioConnection;
      Then0;
        LaunchRadio_Off;
        WaitTil !IsRadioOn;
        SetLedColorR; 
        LedOn;
        Delay120;
        LedOff;
        STOP;
    EndIf0;
    
    Set $loop=1;
    Set $$Result=3000;
    
    While1 !HasRadioConnection;Do1;
      If1 IsRadioOn;
        Then1;
          LaunchRadio_Off;
          WaitTil !IsRadioOn;
      EndIf1;
      LaunchRadio_On;
      WaitTil IsRadioOn;  
      If3 $loop>3;
        Then3;
          SetLedColorR;
          LedOn;
          Vibrate300;
          LedOff;
          ShowConnection Failed, Retry?;
            Mult $$Result,2;
            Set $loop=1;
        Else3;
          Inc$loop;
      EndIf3;
    EndWhile1;
    
    SetLedColorG;
    LedOn;
    Delay120;
    LedOff;
    Posted from my CrackBerry at wapforums.crackberry.com
    10-18-11 09:46 PM
  25. Vijik's Avatar
    Good to know that it works.

    BTW, the new Show can be used to check if a correct item is highlighted before NavClick/ENTERKey macro is executed:

    ...
    NavMoveDown2;
    Show Is the 'xx' item highlighted;
    NavClick;
    ...


    On a second thought for LaunchAndWait macro (launches an app and wait for it to come to foreground), what if the app can't be launched?
    Should the Wait-Loop automatically exit after 2 seconds or so, stopping the macro?
    10-18-11 10:31 PM
712 ... 89101112 ...
LINK TO POST COPIED TO CLIPBOARD