1. TomCanuck's Avatar
    I'm new with the shortcutme macros. This is actually my first one. Appreciate any assistance anyone can provide. I'm trying to create a macro that closes an app called Bugme that starts in the background. I read post #336 in this thread and came up with this:

    If0;
    IsAppRunning bugme;
    Then0;
    Launch bugme;
    MENUkey;
    Delay100;
    MenuItemFromBottom3;
    Delay100;
    NavClick;
    Delay100;
    NavMoveDown1;
    NavClick;
    EndIf0;

    I think I have a syntax problem as I get an error: Error reading integer number (If).

    Here's the sequence - check and see if the app is running, if yes, launch app. Then Click menu, goto option that is 3rd from the bottom (Exit) and click. The app has a secondary menu that pops up with 3 options. I select the middle option and click.

    Can someone please help me out with this? Any tips and hints for a newbie would also be appreciated.
    Syntax error is in line 1 and 2. You have


    If0;
    IsAppRunning bugme;

    While it should be

    If0 IsAppRunning bugme;

    Also, while none of this will throw errors (usually) I suggest trying

    LaunchAndWait BugMe
    Instead of just
    Launch BugMe

    Lastely, it's good form to add en "else" to your If statements.

    If0 test;
    Then0;
    What to do if test returns TRUE;
    Else0;
    What to do if test returns FALSE;
    EndIf0;

    So here's your macro as I'd suggest, my changes are in red. Note that I haven't/wont try it because it's not a free app so I have zero idea if this will do what you're hoping. But I'll do what I can to help if you run into more troubles/have more questions.

    If0 IsAppRunning bugme;
    Then0;
    LaunchAndWait bugme;
    MENUkey;
    Delay100;
    MenuItemFromBottom3;
    Delay100;
    NavClick;
    Delay100;
    NavMoveDown1;
    NavClick;
    Else0;
    Stop;

    EndIf0;
    Vijik and chautime like this.
    02-26-12 04:18 PM
  2. Vijik's Avatar
    The reason for the down grade was, when I checked for updates SCM's web site stated that the version from Appworld was wrong and that I needed 5.8.1.5_T

    The screen shots I am reffering to are the ones on SCM's website, also shown on appworld. I have nothing like them.
    It has been many upgrades and I haven't got time to upgrade all the screenshots, webpages, etc.

    But whatever you get from the store you buy it from is the latest official version. No need to downgrade.
    02-26-12 05:02 PM
  3. Kaenon's Avatar
    Trying to toggle the GPS.
    I know there is a Toggle_GPS app_name already defined, but for some reason when it runs in a cascaded launcher, the Toggle_GPS doesn't work.

    Therefore I am making my own toggle, but problem is I can only select GPS "Location ON" and cannot get it back to "E911 Only" with the following code.

    Macros:
    LaunchAndWait Options;
    NavMoveDown4;
    NavClick;
    Delay200;
    NavMoveDown6;
    NavClick;
    Delay200;
    NavMoveDown1;
    NavClick;
    Delay200;
    NavMoveUp1; (this is where it would only select ON)
    NavClick;
    Delay200;
    ESCKey;
    NavClick;
    ESCKey;
    ESCKey;

    How do I fix this so I can Toggle and not only select ON?
    02-26-12 11:31 PM
  4. chautime's Avatar
    Syntax error is in line 1 and 2. You have


    If0;
    IsAppRunning bugme;

    While it should be

    If0 IsAppRunning bugme;

    Also, while none of this will throw errors (usually) I suggest trying

    LaunchAndWait BugMe
    Instead of just
    Launch BugMe

    Lastely, it's good form to add en "else" to your If statements.

    If0 test;
    Then0;
    What to do if test returns TRUE;
    Else0;
    What to do if test returns FALSE;
    EndIf0;

    So here's your macro as I'd suggest, my changes are in red. Note that I haven't/wont try it because it's not a free app so I have zero idea if this will do what you're hoping. But I'll do what I can to help if you run into more troubles/have more questions.

    If0 IsAppRunning bugme;
    Then0;
    LaunchAndWait bugme;
    MENUkey;
    Delay100;
    MenuItemFromBottom3;
    Delay100;
    NavClick;
    Delay100;
    NavMoveDown1;
    NavClick;
    Else0;
    Stop;

    EndIf0;
    Awesome, thanks for the correction and the tips. This worked perfectly! Thanks...and OMG this is COOL!
    02-27-12 12:04 AM
  5. Chopper110's Avatar
    It has been many upgrades and I haven't got time to upgrade all the screenshots, webpages, etc.

    But whatever you get from the store you buy it from is the latest official version. No need to downgrade.
    I couldnt agree more, but I done as SMC's web site directed me to do as I was having problems with the purchased version. There is quite probabley nothing wrong with the app, its more than likely me.
    02-27-12 12:36 PM
  6. TomCanuck's Avatar
    here Chopper110, dunno if you caught this in the other thread so...
    http://forums.crackberry.com/blackbe...ml#post7184222
    02-28-12 10:51 AM
  7. beny1014's Avatar
    I am searching for a macro that will look at what sound profile is currently selected and then change it to a different one. Depending on what profile is selected affects what new profile it will change to. AKA When it is in anything but my "LED mode" I want it to change to LED and if it is anything but "normal" mode I want it to change to that. During most cases it will just be switching from normal to LED or vise versa if that helps
    02-28-12 05:42 PM
  8. TomCanuck's Avatar
    I am searching for a macro that will look at what sound profile is currently selected and then change it to a different one. Depending on what profile is selected affects what new profile it will change to. AKA When it is in anything but my "LED mode" I want it to change to LED and if it is anything but "normal" mode I want it to change to that. During most cases it will just be switching from normal to LED or vise versa if that helps
    This is do-able, but it requires a few concessions. Basically, there's no way for SCM to know exactly what profile you're using... It uses ringer volume to tell, or vibrate only. So basically any Profile with 0 for ring tone volume becomes the same, and Vibrate only is it's own.

    So Silent i think comes up the same as all alerts off. If you can give me the ringer profile volumes of all your profiles i can write you the desired macro. I already use one that does (pretty much) what you want it think. so break it down for me something like this please

    normal 7
    loud 10
    medium 5

    then give me exactly how you want it to switch

    normal -> silent
    loud -> vibrate
    medium -> silent
    vibrate -> loud

    If you have normal and medium both set to 5 but want them each to switch to something different you'll have to say change one of them to 6 in order for it to work.

    I'll try to get it done tonight.
    beny1014 likes this.
    02-28-12 05:49 PM
  9. beny1014's Avatar
    I have
    Loud -> 10
    Normal -> 7
    Medium -> 5
    Bedside -> 9
    Vibrate only -> Silent
    Phone calls only -> 6
    Movies -> Silent
    LED only -> Silent

    The main feature I am looking for is to toggle from "LED Only" to "normal" and vise versa. I plan to reference this macro and put it onto a NFC tag so I can do it as I walk out of my house on my way to class and then change it back when I get home. Can this be done?
    02-28-12 05:55 PM
  10. TomCanuck's Avatar
    I have
    Loud -> 10
    Normal -> 7
    Medium -> 5
    Bedside -> 9
    Vibrate only -> Silent
    Phone calls only -> 6
    Movies -> Silent
    LED only -> Silent

    The main feature I am looking for is to toggle from "LED Only" to "normal" and vise versa. I plan to reference this macro and put it onto a NFC tag so I can do it as I walk out of my house on my way to class and then change it back when I get home. Can this be done?
    Should be doable yes. I have the basic framework for this already. A wrote a similar macro as soon as ringer profile detection was added to SCM. If all goes well I'll have this up for you tonight.
    beny1014 likes this.
    02-28-12 05:58 PM
  11. beny1014's Avatar
    Awesome! Hopefully from some of the code from these macros I can learn to write my own. I am not terrible with macros but I dont know all the commands that are applicable for this app.
    02-28-12 06:53 PM
  12. TomCanuck's Avatar
    Awesome! Hopefully from some of the code from these macros I can learn to write my own. I am not terrible with macros but I dont know all the commands that are applicable for this app.
    Here's what I believe to be an up to date list. But, unofficially I'm asking you not to post in the thread, because personally I like just being able to page through it and any other posts will become irreverent within a couple days anyways. If you have any questions just pop back in here and I or someone else will try to help.

    http://forums.crackberry.com/blackbe...tcutme-637024/
    02-28-12 06:56 PM
  13. TomCanuck's Avatar
    I have
    Loud -> 10
    Normal -> 7
    Medium -> 5
    Bedside -> 9
    Vibrate only -> Silent
    Phone calls only -> 6
    Movies -> Silent
    LED only -> Silent

    The main feature I am looking for is to toggle from "LED Only" to "normal" and vise versa. I plan to reference this macro and put it onto a NFC tag so I can do it as I walk out of my house on my way to class and then change it back when I get home. Can this be done?
    Couldn't do it. Lacking info. Ringer volume for "Movies" and "phone calls only". Lacking what you want Bedside, normal and medium to switch to that is if you want them to switch to anything. Sorry I didn't catch this earlier, had some other stuff going on and just assumed all the info was there..
    02-28-12 11:11 PM
  14. beny1014's Avatar
    I primarily want it to switch from:
    normal -> LED
    and then
    LED -> normal
    in the same shortcut

    Ideally if there was a way to make it switch from any mode to normal and then the next time I call the shortcut it switches to LED that would be even better.
    02-28-12 11:25 PM
  15. TomCanuck's Avatar
    I primarily want it to switch from:
    normal -> LED
    and then
    LED -> normal
    in the same shortcut

    Ideally if there was a way to make it switch from any mode to normal and then the next time I call the shortcut it switches to LED that would be even better.
    Ok. So what this does, is gets the ringer volume currently in use, and checks it against "normal" which for you is 7, which translates to 70 in SCM. If the current volume is not 70, the macro will change the ringer profile to Normal. If the current ringer profile matches 70 (Normal) it will switch to Silent (LED only). The only three things that can mess up the macro are:
    1. You have more than one ringer profile set to 7 (can't be fixed by macro-ing)
    2. You have custom profiles that start with "S" or "N" (easily fixed, will require tweaking if you ever add/delete profiles)
    3. Your phone is a touch too slow launching Profile manager (easily fixed with macro)
    There was originally 4 I think, but I can't remember it now.

    This was written/tested using 5.9.5.1_OS7_T on 9900/7.1.0.267. Let me know how it goes.

    Set $pro=GetProfileVolume;
    If0 $pro!=70;
    Then0;
    Launch Profiles;
    Delay200;
    *Keyn;
    NavClick;
    Else0;
    Launch Profiles;
    Delay200;
    *Keys;
    NavClick;
    EndIf0;
    PJD642 likes this.
    02-28-12 11:51 PM
  16. beny1014's Avatar
    Ok. So what this does, is gets the ringer volume currently in use, and checks it against "normal" which for you is 7, which translates to 70 in SCM. If the current volume is not 70, the macro will change the ringer profile to Normal. If the current ringer profile matches 70 (Normal) it will switch to Silent (LED only). The only three things that can mess up the macro are:
    1. You have more than one ringer profile set to 7 (can't be fixed by macro-ing)
    2. You have custom profiles that start with "S" or "N" (easily fixed, will require tweaking if you ever add/delete profiles)
    3. Your phone is a touch too slow launching Profile manager (easily fixed with macro)
    There was originally 4 I think, but I can't remember it now.

    This was written/tested using 5.9.5.1_OS7_T on 9900/7.1.0.267. Let me know how it goes.

    Set $pro=GetProfileVolume;
    If0 $pro!=70;
    Then0;
    Launch Profiles;
    Delay200;
    *Keyn;
    NavClick;
    Else0;
    Launch Profiles;
    Delay200;
    *Keys;
    NavClick;
    EndIf0;
    Final Macro reads:

    Set $pro=GetProfileVolume;
    If0 $pro!=70;
    Then0;
    Launch Profiles;
    Delay200;
    *Keyle;
    NavClick;
    Else0;
    Launch Profiles;
    Delay200;
    *Keys;
    NavClick;
    EndIf0;

    Highlighted texted shows what I needed to change, since my "LED Only" mode is what I just listed in quotations I needed to change what text was being typed. Also note that it is "le" and not just "l" due to the loud mode. It seems to work flawlessly now though.

    Couple of questions so I can learn from this coding.
    1.does the "!=" in the if statement mean /= (does not equal)?
    2.Why is there "*" in front of the Key macros?
    3.Is the "$" in front of the "$pro" variable important?
    4.Since SCM registers the volumes on 100 scale instead of BB 10, is there a way to access the single digit values aka, using say 11 or 01 or 02 instead of just 0 or 1?
    --> I want to try and modify this macro so that if does the same thing but in the reverse. If the profile is not in "LED Only" it changes it to "LED Only". Then when it is in "LED Only" it changes it to normal. The problem that arises is that I have multiple profiles with "0" sound level and this can not be adjusted. Do you think this is possible?

    Thanks a ton for the first shortcut macro sequence. Should be able to learn a lot from it and ill probably use it daily.
    02-29-12 12:12 AM
  17. TomCanuck's Avatar
    Ah ok. Sorry. Silent is LED notification only by default so I thought that's what you meant. Anyways..

    1.does the "!=" in the if statement mean /= (does not equal)? correct, it means "does not equal" also available are ">" for greater than, "<" for less than and "==" for equal
    2.Why is there "*" in front of the Key macros? there's two kinds of Key inputs. "*Key" and "Key". Generally speaking for menus *Key is needed, while if you're using it to actually type, say in an email or something then generally "Key" is what you need. If one doesn't work, try the other. This also goes for *SpaceKey *DelKey etc.
    3.Is the "$" in front of the "$pro" variable important? I'm not 100% sure, but I would guess "yes" either way, it's good form especially if you ever have to post a macro here if you have a qustion. It would likely be one of the first recommendations to attempt a fix
    4.Since SCM registers the volumes on 100 scale instead of BB 10, is there a way to access the single digit values aka, using say 11 or 01 or 02 instead of just 0 or 1? I don't quite follow you.
    --> I want to try and modify this macro so that if does the same thing but in the reverse. If the profile is not in "LED Only" it changes it to "LED Only". Then when it is in "LED Only" it changes it to normal. The problem that arises is that I have multiple profiles with "0" sound level and this can not be adjusted. Do you think this is possible? Nope, Vijik's looked into it and there's no way to detect 100% what profile is active apart from Vibrate Only. The best he could do was the ringer profile volume.
    02-29-12 12:28 AM
  18. beny1014's Avatar
    Ah ok. Sorry. Silent is LED notification only by default so I thought that's what you meant. Anyways..

    1.does the "!=" in the if statement mean /= (does not equal)? correct, it means "does not equal" also available are ">" for greater than, "<" for less than and "==" for equal
    2.Why is there "*" in front of the Key macros? there's two kinds of Key inputs. "*Key" and "Key". Generally speaking for menus *Key is needed, while if you're using it to actually type, say in an email or something then generally "Key" is what you need. If one doesn't work, try the other. This also goes for *SpaceKey *DelKey etc.
    3.Is the "$" in front of the "$pro" variable important? I'm not 100% sure, but I would guess "yes" either way, it's good form especially if you ever have to post a macro here if you have a qustion. It would likely be one of the first recommendations to attempt a fix
    4.Since SCM registers the volumes on 100 scale instead of BB 10, is there a way to access the single digit values aka, using say 11 or 01 or 02 instead of just 0 or 1? I don't quite follow you.
    --> I want to try and modify this macro so that if does the same thing but in the reverse. If the profile is not in "LED Only" it changes it to "LED Only". Then when it is in "LED Only" it changes it to normal. The problem that arises is that I have multiple profiles with "0" sound level and this can not be adjusted. Do you think this is possible? Nope, Vijik's looked into it and there's no way to detect 100% what profile is active apart from Vibrate Only. The best he could do was the ringer profile volume.
    Incredibly impressed with your guys level of knowledge and response time. Thank you once again, I really appreciate it.

    In regards to #4.
    The "Getprofilevolume" macro extracts the volume between 0 and 100. When the volume for phone is at 7 it extracts 70. Is there any way to distinguish two profiles that have a level 7 ringer, or in my case a level 0 ringer. Potentially is there a way so that when the macro reads the volume on a level 0 it assigns it a secondary number in the first digit slot. Aka, first profile reading 0=01 second profile reading would be 0=02 and then you could differentiate between similar profiles.

    In short, why does "Getprofilevolume" read on a scale of 0-100 when blackberry only displays the volume from 0-10
    02-29-12 12:36 AM
  19. TomCanuck's Avatar
    Incredibly impressed with your guys level of knowledge and response time. Thank you once again, I really appreciate it.

    In regards to #4.
    The "Getprofilevolume" macro extracts the volume between 0 and 100. When the volume for phone is at 7 it extracts 70. Is there any way to distinguish two profiles that have a level 7 ringer, or in my case a level 0 ringer. Potentially is there a way so that when the macro reads the volume on a level 0 it assigns it a secondary number in the first digit slot. Aka, first profile reading 0=01 second profile reading would be 0=02 and then you could differentiate between similar profiles.

    In short, why does "Getprofilevolume" read on a scale of 0-100 when blackberry only displays the volume from 0-10
    First off, I just want to say I'm no developer heh. Everything I know about the BlackBerry API's I've learned from developers when I pester them about adding features (99% of it from Vijik)

    But sadly no, 3rd party apps have no idea how many ringer profiles the user has or what they are set to. It can only access info on the one that's in use. And that info is limited to ringer volume and if the profile is "Vibrate only".

    As for response time and knowledge. I'm a scripter at heart (mostly mIRC), and SCM is like a dream come true for me. I also understand how overwhelming it can be to start out, so I'm more than happy to help

    Oh. And as for why SCM detects double digits while the BBOS only displays single digits. I have no clue. My guess is the OS returns double digits in the API. I'm sure Vijik could omit the 0's but that's an extra command in the code. And in an app this intense I'm sure every command counts in terms of speed especially on older devices. (No clue, just guessing)
    Last edited by Juggalo20; 02-29-12 at 12:51 AM.
    02-29-12 12:47 AM
  20. beny1014's Avatar
    Alright well thanks a lot for the help. I have learned a lot tonight.
    02-29-12 01:00 AM
  21. TomCanuck's Avatar
    Alright well thanks a lot for the help. I have learned a lot tonight.
    You're welcome, anytime.
    02-29-12 01:03 AM
  22. paulsdv's Avatar
    Guys, what I really want is a app that starts when I put my phone in my charging pod and plays a slideshow of all the images I have stored in a specific folder.

    The App �Charged with pictures� by Jarrod is 100% perfect but does not let me change the duration of each image, that is the only thing that is missing.

    So was trying al alternative�

    I have created a shortcutme shortcut that launches a slideshow (basically it navigates to an image folder opens an image and starts a slideshow using the viewslideshow native BB option in the media player on the 9900). But alas, the max duration for this is also only 8 seconds and when the images finish they do not loop.

    So my questions to those way smarter than me

    1. can I trigger a shortcutme shortcut to start when I put my phone in the charger dock?
    2. any way I can modify the default slide duration to have it more than 8 secs?
    3. if no to 2 can i make a scm macro to perform what I want without using the native slide show app? Basically opening each image in a folder 1 at a time (preferably at random) and keeping them on for a set period of time with the BL on after which it loads another random image from the same folder?
    4. if I cant get it to trigger when charging, then if I can set a shortcut to start and stop will suffice�

    I have tried to be as clear as I can, but if i have missed anything please let me know?

    Thanks
    03-15-12 09:57 AM
  23. TomCanuck's Avatar
    Guys, what I really want is a app that starts when I put my phone in my charging pod and plays a slideshow of all the images I have stored in a specific folder.

    The App �Charged with pictures� by Jarrod is 100% perfect but does not let me change the duration of each image, that is the only thing that is missing.

    So was trying al alternative�

    I have created a shortcutme shortcut that launches a slideshow (basically it navigates to an image folder opens an image and starts a slideshow using the viewslideshow native BB option in the media player on the 9900). But alas, the max duration for this is also only 8 seconds and when the images finish they do not loop.

    So my questions to those way smarter than me

    1. can I trigger a shortcutme shortcut to start when I put my phone in the charger dock?
    2. any way I can modify the default slide duration to have it more than 8 secs?
    3. if no to 2 can i make a scm macro to perform what I want without using the native slide show app? Basically opening each image in a folder 1 at a time (preferably at random) and keeping them on for a set period of time with the BL on after which it loads another random image from the same folder?
    4. if I cant get it to trigger when charging, then if I can set a shortcut to start and stop will suffice�

    I have tried to be as clear as I can, but if i have missed anything please let me know?

    Thanks
    1. can I trigger a shortcutme shortcut to start when I put my phone in the charger dock? Not possible with SCM 5.x
    2. any way I can modify the default slide duration to have it more than 8 secs? Not that I know of
    3. if no to 2 can i make a scm macro to perform what I want without using the native slide show app? Basically opening each image in a folder 1 at a time (preferably at random) and keeping them on for a set period of time with the BL on after which it loads another random image from the same folder? Yes, but it would be limited as in ShortcutMe has no way of knowing how many pictures you have so the macro would have to work with only a defined number of pictures if you want it to work without error. Also there'd be no random function, you could macro them to display out of order (probably) but it wouldn't be random.
    4. if I cant get it to trigger when charging, then if I can set a shortcut to start and stop will suffice� do-able. You'd only need to start it manually, it could be made to auto stop once no longer charging

    While it is possible to do somewhat what you want, if the 8second limitation was enough to send you looking for another app, then i doubt you'd be happy with the results from doing this by a SCM macro.
    03-15-12 02:49 PM
  24. Vijik's Avatar
    Regarding random numbers see this (written by bo1d.wordpress.com):

    ShortcutMe is such a great app for BlackBerry, which enables you to create shortcut keys, menus and even cronjobs (scheduled launches) for various needs, from simple app shortcuts to complicated macros with operators, control statements and many more expressions.

    The following is a macro example which can be useful when you want your BlackBerry to randomly choose a playlist for you. (Tested on Bo1d 9900 installed with OS 7.1)

    Launch Media_Music;
    Delay 500;
    MenuItemFromBottom 2;
    NavClick;
    Set $Time=GetUpTime;
    Div $Time, 4; (4 is the number of playlists you have)
    Sum $$Rest, 2;
    MenuItemFromTop $$Result;

    NavClick;
    MenuItemFromTop 3; (use 1 for shuffle)
    NavClick;

    It is not really �random� in true meaning since the random number for a playlist is generated from the current time, but still it is random enough for this kind of use.
    03-15-12 06:40 PM
  25. Maiev's Avatar
    Wow ShortcutMe is definitely not for the lighthearted lol. I can see the power but its also quite complex.

    Could you get me started by helping me with 1 macro?

    Macro 1:
    [Description] I want it to on tapping NFC (which I got NFC Shortcut), I want it to run this ShortcutMe Macro

    1. Put phone to 2g
    2. Put phone to All Alerts Off

    So far I've tried.
    App: Profile
    MenuItemFromTop0 (meaning do not move after profile)
    ENTERKey;
    ESCKey;
    ESCKey;

    doesn't work lol............

    then I try doing mobile network individually.

    App: Manage Connection
    MenuItemFromTop7;
    Enterkey
    Enterkey
    MenuItemFromTop5;
    Enterkey
    MenuItemFromTop2;
    Enterkey
    Esckey
    Esckey
    Esckey

    It doesn't all work let alone bundling it together ;; lol

    I'd also like one to be...

    [Description] Bedside mode, so like Alerts All Off, MobileNetworkOff, WiFi On, Bluetooth Off (If on)

    Thanks man;; lol... I just can't visualize how this all work and also

    Does MenuItem also count stuff like "buttons", lets say i'm under managed connection, see the following below

    MobileNetwork
    Wifi
    Mobile Hotspot
    Bluetooth
    NFC
    [All Off]
    Alarm
    Network and Connections

    So say i wanna goto Network connections, is that MenuItemFromTop still 7?

    Thanks man :O!
    03-19-12 08:52 PM
1,385 ... 4243444546 ...
LINK TO POST COPIED TO CLIPBOARD