- That sounds nice. How will that work with scheduled macros? Will the launch recur? Like after reset, if the while is not met, will it continue trying to launch the macro until the while is met or it will just fail to launch and stop?
Will these math/comparison operators be available for other macros?
Posted from my CrackBerry at wapforums.crackberry.com04-24-11 07:53 PMLike 0 - I am not sure if there is an API to get CPU load. I will look for that in the APIs.
In the mean time, I got the While-loop working. I also added support for Not ('!' In front of a ISxxxx macros), and added following maros:
- Vibrator xxx (BB vibes for xxx mSecs.)
- SetBrightness xxx (sets lcd brightness to xxx value)
- BackLightOff
- BackLightOn
- IdleSeconds. (Returns # of seconds the device is not used)
Still testing and fine tuning. I have plans to put it on the beta link within the next 10 hours.
Posted from my CrackBerry at wapforums.crackberry.com04-26-11 10:48 AMLike 0 - Vijik, i was wondering if you could check up on the restore function of SCM and what conflicts its having with "IF" statements, or if it has something to do with them being multilined. I backed up the config, upgraded the OS, restored the OS, then restored SCM config and now im missing quite an amount of shortcuts, and restored more than once and restarted the phone. Most had IF statements, but others were just plain options accessing, like the one i posted to uninstall a specific application. I basically went down from like 214 to 191.
In fact, i can see the missing shortcuts in the backup file, but they dont show or are not being restored into SCM.
Its nice to see more and more OS interactions ;DLast edited by gbsn; 04-27-11 at 06:27 PM.
04-27-11 05:33 PMLike 0 - I edited my last post :b i can see the missing shortcuts in the backup text file, but they are not being restored into SCM.04-27-11 06:28 PMLike 0
- .115 is now ready for download.
Before you download:
The syntax for IF-sentence is changed. You need to remove the ';' after IFx in your macros.
The new syntax for IF is:
If2 IsInHolster;Then2;....
(no ';' after IF)
Example for the new While-Loop feature is:
While3 IdleSeconds<10;Do3; Vibrate 300; delay5000; EndWhile3;/* your main macros*/
If this macro is called using Scheduled Launch, then it will not do anything before 10 seconds after you don't touch your BB. As you are using your BB, it will warn you by vibrating your BB.
(the number after While, Do, EndWhile can be a number between 0 and 9)
Operators supported for While and If are:
>, <, !=, ==
Adding a ! in front of a macro starting with IS will toggle the result that macro.
Make sure you don't end up in a infinite While loop!Last edited by Vijik; 04-27-11 at 07:35 PM.
04-27-11 06:41 PMLike 0 -
edit: Just sent you the email, they are not hidden, they are just not restoring into SCM, as i did a backup with the current ones and the ones that didnt get restored are not showing in the backup file. I made a backup of the old backup file though.Last edited by gbsn; 04-27-11 at 07:08 PM.
04-27-11 06:50 PMLike 0 - .115 is now ready for download.
Before you download:
The syntax for IF-sentence is changed. You need to remove the ';' after IFx in your macros.
The new syntax for IF is:
If2 IsInHolster;Then2;....
(no ';' after IF)
Example for the new While-Loop feature is:
While3 IdleSeconds<10;Do3; Vibrate 300; delay5000; EndWhile3;/* your main macros*/
If this macro is called using Scheduled Launch, then it will not do anything before 10 seconds after you don't touch your BB. As you are using your BB, it will warn you by vibrating your BB.
(the number after While, Do, EndWhile can be a number between 0 and 9)
Operators supported for While and If are:
>, <, !=, ==
Adding a ! in front of a macro starting with IS will toggle the result that macro.
Make sure you don't end up in a infinite While loop!
App. Name: (Blank) or Nothing
Macro:While0 IdleSeconds<10; Do0;Vibrate 50; Delay100; Vibrate50;EndDo0;
Delay5000;
Launch APPLICATION;
Delay1000;
Launch Home Screen;
In this case, I am trying to launch APPLICATION in the background only if there is no recent keyboard activity. The shortcut does not show up in the ShortcutMe shortcut list (apparently due to the empty App. Name) even though the shortcut can be invoked by typing the shortcut key. The primary issue is that I can no longer edit the shortcut.04-27-11 09:42 PMLike 0 - Visortgw, SCM is supposed to inform you about missing AppName and not allow you to leave the Shortcut Setting page without selecting an AppName.
I will fix this soon.
You can bring that shortcut to life by adding an AppName to that shortcut in the shortcutmeconfig.txt on the root directory of your micro SD card and then hit Restore menu item in SCM.
Posted from my CrackBerry at wapforums.crackberry.com04-28-11 01:34 PMLike 0 -
Posted from my CrackBerry at wapforums.crackberry.com04-28-11 01:36 PMLike 0 - Visortgw, SCM is supposed to inform you about missing AppName and not allow you to leave the Shortcut Setting page without selecting an AppName.
I will fix this soon.
You can bring that shortcut to life by adding an AppName to that shortcut in the shortcutmeconfig.txt on the root directory of your micro SD card and then hit Restore menu item in SCM.
Posted from my CrackBerry at wapforums.crackberry.com
- It validates on creation, but not NOT edit. Please don't "fix" the missing AppName validation too quickly. Given your new conditional macros (i.e., if, else, while, ...), it is often desirable NOT to launch an app until a certain condition is met. For example, if the device is not idle, wait until it is before launching a background app. Could you possibly allow "Nothing" (or the like) as a valid AppName, and just process the macro?
- It appears that the IsAppRunning macro is now backwards -- I now need to put the "!" operator in front of IsAppRunning instances that used to work.
Last edited by visortgw; 04-28-11 at 06:10 PM.
04-28-11 04:41 PMLike 0 -
Please let me us know once the IsAppRunning and IsAppForeground macros are fixed.
Thanks again!04-28-11 07:46 PMLike 0 - Thanks.
.116 is ready for download.
New in .116:
- IsAppRunning and IsAppForeground macros should now work (Please confirm)
- When creating/editing a shortcut, the AppName should be set to anything else than 'Nothing', otherwise a warning message will pop up.
- Shortcuts with AppName not set, should now show up in the main screen (please confirm)
(gbsn, can you see all of your 214 shortcuts now?)04-28-11 08:29 PMLike 0 - Thanks.
.116 is ready for download.
New in .116:
- IsAppRunning and IsAppForeground macros should now work (Please confirm)
- When creating/editing a shortcut, the AppName should be set to anything else than 'Nothing', otherwise a warning message will pop up.
- Shortcuts with AppName not set, should now show up in the main screen (please confirm)
(gbsn, can you see all of your 214 shortcuts now?)Last edited by visortgw; 04-28-11 at 09:52 PM.
04-28-11 09:41 PMLike 0 -
I will fix it.
Those macros, unlike in .115, work in .116 for apps without space in their name.
Posted from my CrackBerry at wapforums.crackberry.com04-28-11 09:56 PMLike 0 -
As for the shortcuts, they are not in the list because they didnt get restored, not because they are hidden or app name is set to nothing. I never set app name to nothing, i may have like 3 o 4 like that from uninstalled applications, but apart from these, they either have macro or the application in app name. Its actually something to do with the way it restores shortcuts with multi lined macros, as all macros i had multi lined are gone , I will just type them again using my old backup, but this time in one line.04-29-11 02:54 PMLike 0 -
So, it should be okay to have a macro like this:
While2 IsAppRunning Skype Mobile;Do2;.....;EndWhile2;....
gbsn, no need for "" even that it was a good idea.
I will (hopefully) fix the restore issue in the next rev.04-29-11 03:17 PMLike 0 - Using string notation? isapprunning "skype mobile" :b
As for the shortcuts, they are not in the list because they didnt get restored, not because they are hidden or app name is set to nothing. I never set app name to nothing, i may have like 3 o 4 like that from uninstalled applications, but apart from these, they either have macro or the application in app name. Its actually something to do with the way it restores shortcuts with multi lined macros, as all macros i had multi lined are gone , I will just type them again using my old backup, but this time in one line.
Do you see
<NewFormat>
on top of shortcutme's backup file on micro SD card?
The problem might be that the New Format Reading doesn't kick in when you are restoring your shortcuts.
If you can wait a day, I try to fix this issue so that you don't need to rewrite your macros.04-29-11 06:09 PMLike 0 - .117 has the fix for the problem reported regarding apps with space in their name.
So, it should be okay to have a macro like this:
While2 IsAppRunning Skype Mobile;Do2;.....;EndWhile2;....
gbsn, no need for "" even that it was a good idea.
I will (hopefully) fix the restore issue in the next rev.04-29-11 07:22 PMLike 0
- Forum
- BlackBerry OS Phone Forums
- BlackBerry OS Apps
Handy ShortcutMe 5.0 Macro Shortcuts
« What's Wrong With Intouch App? How Can I get it to Work Better?
|
Importing courses from a kml google maps file: is it possible? »
LINK TO POST COPIED TO CLIPBOARD