Applications - You can use the script to periodically check to see if your phone is currently connected to a GPRS (data)connection and disconnect that connection. You may want to do this if you want to save battery power - for example if you are not using the GPRS (data)connection at night when you got to bed and can't be asked to turn it off everytime then you can get the script to do it for you. Like wise you could create another script which switches your GPRS (data)connection on - For example in the morning before you wake up.
Variations on a theme - Replace #iffalse with #iftrue and #disconnect with #connect to get the device to connect to GPRS at the specified time in the Queue rather than disconnecting.
Conflicts - The script has been tested on a HERMES (T-Mob MDA Vario II) without any problems. IF you are using PUSH Messaging that constantly maintains a connection to your (data)connection for emails, then activesync will simply reconnect to your (data)connection after you have disconnected, so using the script would not have any benefit.
Final Note - This tutorial is for advice only, Skschema is a powerful program, remember to back-up important data and files on your device etc as you would before using any software.
How the script works...
The devices GPRS connection is checked to see if it is ON or OFF. If the devices connection is ON (TRUE) then the script follows the disconnect command and switches off the GPRS connection (this is the disconnect bit). But if the connection is OFF (FALSE) then the script jumps to the "end" label which is right at the end of the script and by-passes the disconnect commmand because it does not need to order a disconnection if there is no connection in the first place (this is the "check bit").
The Science Bit...
#r(#chkconnection) - This command simply checks the devices connection.
#p(Your GPRS Operator) - This command specifies which connection type to check for.
#r(#iffalse) - This command says if the connection is False (in other words if there is NO connection.
#p(end) - This is a label called "end".
#r(#disconnect) - This command simply disconnects the connection.
#r(#label) - This command identifies the row in the script with the label #p(end)
Creating the Script...
 GPRS Check & Disconnect
 Create a new Folder on the ROM of your device and label it "Automation". It's best to keep your skschema script files on your devices memory rather than a memory card.
 From programs, launch Skschema by clicking on the skschema icon.
 Click on [Tools - Right Softkey] and select "script", then [New - Left Softkey].
 Tap on "Command" and then tap on the icon in the far right top corner with 3 dots (...). From the context popup, select "Check" followed by "Connections".
 Under Command you should now see the syntax "#chkconnection" listed.
 Now tap on "Parameters" and again tap on the 3 dot icon, select "Connections" followed by your GPRS connection, in this example it was "T-Mobile Internet".
 Under parameters you should now see the syntax with the name of your GPRS operator.
 Click on [OK - Left Softkey]
 You should now see the script code which you entered listed at the top of the screen. Click on [New - Left Softkey].
 Doing the same as previous, Tap on Command, the 3 dot icon, select "Control" followed by "FALSE".
 Now Tap on Parameters and this time enter in the text box the word "end".
 Click on [OK - Left Softkey] then [New - Right Softkey]. Tap on Command, the 3 dot icon, select "Device" followed by "Disconnect".
 Click on [OK - Left Softkey] then [New - Right Softkey}. Tap on Command, the 3 dot icon, select "Control" followed by "LABEL".
 Tap Parameters and enter in the text box the word "end".
 Now you can test your script to see if it works, but first make sure you have a GPRS connection active. Tap and hold anywhere on the center of the screen, from the context menu select "Execute".
 As an illustration you will see the little G above the signal icon...
 ... Disconnect from GPRS when you run the script.
 From Skschema click on the [Tools - Right Softkey] and select the "Context Menu" option.
 Followed by "Save to File".
 Browse to your "Automation" folder and name the file "check_and_disconnect"
 You can skip the setting the icon for the shortcut [Skip - Right Softkey].
Automation of the Script...
 Click on [Tools - Right Softkey] and select "Queue".
 The Queue screen will appear.
 Click on [New - Left Softkey]. Tap on Command, the 3 dot icon, select "script".
 Tap on Parameters, the 3 dot icon, select "Script file".
 Browse to the Automation folder and select the script you previously saved "check_and_disconnect.sksc".
 Tap on Description and enter a description (so you know what the script does) "gprs checking and disconnecting".
 Tap on Run at time and use the 2 arrow buttons to select a start time that you wish to run the script eg. 09:30
 Tap on Repeat it after... and enter a value, which is in minutes for the repeating of the script. For example 240 is 240 minutes (4hrs).
 Tap Repeat it N... and enter a value for how many repeats you want. For example 2 will cause the script to run initially at 9:30 followed by running again (first repeat) at 13:30 and then again at 17:30 (second repeat).
 Tap on days(of week) and select the days you wish the script to run eg Monday,Tuesday,Wednesday.
 Tap on Wait X milliseconds... and enter "1 second". This feature may come in handy when your device wakes up.
 Click on [OK - Left Softkey].
 On the main Queue screen you should see the newly schedule item.
 You can tap on the item and test it by selecting "Execute".
 Click on [Tools - Left Softkey] and select "Exit" to exit Skschema. The Scheduled Script will be placed in the Devices Notification Queue.
Removing/Disabling the script...
 Simply start Skschema and Tap and hold on the scheduled item and select "Delete" or "DeActivate".
Copyright © 2004 -