08-25-13 05:45 AM
1,385 ... 2728293031 ...
tools
  1. Vijik's Avatar
    ...

    Also Vijik I know you have IsWifiOn in the alpha, any chance of expanding that to IsWifiConnected ?

    ...
    Let me check if it is a consistent way to check Wifi connection. If I find a way I will add (maybe calling it 'HasWifiConnection').

    I will also add 'HasRadioConnection' macro.
    09-21-11 08:10 AM
  2. Vijik's Avatar
    New version is out. Please download it from the store (other than App World), test its new macro sets and report back in the thread below:

    http://forums.crackberry.com/blackbe...ch-etc-653707/
    09-23-11 01:16 AM
  3. gbsn's Avatar
    Template for apps that take too long to load or show up, e.g: appworld 3.0, and contain macros depending on its loading time.

    while0 !isappforeground APPNAME;
    do0;
    delay100;
    endwhile0;
    ACTION1;
    ACTION2;


    Suggestions,

    >> getday, returns the current day number, with a leading zero if less than 10. Ex: 23 or 03
    >> getmonth, returns the current month number, with a leading zero if less than 10. Ex: 09 or 12
    >> getyear, returns the current year. Ex: 2011

    Creation of custom date formats in texts, memos, filenames, general text usage.

    >> exists $varname, returns true or false depending on whether varname has been defined in the current macro run.
    Could prove useful when defining a variable then importing a macro that uses it after it, so it doesn't return "error reading integer number" when it hasn't been defined.
    Alternative names: isDefined

    For example,
    macro one:
    set $var=1;
    importmacro aa;

    macro aa:
    bla;
    bla;
    if0 exists$var;
    -then0;
    --if1 $var==1;
    --then1;
    ----do something;
    --endif1;
    else0;
    --do something else;
    endif0;

    So i can run shortcut "aa" and it wont give an error as it has an else for when var its not defined.
    Last edited by gbsn; 09-23-11 at 06:21 AM.
    09-23-11 06:10 AM
  4. Vijik's Avatar
    Good idea.
    I will add GetDay, GetMonth, GetYear, and IsDefined macros.
    09-23-11 06:47 PM
  5. TomCanuck's Avatar
    Know what I'd like? The ability to turn on the LED (and specify color) during a macro, doesn't have to blink or anything, I'd just like a steady "on". I use a macro to launch CB forum subscription, which of course includes a rather long delay to make sure the page is loaded. And often I'll forget, then my cursor is flying all over the place clicking lol.

    Perhaps a separate command to include in macros? LEDONG(reen) LEDB(lue) LEDW(hite) LEDR(ed) then of course LEDOFF?

    Posted from my CrackBerry at wapforums.crackberry.com
    09-23-11 11:36 PM
  6. gbsn's Avatar
    Know what I'd like? The ability to turn on the LED (and specify color) during a macro, doesn't have to blink or anything, I'd just like a steady "on". I use a macro to launch CB forum subscription, which of course includes a rather long delay to make sure the page is loaded. And often I'll forget, then my cursor is flying all over the place clicking lol.

    Perhaps a separate command to include in macros? LEDONG(reen) LEDB(lue) LEDW(hite) LEDR(ed) then of course LEDOFF?

    Posted from my CrackBerry at wapforums.crackberry.com
    I do agree about the usefulness of this. I will however, take the liberty to further expand this idea as i've also been thinking about it for a while, but since you suggested it, i will post what i had in mind.

    LedOn color -> will turn on the led as juggalo said, indefinitely until LedOff is used.
    where:
    color = red,blue,white,green,yellow,purple,pink,turquoise

    LedBlink color,x,y,z -> blinks led
    where:
    color = color
    x = delay in-between flashes, 3 speeds (1,2,3) 3=0.25seconds, 2=0.5seconds, 1=1second
    y = length of flash, 3 speeds, same as above?
    z = amount of time to blink in miliseconds, 0 means it will keep blinking indefinitely until LedOff is used, 3000 means it will keep blinking for 3 seconds.

    LedOff -> will turn off the led, either when blinking or steady

    Color naming: Colors can have numeric value sorted by starting letter. In the above case, blue=1, green=2 and so on. Or just randomly in whatever order Vijik chooses. Or it can just be the color name as a string, blue for blue and so on.
    Color availability: as Vijik chooses, i would say above selections are ok, no problem if less. If not a primary color, it would obviously have to have the code to mix the two colors that make the color. e.g: purple=blue+red, pink=red+white. I dont know exactly how the LED on the blackberry works which is why i did not want to post this as i dont know the complexity.
    Last edited by gbsn; 09-24-11 at 12:16 AM.
    09-24-11 12:11 AM
  7. TomCanuck's Avatar
    I do agree about the usefulness of this. I will however, take the liberty to further expand this idea as i've also been thinking about it for a while, but since you suggested it, i will post what i had in mind.

    LedOn color -> will turn on the led as juggalo said, indefinitely until LedOff is used.
    where:
    color = red,blue,white,green,yellow,purple,pink,turquoise

    LedBlink color,x,y,z -> blinks led
    where:
    color = color
    x = delay in-between flashes, 3 speeds (1,2,3) 3=0.25seconds, 2=0.5seconds, 1=1second
    y = length of flash, 3 speeds, same as above?
    z = amount of time to blink in miliseconds, 0 means it will keep blinking indefinitely until LedOff is used, 3000 means it will keep blinking for 3 seconds.

    LedOff -> will turn off the led, either when blinking or steady

    Color naming: Colors can have numeric value sorted by starting letter. In the above case, blue=1, green=2 and so on. Or just randomly in whatever order Vijik chooses. Or it can just be the color name as a string, blue for blue and so on.
    Color availability: as Vijik chooses, i would say above selections are ok, no problem if less. If not a primary color, it would obviously have to have the code to mix the two colors that make the color. e.g: purple=blue+red, pink=red+white. I dont know exactly how the LED on the blackberry works which is why i did not want to post this as i dont know the complexity.
    Haha you are a mad man
    LED colours work on RGB settings (BeBuzz allows you to create colours by specifying RGB values). So maybe even a LEDONR,G,B allowing us to create any colour we choose? Unless that's over the top...

    If we're getting into using numbers for predefined colours... I'd love for mIRC default colours (minus 14 and 15). Doubt this'll happen since no one uses IRC these days so I wouldn't be surprised if no one knows what I'm talking about..... But can't hurt to try right?

    Posted from my CrackBerry at wapforums.crackberry.com
    Last edited by Juggalo20; 09-24-11 at 12:27 AM.
    09-24-11 12:24 AM
  8. gbsn's Avatar
    The RGB value for the color would be in the macro engine, it reads the integer or the string then uses the RGB to set the LED. I wanted to avoid RGB values in the macros as it would make them a bit long, specially the blink one as it would add more values making it LedBlink r,g,b,x,y,z, and using strings or integers pinned to the name would make it easier for people starting with macros, as getting to a RGB scale is a bit tedious, unless of course, vijik is kind enough to include an RGB calculator within shortcutme hahaha, or to state in the documentation (macro editor) the RGB values of commonly used colors, would probably be even easier and faster.

    So, i dont know, i would also prefer RGB values since as you said, it would allow for custom colors and it will probably be easier and faster on the macro engine as it would not have to do any comparisons to resolve the color. Those with berrybuzz can even easily pre-test the RGB values before using them on SCM.

    Concluding, RGB gets my vote, if usage complexity is not a problem.

    LedOn r,g,b
    LedBlink r,g,b,x,y,z
    LedOff

    And its a one shot implementation, with LedOff providing the added functionality of turning off the led when it gets stuck (happens sometimes with some apps and berrybuzz).
    Last edited by gbsn; 09-24-11 at 12:41 AM.
    09-24-11 12:29 AM
  9. TomCanuck's Avatar
    The RGB value for the color would be in the macro engine, it reads the integer or the string then uses the RGB to set the LED. I wanted to avoid RGB values in the macros as it would make them a bit long, specially the blink one as it would add more values making it LedBlink r,g,b,x,y,z, and using strings or integers pinned to the name would make it easier for people starting with macros, as getting to a RGB scale is a bit tedious, unless of course, vijik is kind enough to include an RGB calculator within shortcutme hahaha, or to state in the documentation (macro editor) the RGB values of commonly used colors, would probably be even easier and faster.

    So, i dont know, i would also prefer RGB values since as you said, it would allow for custom colors and it will probably be easier and faster on the macro engine as it would not have to do any comparisons to resolve the color. Those with berrybuzz can even easily pre-test the RGB values before using them on SCM.

    Concluding, RGB gets my vote, if usage complexity is not a problem.

    LedOn r,g,b
    LedBlink r,g,b,x,y,z
    LedOff

    And its a one shot implementation, with LedOff providing the added functionality of turning off the led when it gets stuck (happens sometimes with some apps and berrybuzz).
    Perhaps a default colour, for people who don't even know what RGB is, or if someone is just banging out a quick macro to test new features after a SCM update? LEDon or LEDblink without args could just default to Green or whatever (not red, since that's BB default for notifications, could confuse the heck out of newcommers to SCM)?

    update
    I guess that could pose a problem for LEDblink... Would need some sort of check within the macro engine to actually count the args to see what's what, which brings us back to making it work (a little) harder... /me sighs

    Update #2
    Nevermind, LEDBlink without args could still just have a default heh... I'm so mentally slow tonight
    Last edited by Juggalo20; 09-24-11 at 01:07 AM.
    09-24-11 12:40 AM
  10. gbsn's Avatar
    A default value would certainly help with first steps. The engine could have an overloaded method.

    ledBlink(int,int,int,int,int,int)
    ledBlink() would just blink at a set color, rate, length and time.

    Same for ledon. Its probably doable.
    09-24-11 01:39 AM
  11. TomCanuck's Avatar
    Poor vijik... It just never ends for him haha.

    How's that reboot macro going for you? No problems? Yesterday right after I used it I got the White Screen. One of my fonts was corrupted. The 9900 is plauged with whitescreen issues though, so I can't exactly blame anything specific based on one instance.

    Posted from my CrackBerry at wapforums.crackberry.com
    09-24-11 01:47 AM
  12. gbsn's Avatar
    Poor vijik... It just never ends for him haha.

    How's that reboot macro going for you? No problems? Yesterday right after I used it I got the White Screen. One of my fonts was corrupted. The 9900 is plauged with whitescreen issues though, so I can't exactly blame anything specific based on one instance.

    Posted from my CrackBerry at wapforums.crackberry.com
    No problems at all hahaha, used it plenty of times already. On the 9810 its an instant restart, while on the 9800 i just have to press the menu key or raise the slider and it restarts, but neither of them have shown any weirdness.
    Last edited by gbsn; 09-24-11 at 02:33 AM.
    09-24-11 02:28 AM
  13. TomCanuck's Avatar
    No problems at all hahaha, used it plenty of times already. On the 9810 its an instant restart, while on the 9800 i just have to press the menu key or raise the slider and it restarts, but neither of them have shown any weirdness.
    ok awesome ^_^ /me resumes blaming the OS

    Posted from my CrackBerry at wapforums.crackberry.com
    09-24-11 02:50 AM
  14. Vijik's Avatar
    I saw the last 5-10 posts this morning about new requested macros.

    All I have to say is

    Kidding. Very good ideas. All are feasible and easy to add. The challenge is to find a syntax that is both lightweight (code footprint) and easy to understand for average users.

    My initial response will be: I will add them all.
    09-24-11 09:17 AM
  15. TomCanuck's Avatar
    Haha I laughed at the eek. Good to hear though can't wait to play with the LED. Gunna be setting off sezuires every time I run a macro for the first couple days :P

    Posted from my CrackBerry at wapforums.crackberry.com
    09-24-11 01:29 PM
  16. TomCanuck's Avatar
    Umm, Vijik .. I'm almost sorry for bringing this up because I'm sure it's a TON of work, but I'ma bring it up anyways. "Goto" ...

    Set variable=0;
    -Goto0;
    Inc $variable;
    -EndGoto0;
    -Goto1;
    Stop;
    -EndGoto1;
    While0 $variable<5;
    Do0;
    Goto0;
    EndWhile0;
    Goto1;

    Or something, not sure of a good way to do the Goto block.
    ... I'm sorry lol... I totally understand if you say no. I'm no developer, but I assume it'd be a monumental job to add this.

    Posted from my CrackBerry at wapforums.crackberry.com
    09-24-11 11:37 PM
  17. TomCanuck's Avatar
    Is it possible to directly launch the Text Messages app, instead of launching the Messages app then opening the SMS Messages folder? Removing the "$" shortcut on the 9900 was a bizarre choice by RIM.
    app name: messages
    macros:
    delay50;
    altpluskeys;

    or

    app name:
    macro
    macros:
    launch messages;delay60;
    altpluskeys;

    or

    app name: sms_page


    When is the shortcut limit bump coming
    ok so, i expanded on this a bit. The SMS_Page command doesn't work if you had an email open, or WLM/BBM convo (that you'd opened from the Messages list) or whatever else. SMS_Page only works if Messages is just on the list part. The one i wrote here will make your screen jump through a lot of hoops, but it will break out of WLM/BBM/WhatsApp, the SMS page if it was already open, Composing an email (it'll save the draft), and reading an email. This prolly isn't the most efficient way to do this, but ... my brain hurts so this is what you get :P

    As usual my macos come with no promises or responsibility on my part. USE AT YOUR OWN RISK I tried my best to make sure nothing bad could happen, but very few things in life are 100% and this is not one of them

    This was written on 9900/7.0.0.353 with ShortcutMe_Touch 5.8.2.0 (official)

    Launch Messages;
    While0 !IsAppForeground Messages;
    Do0;
    Delay1;
    EndWhile0;
    EscKey;
    If0 IsAppForeground Messages;
    Then0;
    EscKey;
    If1 IsAppForeground Messages;
    Then1;
    EscKey;
    Else1;
    Launch Messages;
    EndIf1;
    Else0;
    Launch Messages;
    EndIf0;
    Launch Messages;
    While1 !IsAppForeground Messages;
    Do1;
    Delay1;
    EndWhile1;
    EscKey;
    If2 IsAppForeground Messages;
    Then2;
    EscKey;
    Delay50;
    SpKeys;
    Else2;
    Launch Messages;
    Delay1;
    EndIf2;
    If3 IsAppForeground Messages;
    Then3;
    AltPlusKeys;
    Else3;
    Delay1;
    EndIf3;

    i tried it from angle i could think of and got no error messages, but if anyone spots a typo/error please let me know.
    09-25-11 01:57 AM
  18. gbsn's Avatar
    ok so, i expanded on this a bit. The SMS_Page command doesn't work if you had an email open, or WLM/BBM convo (that you'd opened from the Messages list) or whatever else. SMS_Page only works if Messages is just on the list part. The one i wrote here will make your screen jump through a lot of hoops, but it will break out of WLM/BBM/WhatsApp, the SMS page if it was already open, Composing an email (it'll save the draft), and reading an email. This prolly isn't the most efficient way to do this, but ... my brain hurts so this is what you get :P

    As usual my macos come with no promises or responsibility on my part. USE AT YOUR OWN RISK I tried my best to make sure nothing bad could happen, but very few things in life are 100% and this is not one of them

    This was written on 9900/7.0.0.353 with ShortcutMe_Touch 5.8.2.0 (official)

    Launch Messages;
    While0 !IsAppForeground Messages;
    Do0;
    Delay1;
    EndWhile0;
    EscKey;
    If0 IsAppForeground Messages;
    Then0;
    EscKey;
    If1 IsAppForeground Messages;
    Then1;
    EscKey;
    Else1;
    Launch Messages;
    EndIf1;
    Else0;
    Launch Messages;
    EndIf0;
    Launch Messages;
    While1 !IsAppForeground Messages;
    Do1;
    Delay1;
    EndWhile1;
    EscKey;
    If2 IsAppForeground Messages;
    Then2;
    EscKey;
    Delay50;
    SpKeys;
    Else2;
    Launch Messages;
    Delay1;
    EndIf2;
    If3 IsAppForeground Messages;
    Then3;
    AltPlusKeys;
    Else3;
    Delay1;
    EndIf3;

    i tried it from angle i could think of and got no error messages, but if anyone spots a typo/error please let me know.
    Try this one and let me know if it works fine with the rest of the applications, wlm/bbm/whatsapp

    launch messages;delay50;
    esckey;
    while0 isappforeground messages;
    do0;
    spkeys;
    esckey;
    esckey;
    endwhile0;
    launch messages;delay50;
    altpluskeys;
    Last edited by gbsn; 09-25-11 at 03:00 AM.
    09-25-11 02:55 AM
  19. TomCanuck's Avatar
    Try this one and let me know if it works fine with the rest of the applications, wlm/bbm/whatsapp

    launch messages;delay50;
    esckey;
    while0 isappforeground messages;
    do0;
    spkeys;
    esckey;
    esckey;
    endwhile0;
    launch messages;delay50;
    altpluskeys;
    I tip my hat to you good sir. Works like a charm, and looks a heck of a lot nicer hah.

    Posted from my CrackBerry at wapforums.crackberry.com
    09-25-11 03:05 AM
  20. gbsn's Avatar
    Vijik, how are the macros parsed?
    Are all instructions read, then each line is assigned an address in memory, then its executed linearly?
    Or is it read and executed one by one real time?

    These are the only two quick ways i can think of implementing memory jumps.

    Either by doing it the way its done in MIPS, jumping from a memory address to another memory address by first setting points in memory, or by allowing us to create functions.

    MIPS: Macros would need to be read/evaluated first and assigned a point in memory, this includes evaluating any importmacro used and assigning it the consecutive address. Then macros are executed linearly, if no jump is assigned to return to the main line, it will continue with the following statements going downwards. But as far as im aware, there are no goto or jump statements in java, not in the way desired at least. So im 90% sure its not possible, vijik would have to create a proprietary code to somehow do this.

    Example of address execution in case of importmacro:
    1 menukey
    2 importmacro ab;
    5 navmovedown 3;
    6 navclick;

    importmacro evaluates to
    3 keye;
    4 navclick;

    Example of MIPS-like approach:

    set $var=0;
    while0 $var<5;
    do0;
    goto increaseVal;
    mempoint returnIncreaseVal; -> if not used and is called, SCM stops with "invalid jump"
    endwhile0;
    goto exit; -> if not used it continues to inc $val
    mempoint increaseVal;
    inc $val;
    goto returnIncreaseVal; -> if not used it will continue to "stop" from mempoint exit.
    mempoint exit;
    stop;

    increaseVal and exit can be switched places, so it would have a more natural flow and exit at once. For good syntax, exit should be used before any other memory points after the main procedure.

    Functions: using returns. Main is run first and alone, if any other function calls are requested, they return to main by default. Function mode must be enabled, it runs func main, runs until another func is encountered and stops, or if useful, a function break may be used.

    FunctionMode; -> needed for using functions.
    func main;
    set $var=0;
    while0 $var<5;
    do0;
    exec increaseVal;
    endwhile0;
    stop; or exec exit; or FuncBreak;
    func increaseVal;
    inc $val;
    return; -> so it goes back to the main line, not sure if necessary
    func exit;
    stop;
    return;


    Alternative way: using importmacro

    set $var=0;
    While0 $var<5;
    Do0;
    importmacro ^inc;
    EndWhile0;
    importmacro ^stp;

    Macro ^inc:
    if0 isdefined $var; -> suggested before, vijik approved, waiting for release
    then0;
    inc $var;
    endif0;

    Macro ^stp;
    stop;


    Alternative way with added functionality: creating a new list in SCM, called "function list". Similar to shortcuts, but with the difference that they can only be called using the importfunction macro into existing macros, they can't be executed from the shortcutme's main screen like shortcuts can and they can have any name with no shortcut keys, for example, "increasevalue".

    Possible memory solution so it doesn't use the blackberry store, using text files in the onboard memory or in the microsd (if necessary). When you select it on the list and press the menu key, you have the option to edit it. First entry is the name, and the second entry is the text file path in the microsd, with a button at the bottom "Open file", to open the text file directly.
    When imported into macros, SCM parses the text file, just like it does with the importmacro from other shortcuts, dont know how quick it would be to do this, obviously, it will be slower than when taking it directly from the blackberry app storage.

    set $var=0
    While0 $var<5;
    Do0;
    importfunction increasevalue $var; -> var is passed as argument, multiple as $x,$y,1,1
    EndWhile0;
    importfunction exit; or stop;

    increasevalue: -> from the function list.
    getarguments $x -> takes passed arguments, reads args from left to right, not sure if necessary?
    inc $x;

    For multiple arguments,
    getarguments $x,$a, $b
    if it only takes 3 and 4 are passed, SCM stops with a message "invalid arguments for function"
    If it takes 4 and 3 are passed, SCM stops with a message "invalid arguments for function"

    exit: -> from the function list
    stop;

    Or it can be like the above, but arguments are not implemented, it takes a fixed number of values and multiple functions have to be created for different number of variables, and isDefined should be used to check if the variable exists. This could also provide the ability to create macro templates and be called from the list without having to use a shortcut entry, otherwise a shortcut limit bump would be needed, even though its needed now anyways hahaha :b
    Last edited by gbsn; 09-25-11 at 04:46 AM.
    09-25-11 03:47 AM
  21. TomCanuck's Avatar
    First off, wow, just wow... So like a complete overhaul, no? Sounds like too much to me anyways, I get by perfectly fine without it... I'ma go back to simple suggestions like LEDON :P haha

    That and I'm curious what else Vijik has in store, rather then spend a bazillion years to add something that really isn't a big deal (to me anyways). I had no idea it'd be so intense haha.

    Posted from my CrackBerry at wapforums.crackberry.com
    Last edited by Juggalo20; 09-25-11 at 08:12 AM.
    09-25-11 07:44 AM
  22. B4me's Avatar
    Got a Ding Bug ... no not a ding bat ...

    BB=Bold 9700 OS=6.0
    SCM=5.5.6.0

    Following code produces "Uncaught exception ..... SCM(285) ... etc"

    SetVolume100;
    Set Vara=0;
    While0 Vara<10;
    Do0;
    Ding70;Delay100;
    Ding80;Delay100;
    Inc Vara;
    EndWhile0;

    Total Error Message "Uncaught exception: Application ShortcutMe(285) is not responding: process terminated"

    Anyone have any ideas? My bad? or Whatever?
    09-25-11 01:28 PM
  23. TomCanuck's Avatar
    Got a Ding Bug ... no not a ding bat ...

    BB=Bold 9700 OS=6.0
    SCM=5.5.6.0

    Following code produces "Uncaught exception ..... SCM(285) ... etc"

    SetVolume100;
    Set Vara=0;
    While0 Vara<10;
    Do0;
    Ding70;Delay100;
    Ding80;Delay100;
    Inc Vara;
    EndWhile0;

    Total Error Message "Uncaught exception: Application ShortcutMe(285) is not responding: process terminated"

    Anyone have any ideas? My bad? or Whatever?
    Bah, tried to post earlier, guess it timed out or some crap. Anyways, that worked fine on 9900/7.0.0.353 with ShortcutMe_Touch 5.8.3.0, sorry I don't have an OS 6 device anymore to test on. What exact OS version are you running? 6.0.x.x?

    Posted from my CrackBerry at wapforums.crackberry.com
    09-25-11 02:47 PM
  24. B4me's Avatar
    Juggalo20:

    Thanks for fast reply.

    Carrier=AT&T
    OS=6.0.0.526

    Any thoughts, Vijik?
    09-25-11 03:27 PM
  25. TomCanuck's Avatar
    Juggalo20:

    Thanks for fast reply.

    Carrier=AT&T
    OS=6.0.0.526

    Any thoughts, Vijik?
    Try putting $ infront of all your variables like $variable

    Posted from my CrackBerry at wapforums.crackberry.com
    09-25-11 03:39 PM
1,385 ... 2728293031 ...
LINK TO POST COPIED TO CLIPBOARD