- I'm working on writing my macros
I want to make one to work with NFC launcher. It will open manage connections, check wifi (if on, turn off), check bluetooth (if off turn on), open profiles and change to "normal"
But i've only got the wifi checking down pat
i have:
(in shortcutme)
Display Name: IFWifiOn->Off (want to eventually make "getting in car")
App. Name: Manage Connections
Shortcut Keys: WIF (idk what to do with these, i just made something up)
The Macro is:
Delay500;
IsWifiOn;
if3 TRUE;
NavMoveDown1;
NavClick
*after this i dont know how to do a "if false statement" (if3 FALSE) w/ bluetooth didn't work
EDIT: making progress!!
Macro:
(now no app, just macro)
launchManage Connections;
Delay500;
MenuItemFromTop1;
IsWifiOn;
if3 TRUE;
NavMoveDown1;
NavClick;
MenuItemFromTop1;
Endif;
IsBtOn;
If3 FALSE;
NavMoveDown2;
NavClick
**still editing, but works so far!**Last edited by dsquared2; 10-13-11 at 07:44 PM.
10-13-11 07:28 PMLike 0 - I'm working on writing my macros
I want to make one to work with NFC launcher. It will open manage connections, check wifi (if on, turn off), check bluetooth (if off turn on), open profiles and change to "normal"
But i've only got the wifi checking down pat
i have:
(in shortcutme)
Display Name: IFWifiOn->Off (want to eventually make "getting in car")
App. Name: Manage Connections
Shortcut Keys: WIF (idk what to do with these, i just made something up)
The Macro is:
Delay500;
IsWifiOn;
if3 TRUE;
NavMoveDown1;
NavClick
*after this i dont know how to do a "if false statement" (if3 FALSE) w/ bluetooth didn't work
the "Then" and "Else" are your true and false.
If0 IsWiFiOn: this is the test
Then0; this is for if the test returns TRUE
ElseIf0 this is for running a second (or multiple) tests if the first test returned FALSE
Else0 this is for if all tests return false
so really what you could do is
If0 IsWiFiOn; /*start of a If-Then-Elseif-Else */
Then0; /*this is triggered if wifi is on*/
Show WiFi is on;
Else0; /*this is triggered if wifi is off */
Show Wifi is off;
EndIf0; /*to properly end the If-Then-Elseif-Else*/10-13-11 07:46 PMLike 0 - aight, i kinda suck at explaining but lemmie give it a shot. You dont need the TRUE or FALSE stuff in your macros,
the "Then" and "Else" are your true and false.
If0 IsWiFiOn: this is the test
Then0; this is for if the test returns TRUE
ElseIf0 this is for running a second (or multiple) tests if the first test returned FALSE
Else0 this is for if all tests return false
so really what you could do is
If0 IsWiFiOn; /*start of a If-Then-Elseif-Else */
Then0; /*this is triggered if wifi is on*/
Show WiFi is on;
Else0; /*this is triggered if wifi is off */
Show Wifi is off;
EndIf0; /*to properly end the If-Then-Elseif-Else*/
now working on changing profile10-13-11 07:47 PMLike 0 - well whatever floats your boat :P but you're also missing/duplicating numbers here and there in your If and Else and EndIf :s not sure how that'll work out in the long run or other macros. Best of luck.10-13-11 07:53 PMLike 0
-
- Blah forgot to mention, when it comes to IsBtOn, if bluetooth is currently off when this macro is run, you will get a prompt saying ShortcutMe requires bluetooth to be on. This is a BlackBerry OS API issue, Vijik said the documentation said it should only do a check, but the OS disagrees and will prompt you :\ if bluetooth is indeed already on it won't prompt you or anything
Posted from my CrackBerry at wapforums.crackberry.com10-13-11 08:12 PMLike 0 - Blah forgot to mention, when it comes to IsBtOn, if bluetooth is currently off when this macro is run, you will get a prompt saying ShortcutMe requires bluetooth to be on. This is a BlackBerry OS API issue, Vijik said the documentation said it should only do a check, but the OS disagrees and will prompt you :\ if bluetooth is indeed already on it won't prompt you or anything
Posted from my CrackBerry at wapforums.crackberry.com
If i set up a NFC tag to control my BlackBerry Bridge set ups from now on, i can do this:
(opens connections, checks wifi if on->off, off->top of menu, top of menu, down 2, click, esc)
launchManage Connections;
Delay500;
MenuItemFromTop1;
If3 IsWifiOn;
Then3;
NavMoveDown1;
NavClick;
MenuItemFromTop1;
Else3;
MenuItemFromTop1;
EndIf3;
NavMoveDown2;
NavClick;
ESCKey;10-13-11 08:29 PMLike 0 - I saw that, BUT i have a work around
If i set up a NFC tag to control my BlackBerry Bridge set ups from now on, i can do this:
(opens connections, checks wifi if on->off, off->top of menu, top of menu, down 2, click, esc)
launchManage Connections;
Delay500;
MenuItemFromTop1;
If3 IsWifiOn;
Then3;
NavMoveDown1;
NavClick;
MenuItemFromTop1;
Else3;
MenuItemFromTop1;
EndIf3;
NavMoveDown2;
NavClick;
ESCKey;
and set Bluetooth_Toggle as your app name
give this a try, and lemmie know what you think. To get Bluetooth_Toggle, click the ShortcutMe Functions button on the setup page and choose Bluetooth_Toggle
App Name: Bluetooth_Toggle
Macros:
If0 IsWifiOn;
Then0;
Launch WiFi_Off;
Else0;
Delay1;
EndIf0;
i think that's what you're trying to do correct? turn off wifi if it is on, if it's off, leave it off, and toggle bluetooth on or off.10-13-11 08:46 PMLike 0 - @dsquared2,
Remember that you can also use these ShortcutMe functions in your macro:
Launch Wifi_On; (turns Wifi On without going to Manage Connections)
Launch Wifi_Off;
Launch Radio_On;
Launch Radio_Off;
and also remember that when you edit/add things in a long macro, you can use the followings to temporary change things:
Stop; (A macro that stops macro engine to run anything after it)
/* */ (anything between /* and */ will be ignored)Last edited by Vijik; 10-13-11 at 09:41 PM.
10-13-11 08:56 PMLike 0 - you can also control WiFi and Radio without actually opening the Manage Connections,
and set Bluetooth_Toggle as your app name
give this a try, and lemmie know what you think. To get Bluetooth_Toggle, click the ShortcutMe Functions button on the setup page and choose Bluetooth_Toggle
App Name: Bluetooth_Toggle
Macros:
If0 IsWifiOn;
Then0;
Launch WiFi_Off;
Else0;
Delay1;
EndIf0;
i think that's what you're trying to do correct? turn off wifi if it is on, if it's off, leave it off, and toggle bluetooth on or off.@dsquared2,
Remember that you can also use these ShortcutMe functions in your macro:
Launch Wifi_On; (turns Wifi On without going to Manage Connections)
Launch Wifi_Off;
Launch Radio_On;
Launch Radio_Off;
and also remember that when you edit/add things to a long macro, you can use the followings to temporary change things:
Stop; (A macro that stops macro engine to run anything after it)
/* */ (anything between /* and */ will be ignored)
Hmmm but how do i put this all into one NFC Launcher tag set up? I have it all in one macro right now
This is for getting in my car, it:
Checks Wifi (on->off, off->top)
Down 2, click
Escape
Launch profiles
type "n"
click
launchManage Connections;
Delay500;
MenuItemFromTop1;
If3 IsWifiOn;
Then3;
NavMoveDown1;
NavClick;
MenuItemFromTop1;
Else3;
MenuItemFromTop1;
EndIf3;
Delay5;
NavMoveDown2;
NavClick;
ESCKey;
Delay100;
launchProfile_Selector;
Delay100;
Keyn;
Delay500;
NavClick;
and it works but interested in the bluetooth thing10-13-11 09:06 PMLike 0 - Vijik, how hard would it be to implement inline comments?.
Right now we have,
comment block "/**/",
break macro "stop",
possible inline comment "//" ?
Useful for single line changes without having to go to the start and end of the line with /* and */.
Could simplify quick changes, and every language has // :b
The // would stop at the delimiter of a line " ; "
Posted from my CrackBerry at wapforums.crackberry.com10-13-11 10:26 PMLike 0 - Another update of the WiFi macro I posted earlier. This time a complete rewrite. The only change in behavior in this version, is instead of a pure delay of 1 minute after wifi is turned on to check if it established a connection, now a while loop is used to kill the wait time, if no connection is established after approx 1 minute wifi is turned off and the macro exits.
This is still designed with the use of Recurring Auto Launch in mind. Please change Time1 with the the earlist time you want this to run, and change Time2 with the latest time you want it to run, the times should be in 24 hour format without the : as in 0800 for 8:00AM and 2330 for 11:30PM. As with everything I post use at your own risk. I see no potential problems, and it's worked fine in testing, but still at your own risk . This was written using ShortcutMe_Touch 5.9.1.3_OS7_T (beta) on 9900/7.0.0.440.
Set $ct=GetTime;
If0 $ct>Time1 && $ct<Time2;
Then0;
If1 IsWifiOn && HasWifiConnection;
Then1;
Stop;
ElseIf1 IsWifiOn && !HasWifiConnection;
Launch Wifi_Off;
Stop;
Else1;
Launch Wifi_On;
Set $wtime=0;
While0 !HasWifiConnection && $wtime<60;
Do0;
Delay1000;
Inc $wtime;
EndWhile0;
If2 IsWifiOn && !HasWifiConnection;
Then2;
Launch Wifi_Off;
Else2;
Delay1;
EndIf2;
EndIf1;
Else0;
Stop;
EndIf0;
While I tested it the best I could, it's still less than an hour old, so if anyone runs into a problem please let me know.
Posted from my CrackBerry at wapforums.crackberry.com
Update #1
Fixed a typo in the while loop that caused it to stop after approx 25 seconds.Last edited by Juggalo20; 10-14-11 at 12:17 AM. Reason: added a bit of info about how Time1 and Time2 should be put in, and made it clearer what version of SCM this was created with
10-13-11 11:44 PMLike 0 - Hmmm but how do i put this all into one NFC Launcher tag set up? I have it all in one macro right now
This is for getting in my car, it:
Checks Wifi (on->off, off->top)
Down 2, click
Escape
Launch profiles
type "n"
click
launchManage Connections;
Delay500;
MenuItemFromTop1;
If3 IsWifiOn;
Then3;
NavMoveDown1;
NavClick;
MenuItemFromTop1;
Else3;
MenuItemFromTop1;
EndIf3;
Delay5;
NavMoveDown2;
NavClick;
ESCKey;
Delay100;
launchProfile_Selector;
Delay100;
Keyn;
Delay500;
NavClick;
and it works but interested in the bluetooth thing
Posted from my CrackBerry at wapforums.crackberry.com
If you want to break it up a bit:
/* a macro to toggle bluetooth that can be imported into other macros */
App Name: Macro
Shortcut Keys: BTT
Macros:
Launch Manage Connections;
While0 !IsAppForeground Manage Connections;
Do0;
Delay1;
EndWhile0;
NavMoveDown2;
NavClick;
EscKey;
/* macro to change ringer profile to the first one listed that starts with an "n". This can be imported into other macros.*/
App Name: Macro
Shortcut Keys:CPN
Macros:
Launch Profile Selector;
Delay100;
MenuItemFromTop0;
*Keyn;
NavClick;
/*macro that will check if wifi is on, if wifi is on then turn it off. Import the Bluetooth toggle and the ringer profile change*/
App Name: Macro
Macros:
If0 IsWifiOn;
Then0;
Launch WiFi_Off;
Else0;
Delay1;
EndIf0;
ImportMacroBTT;
Delay100;
ImportMacroCPN;
I didn't test this, but it's something to think about anyways.Last edited by Juggalo20; 10-14-11 at 04:40 AM.
10-14-11 04:30 AMLike 0 -
Do you know why you don't have 3G option on your phone?10-14-11 11:42 AMLike 0 - Vijik, how hard would it be to implement inline comments?.
Right now we have,
comment block "/**/",
break macro "stop",
possible inline comment "//" ?
Useful for single line changes without having to go to the start and end of the line with /* and */.
Could simplify quick changes, and every language has // :b
The // would stop at the delimiter of a line " ; "
Posted from my CrackBerry at wapforums.crackberry.com10-14-11 11:45 AMLike 0 - can somebody tell me how to actovate 3Gh+ in 9810 using Shortcut me...please email me the guide to "[email protected]"..Thank You So much...
We don't get what you're talking about. Do you want to have it at 2G default and have a shortcut set up to switch to 3G?
You may not be in a 3G area if you are just having trouble getting a 3G (+ happens by itself) area.
Posted from my CrackBerry at wapforums.crackberry.com10-14-11 12:51 PMLike 0 - It would include the ; I thought that was the line shift :b
//Abc;ddd; comments out abc;
Posted from my CrackBerry at wapforums.crackberry.comLast edited by gbsn; 10-14-11 at 03:06 PM.
10-14-11 01:15 PMLike 0 -
//Ding100;Led On;
would comment out both Ding100; and Led On;
though it really doesn't really effect me either way, I've gotten into the habit of one command per line anyways :/10-14-11 03:43 PMLike 0 -
Another cosmetic suggestion, making macros start in the line below of Macros: and not next to it. Because, enter does not create a line break if its the first line.
As in,
Macros:
dwasdwasd;
wasd;
instead of,
Macros: dwasdwasd;
wasd;
As a final request, for the day obviously hahaha, is there any ETA on the 230 shortcut limit bump? (you know i wont stop lol)Last edited by gbsn; 10-14-11 at 11:28 PM.
10-14-11 11:19 PMLike 0 - Yeeh, it looks better at the actual line breaks �, makes more sense.
Another cosmetic suggestion, making macros start in the line below of Macros: and not next to it. Because, enter does not create a line break if its the first line.
As in,
Macros:
dwasdwasd;
wasd;
instead of,
Macros: dwasdwasd;
wasd;
As a final request, for the day obviously hahaha, is there any ETA on the 230 shortcut limit bump? (you know i wont stop lol)10-14-11 11:44 PMLike 0 - If you want to use FlashLight_Flash feature of ShortcutMe but you don't want to set the Video Light to ON all the time, you can use this macro shortcut:
AppName: FlashLight_Flash
Macro: Delay200;SPACEKey;
(SPACEKey macro is available in SCM 5.1 and later. If you have SCM 5.0, upgrade from ShortcutMe itself: SCM>BB/Menu key>Updates)10-15-11 08:53 PMLike 0 -
Posted from my CrackBerry at wapforums.crackberry.com10-15-11 09:01 PMLike 0 - Oh man, I never bothered to try it without the macros... thanks for the quick response! I do notice one thing when using this shortcut that is somewhat annoying. Right after launching this shortcut and then pressing ESC to quit the flashlight, if you launch SCM again it opens up for a second and then exits. Does this happen for you too?10-15-11 09:08 PMLike 0
- Oh man, I never bothered to try it without the macros... thanks for the quick response! I do notice one thing when using this shortcut that is somewhat annoying. Right after launching this shortcut and then pressing ESC to quit the flashlight, if you launch SCM again it opens up for a second and then exits. Does this happen for you too?
Posted from my CrackBerry at wapforums.crackberry.com10-15-11 09:14 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