[TASKER] [PROFILES] [HELP] for S6 Edge Plus enthusiasts - Galaxy S6 Edge+ General

As a huge fan of Tasker and a huge fan of this s6e+, this thread is dedicated to the pursuit of awesomeness! Feel free to SHARE your creations, to ASK for help, and to ASSIST others! The learning curve is steep in the beginning, which can be intimidating for new users, but after the concept is understood, the possibilities are limitless!
I would describe myself as an experienced novice level user. I'll try to help answer questions whenever possible, but there are often multiple ways to skin the cat when using Tasker. Alternative solutions are encouraged! I'll keep the OP up to date with helpful links and share some of my personal creations in the second post. In the third post, I'll share anything specifically related to our device. Fourth post are user created favorites.
If you share anything and would like it included in the OP or first few posts, send me a pm!
What are your favorite profiles & tasks?? Has anybody made use of the edges yet for a cool scene?
Tasker website and downloads: http://tasker.dinglisch.net/
Tasker google group forums, great place to find help: https://groups.google.com/forum/m/#!forum/tasker
Nice tutorial and help thread: http://forum.xda-developers.com/showthread.php?t=1110775
Tasker user wiki: http://tasker.wikidot.com/profile-index
Joao forums for Autoapps plugins: http://forum.joaoapps.com/index.php
Sent from my g928c

Some of my personal creations:
CALL RECORDER
Here's an easy call recorder project I made to automatically record all incoming/outgoing calls and store them according to caller/date/time.
https://www.dropbox.com/s/bxxxbw3z7wn5pne/Call_Recorder.prj.xml?dl=0
*******************
SAY TRAFFIC REPORT
I'll post this one as a description...you would have to make it your own, but the concept is described below. It's an Autovoice profile that gets the most up to date Philadelphia traffic conditions from Twitter, then speaks them outloud to me. The cool part is that the speech can be paused with the press of a button or automatically if a call comes in:
Code:
Profile: Voice - Traffic Report - Philly (227)
State: AutoVoice Recognized [ Configuration:Event Behaviour: true
Command: "philly traffic" ]
Enter: Twitter Philly Traffic (228)
A1: Variable Set [ Name:%NewLine To:
Do Maths: off Append: off ]
A2: Variable Set [ Name:%Space To: Do Maths: off Append: off ]
A3: Run Shell [ Command:su
sqlite3 /data/data/com.twitter.android/databases/390939457-23.db
SELECT datetime(statuses.created/1000, 'unixepoch', 'localtime'), created, author_id, content FROM statuses WHERE author_id = 249854777 AND date(datetime(created/1000 , 'unixepoch', 'localtime')) = date('now', 'localtime') AND created/1000 > ('%TIMES'-3600) ORDER BY created DESC; Timeout (Seconds):0 Use Root: off Store Output In:%Twitter Store Errors In:%TwitError Store Result In:%TwitResult ]
A4: AutoVoice Continuous [ Configuration:
Stopping continuous voice recognition Package:com.joaomgcd.autovoice Name:AutoVoice Continuous Timeout (Seconds):0 ]
A5: Media Volume [ Level:15 Display: off Sound: off ]
A6: Variable Set [ Name:%Pause To:0 Do Maths: off Append: off ]
A7: Show Scene [ Name:Speech Pauser Display As: overlay, Blocking Horizontal Position:184 Vertical Position:100 Animation:System Show Exit Button: off Continue Task Immediately: on ]
A8: If [ %Twitter Set ]
A9: Variable Split [ Name:%Twitter Splitter:%NewLine Delete Base: off ]
A10: For [ Variable:%Traffic Items:%Twitter() ]
A11: Variable Split [ Name:%Traffic Splitter:| Delete Base: off ]
A12: Variable Split [ Name:%Traffic1 Splitter:%Space Delete Base: off ]
A13: Variable Search Replace [ Variable:%Traffic4 Search:# Ignore Case: off Multi-Line: off One Match Only: off Store Matches In: Replace Matches: on Replace With: ]
A14: Variable Split [ Name:%Traffic4 Splitter:http:// Delete Base: off ]
A15: Perform Task [ Name: Philly Traffic Abbreviation Conversion Priority:%priority + 1 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop: off ]
A16: Variable Set [ Name:%SearchTime To:%Traffic12 Do Maths: off Append: off ]
A17: Perform Task [ Name:Time Conversion Priority:%priority + 1 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop: off ]
A18: Perform Task [ Name:SPEECH Task Pauser Priority:%priority + 1 Parameter 1 (%par1):%Traffic41 was reported at %SearchTime1 %SearchTime2 %SearchTime3 Parameter 2 (%par2): Return Value Variable: Stop: off ]
A19: End For
A20: Else If [ %index !Set ]
A21: Say [ Text:There haven't been any traffic alerts reported within the last hour. Would you like me to check another hour back? Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus: on Network: off Continue Task Immediately: off ]
A22: Get Voice [ Title:Check Another Hour? Language Model:Free Form Language: Maximum Results:1 Timeout (Seconds):10 ]
A23: If [ %VOICE Set ]
A24: If [ %VOICE ~ yes ]
A25: Run Shell [ Command:su
sqlite3 /data/data/com.twitter.android/databases/390939457-23.db
SELECT datetime(statuses.created/1000, 'unixepoch', 'localtime'), created, author_id, content FROM statuses WHERE author_id = 249854777 AND date(datetime(created/1000 , 'unixepoch', 'localtime')) = date('now', 'localtime') AND created/1000 > ('%TIMES'-7200) ORDER BY created DESC; Timeout (Seconds):0 Use Root: off Store Output In:%Twitter Store Errors In:%TwitError Store Result In:%TwitResult ]
A26: Variable Set [ Name:%index To:1 Do Maths: off Append: off ]
A27: Goto [ Type:Action Label Number:1 Label:Top Anchor ]
A28: Else If [ %VOICE ~ no ]
A29: Goto [ Type:Action Label Number:1 Label:End Anchor ]
A30: End If
A31: Else
A32: Goto [ Type:Action Label Number:1 Label:Check another hour ]
A33: End If
A34: Else If [ %index ~ 1 ]
A35: Say [ Text:There haven't been any traffic alerts reported within the last two hours. Engine:Voice:default:default Stream:3 Pitch:5 Speed:5 Respect Audio Focus: on Network: off Continue Task Immediately: off ]
A36: End If
A37: Destroy Scene [ Name:Speech Pauser ]
A38: AutoVoice Continuous [ Configuration:
Starting continuous voice recognition without headset
Persistent Notification: true Package:com.joaomgcd.autovoice Name:AutoVoice Continuous Timeout (Seconds):0 ]
*****************
HUNTING TIMES
This one is my baby. It's made to be a standalone app, but I'll never publish it. This neat project analyzes sun and moon positions for the user's precise location and also every detail of the hourly weather forecast, to create a score of the probability of seeing wildlife...specifically deer. You can enter a zip code or click the button to get your location. You can enter any date or click the button for today's date.
Calculation of the solunar data is very complex, so I've used Javascript embedded in a local html document and processed by a hidden Web View element. That document and the needed library is in Solunar.zip...in order for this project to run, that needs to be unzipped into sdcard/HuntingTimes/ directory. The html and libraries are copyrighted and used with permission. I edited the files to pass variables directly to Tasker for twilights, sunrise/sunset and moonrise/moonset times for any coordinates, at any date.
I coded all the analysis.
Scoring factors are:
Twilight
Sunrise/Sunset
Lunar overhead/underfoot major periods
Lunar rise/set minor periods
Weather conditions (cloudy/sunny/rain/snow/many more) weighted by % chance of precip when appropriate
Barometric pressure measurement
Barometric pressure trend
Temperature
Wind speed
Others...
Hourly scoring detail is available up to 14 days from current date. Beyond that, a single score for the entire day is calculated from solunar data only. You can choose any future date you wish.
https://www.dropbox.com/s/xlu382ip88vma97/Hunting_Times.prj.xml?dl=0
https://www.dropbox.com/s/oxeefyurgy2rqa4/Solunar.zip?dl=0
********************
DASHCAM
This project launches with my car mode and discreetly records hd video through my windshield (while in the windshield mount), without displaying the view on screen (so I can use Maps or other apps) and without recording audio (so the mic is free to receive voice commands/ phone calls/etc). The recording is done with a third party app (Background Video Recorder [BVR] formerly called Secret Video Recorder [SVR]) and I use tasker to start/stop the recordings and organize the storage structure.
https://www.dropbox.com/s/7t6st60uxxss77j/Dashcam.prj.xml?dl=0
*****************
KILL ALL APPS
Tasker has a built in kill action...sometimes it doesn't work. There are a few plugins that work better but not 100%...a year or so ago I was trying to solve how to close google app, so I made my own task. This was in my car mode and I had would trigger by voice command or by waving my hand near the proximity sensor, to kill the current app. I made another modified version that looped until all apps were killed, which was part of my Exit Car Mode. That's what I've attached here:
https://www.dropbox.com/s/tc5yosesd0dzrfb/Kill_All_Apps.tsk.xml?dl=0
****************
MUTE GOOGLE APP
I use autovoice continuous mode heavily. It works by restarting google's voice recognition every 5 seconds. Google has hard coded that annoying beep into its app, without a toggle to turn it off. Only known solution before this was to mute the entire media volume channel...which means all other useful audio is muted (music, map directions, TTS, etc). This fix uses an xposed module called App Settings which can mute all the sound from any individual app. I use Tasker to detect when Autovoice is active, then turn off the sound for Google App...when Autovoice is off, turn the sound back on for Google App. Since they're is no direct way to toggle this setting subtly with an intent, I use the Auto Input plugin to accomplish the job.
Video of how it works:
https://www.dropbox.com/s/3ksgzlhdepkleif/SCR_20151223_000917.mp4?dl=0
Code:
Profile: AVC On Listener (42)
Event: Variable Set [ Variable:%AVCONTINUOUS Value:true User Variables Only: Off ]
Enter: Turn AVC Profiles On (47)
A1: If [ %GoogleSound !~ Off ]
A2: Secure Settings [ Configuration:AutoInput: service.ServiceAccessibility - Enabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds): 0 ]
A3: Set Clipboard [ Text:google app Add: Off ]
A4: Launch App [ App:App Settings Data: Exclude From Recent Apps: Off Always Start New Copy: Off ]
A5: AutoInput Action [ Configuration:Type: Text
Value: name or package
Action : Paste
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A6: AutoInput Action [ Configuration:Type: Text
Value: com.google
Action : Click
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A7: AutoInput Action [ Configuration:Type: Text
Value: mute audio
Action : Click
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A8: AutoInput Action [ Configuration:Type: Id
Value: de.robv.android.xposed.mods.appsettings:id/menu_save
Action : Click
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A9: AutoInput Action [ Configuration:Type: Id
Value: android:id/button1
Action : Click
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A10: Perform Task [ Name:Kill Current App Priority:%priority+1 Parameter 1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop: off ]
A11: Secure Settings [ Configuration:AutoInput: service.ServiceAccessibility - Disabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds):0 ]
A12: Variable Set [ Name:%GoogleSound To: Off Do Maths: Off Append: Off ]
A13: End If
*******************
MUTE GOOGLE TONES FOR AUTOVOICE
That annoying tone that Google voice recognition is listening...the reason why we have to mute the whole media stream...which very much limits the possibilities of using TTS features (like Maps directions & traffic updates) at the same time as Autovoice*Continuous... I solved the problem. It works beautifully!
Requires Root
Requires Xposed
Requires module: App Settings
Requires Auto Input
The Xposed module, App Settings, allows you to mute the sound for any individual app. It mutes all the sound for the app though, not just the voice recognition tones, so this setting needs to be managed with Tasker.
I use a Variable Set event to trigger if %AVCONTINUOUS ~ true, to run a task that uses Auto Input to turn google app sound off. And another profile to turn google app sound back on when %AVCONTINUOUS ~ false. This effectively mutes that tone without having to make Autovoice mute the whole media channel, which is extremely useful for me!
Code:
Profile: AVC On Listener (42)
Event: Variable Set [ Variable:%AVCONTINUOUS Value:true User Variables Only: Off ]
Enter: Turn AVC Profiles On (47)
A1: If [ %GoogleSound !~ Off ]
A2: Secure Settings [ Configuration:AutoInput: service.ServiceAccessibility - Enabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds): 0 ]
A3: Set Clipboard [ Text:google app Add: Off ]
A4: Launch App [ App:App Settings Data: Exclude From Recent Apps: Off Always Start New Copy: Off ]
A5: AutoInput Action [ Configuration:Type: Text
Value: name or package
Action : Paste
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A6: AutoInput Action [ Configuration:Type: Text
Value: com.google
Action : Click
Is Tasker Action: false
Check Screen State: falsePackage:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A7: AutoInput Action [ Configuration:Type: Text
Value: mute audio
Action : Click
Is Tasker Action: false
Check Screen State: falsePackage:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A8: AutoInput Action [ Configuration:Type: Id
Value: de.robv.android.xposed.mods.appsettings:id/menu_save
Action : Click
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A9: AutoInput Action [ Configuration:Type: Id
Value: android:id/button1
Action : Click
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]
A10: Perform Task [ Name:Kill Current App Priority:%priority+1 Parameter*1 (%par1): Parameter 2 (%par2): Return Value Variable: Stop: Off ]
A11: Secure Settings [ Configuration:AutoInput: service.ServiceAccessibility - Disabled Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds): 0 ]
A12: Variable Set [ Name:%GoogleSound To: Off Do Maths: Off Append: Off ]
A13: End If
*****************
SEND MY ETA
This one is useful when navigating. It is an Autovoice profile that sends an SMS to a contact of my choice with my eta.
https://www.dropbox.com/s/f39zqz8ht0jjo09/Voice___Send_My_ETA.prf.xml?dl=0
*********************
VOICE CONTROLLED GOOGLE PLAY MUSIC
Play any artist/album/song/playlist on Google Play Music. This Autovoice profile uses regex matching for flexibility. You can say "Play artist Keller Williams" or "Play song Vicarious" etc...and the appropriate playlist will play from your library if it exists or from the 'radio station' if it doesn't.
https://www.dropbox.com/s/3jm4ey212zy79hr/Voice___Play_Music.prf.xml?dl=0
Sent from my g928c

Specific tasks/profiles/projects for our Galaxy S6 Edge+
RUGGEDHUNTER'S AUTOCOCKTAIL & NOTIFICATIONS
This is a Tasker kid app that I made. Check out the link:
XDA Thread
Please hit the Thanks button if you'll find this feature useful!

Reserved
Favorites
Sent from my g928c

Nice work - I also have issues killing apps with Tasker...nothing seems to close Waze and Play Music after getting out of the car!

DPLOY said:
Nice work - I also have issues killing apps with Tasker...nothing seems to close Waze and Play Music after getting out of the car!
Click to expand...
Click to collapse
Thanks. As long as Waze/Play Music is running in the foreground, the task above should work perfectly for you. If you need to kill it while running in the background (notification pulldown), a simple modification should get it done. :beer:
Sent from my g928c

OP and S6 Edge+ features section updated.
Sent from my S6 Edge+ g928c
BobCatRom

XDA Tasker Week in Review
Sent from my g928c
Echoe ROM

RuggedHunter said:
XDA Tasker Week in Review
Sent from my g928c
Echoe ROM
Click to expand...
Click to collapse
mate..for me the most most wanted feature is the device led blink on the emmc activity....epic feature....will give anything if anyone made it!

vagenrider said:
mate..for me the most most wanted feature is the device led blink on the emmc activity....epic feature....will give anything if anyone made it!
Click to expand...
Click to collapse
Sounds like a fun project. I can tell you that the native LED action in Tasker doesn't work for all devices, but if not, there's probably a plug-in that would work.
I'm only loosely familiar with what emmc is. If there's something specific to look at in the system to determine if there's current activity on that chip, just point me in the right direction and I might be able to work with it....modified files/broadcast intent...anything like that happen during "emmc activity"?
Sent from my g928c
Echoe ROM

RuggedHunter said:
Sounds like a fun project. I can tell you that the native LED action in Tasker doesn't work for all devices, but if not, there's probably a plug-in that would work.
I'm only loosely familiar with what emmc is. If there's something specific to look at in the system to determine if there's current activity on that chip, just point me in the right direction and I might be able to work with it....modified files/broadcast intent...anything like that happen during "emmc activity"?
Sent from my g928c
Echoe ROM
Click to expand...
Click to collapse
my friend thanks so much for the interest..believe me if you made it will be a w e s o m e for me..i dont care if build it on script commands or tasker..my progress for now is some script commands-combinations but won't work..
here..
#!/system/bin/sh
#
echoe mmc0 > /sys/class/leds:led_r/trigger;

Yeah, activating the led with a script is another good idea. But what exactly do you mean by "emmc activity"? The hard part will be detecting whatever that is and using it to trigger the action.
Sent from my g928c
Echoe ROM

RuggedHunter said:
Yeah, activating the led with a script is another good idea. But what exactly do you mean by "emmc activity"? The hard part will be detecting whatever that is and using it to trigger the action.
Sent from my g928c
Echoe ROM
Click to expand...
Click to collapse
sorry mate..i mean mmc0 (internal memory activity)..i think its possible but my point is that we must found the proper led path and proper commands to get it and my coding knowledge doesn't helps me a lot..

Does anyone know how to detect when the Edge panel has been opened, or how to make a scene over top?

sleedham said:
Does anyone know how to detect when the Edge panel has been opened, or how to make a scene over top?
Click to expand...
Click to collapse
To detect when the edge FEEDS are on for edge autococktail, I was using dumpsys window windows and detect the blocking window name of the main panel.
Certainly it's not the same for the edge PANEL... But if I had a suggestion it would be to dig thru a dumpsys and see if anything sticks out.
Sent from my iPhone using Tapatalk

Related

MortScripts to toggle settings

This thread is dedicated to MortScripts that we use to change settings. Most of these can be stand alone scripts, but I got started creating this thread based on CHTS needing WMLongLife to change from Automatic to GSM radio profile. I found that WMLL seemed to eat up battery life in my old Fuze. I tried a script or two from the MortScript examples thread, but they did not work for me. I'll be posting various scripts that I use during my profile changes in CHTS, but I will in such a way that if you do not use CHTS you can still use the scripts.
Another purpose of this thread is to make these scripts available to those who for one reason or another the default programs in CHTS do not work and perhaps the script will. An example is sound profile changing to Automatic was not available so I added a script to do it for me. The feature had been turned off since it did not work in all phones. In a coming version I believe it will be back. The beta test works in my Fuze.
The hope of this thread is to help those that use CHTS to get some of the features that may not work on their phone through MortScripts instead. Also, as a place to share these "TOGGLE" switch scripts for others to be able to use outside CHTS.
I am trying to write scripts that do not use programs outside windows mobile. The hope is that they can be used in as many phones and ROMs as possible. An example is the first form of my Band_Changer used a program in CHTS and I reworked it to not require that program.
Radio toggle between Automatic (2G & 3G) and GSM (2G only): Post #2
Switch Sound Profile: Post #3
Auto time zone toggle: Post #5 and Post #8
Toggle Backlight: Post #14
Toggle Screen Rotation: Post #15
Toggle between Active Sync and Mass Storage: Post #16
Toggle Voice Command: Post #17
Radio toggle between Automatic (2G & 3G) and GSM (2G only)
This script calls the main script with the argument required based on your current profile to switch the profile to the other.
Code:
# Band_Toggle.mscr
opmode = RegRead( "HKLM","Software\OEM\UMTS","OpMode")
opmode = RegRead( "HKLM","Software\OEM\PhoneSetting\NetworkType","ItemName" & OpMode + 1)
If(opmode eq "Auto")
key = "g"
Else
key = "a"
EndIf
CallScript("\storage card\scripts\Band_Changer.mscr", key)
# CallScript("\windows\Band_Changer.mscr", key)
I test the script in my storage card, but when I use it for CHTS I would have it in \windows folder.
This is the main script:
Code:
# Band_Changer.mscr
If(NOT FileExists("\Windows\CMBandSwitching.exe"))
Message("You must have CMBandSwitching.exe installed in windows folder.^NL^^NL^Script will exit now.", "ERROR")
Exit
EndIf
key = argv[1]
key = (key eq "a")?"Auto":"GSM"
opmode = RegRead( "HKLM","Software\OEM\UMTS","OpMode")
opmode = RegRead( "HKLM","Software\OEM\PhoneSetting\NetworkType","ItemName" & OpMode + 1)
network1 = RegRead( "HKLM","Software\OEM\PhoneSetting\NetworkType","ItemName1" )
network2 = RegRead( "HKLM","Software\OEM\PhoneSetting\NetworkType","ItemName2" )
network3 = RegRead( "HKLM","Software\OEM\PhoneSetting\NetworkType","ItemName3" )
If(key ne OpMode)
If(key eq network1)
key = 1
ElseIf(key eq network2)
key = 2
ElseIf(key eq network3)
key = 3
Else
EndIf
Call("switcher")
EndIf
Sub switcher
Global(key)
SendSpecial(126) # Data disconnect
i=0
ForEach xvariable in regSubkeys("HKLM", "Comm\ConnMgr\Providers\{7C4B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections")
i+=1
enable[i] = RegRead("HKLM", "Comm\ConnMgr\Providers\{7C4B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections" \ xvariable, "Enabled")
EndForEach
Sleep(500)
ForEach xvariable in regSubkeys("HKLM", "Comm\ConnMgr\Providers\{7C4B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections")
RegWriteDWord("HKLM", "Comm\ConnMgr\Providers\{7C4B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections" \ xvariable, "Enabled", 0)
EndForEach
Sleep(500)
Run("\Windows\CMBandSwitching.exe")
If(ScreenHeight() eq 640)
Y1 = 160 # 1st button which is Auto on my Fuze 163
Y2 = 245 # 2nd button which is GSM on my Fuze 244
Y3 = 315 # 3rd button which is WCDMA on my Fuze 314
Y4 = 610 # Done button on my Fuze 608
X4 = 135 # Done button on my Fuze 134
Y5 = 460 # Done button on my Fuze 460
X5 = 125 # Done button on my Fuze 125
ElseIf(ScreenHeight() eq 800)
Y1 = 150 # 1st button which is Auto on HD2 150
Y2 = 200 # 2nd button which is GSM on HD2 200
Y3 = 305 # 3rd button which is WCDMA on HD2 305
Y4 = 750 # Done button on HD2 750
X4 = 110 # Done button on HD2 110
Y5 = 480 # Done button on HD2 480
X5 = 110 # Done button on HD2 110
EndIf
While(NOT WndActive("Band"))
Sleep(50)
EndWhile
If(key eq 1)
MouseClick("Band", ScreenWidth()*0.25, Y1) # 1st button
ElseIf(key eq 2)
MouseClick("Band", ScreenWidth()*0.25, Y2) # 2nd button
Else
MouseClick("Band", ScreenWidth()*0.25, Y3) # 3rd button
EndIf
Sleep(150)
SendSpecial(112) # Done
Sleep(500)
i=0
ForEach xvariable in regSubkeys("HKLM", "Comm\ConnMgr\Providers\{7C4B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections")
i+=1
RegWriteDWord("HKLM", "Comm\ConnMgr\Providers\{7C4B7A38-5FF7-4bc1-80F6-5DA7870BB1AA}\Connections" \ xvariable, "Enabled", enable[i])
EndForEach
Sleep(20000)
If(NOT Connected())
Connect("The Internet")
EndIf
EndSub
If you do not have a 480 x 640 or 480 x 800 phone or if this does not work for you please try this script to get me the points I need to improve this script.
Code:
# PickPoints.mscr
Run("\Windows\CMBandSwitching.exe")
WaitForActive("Band", 10)
Sleep(300)
SleepMessage( 2, "Select center of first (top) Network Type choice after this screen closes." )
Sleep(300)
aMouse = ScreenshotClick()
sMSGOutput1 = "^NL^First:^NL^X1 = " & aMouse[1] &"^NL^Y1 = " & aMouse[2]
SleepMessage( 2, "Select center of second (middle) Network Type choice after this screen closes." )
Sleep(300)
aMouse = ScreenshotClick()
sMSGOutput2 = "^NL^Second:^NL^X2 = " & aMouse[1] &"^NL^Y2 = " & aMouse[2]
SleepMessage( 2, "Select center of third (bottom) Network Type choice after this screen closes." )
Sleep(300)
aMouse = ScreenshotClick()
sMSGOutput3 = "^NL^Third:^NL^X3 = " & aMouse[1] &"^NL^Y3 = " & aMouse[2]
Sleep(300)
MouseClick("Band", aMouse[1], aMouse[2])
Sleep(300)
SleepMessage( 2, "Select center of Done button after this screen closes." )
Sleep(300)
aMouse = ScreenshotClick()
sMSGOutput4 = "^NL^Done:^NL^X4 = " & aMouse[1] &"^NL^Y4 = " & aMouse[2]
Sleep(300)
MouseClick("Band", aMouse[1], aMouse[2])
Sleep(1500)
SleepMessage( 2, "Select center of OK button after this screen closes." )
Sleep(300)
aMouse = ScreenshotClick()
sMSGOutput5 = "^NL^OK:^NL^X5 = " & aMouse[1] &"^NL^Y5 = " & aMouse[2]
SleepMessage( 2, "Select center of Cancel button after this screen closes." )
Sleep(3000)
WriteFile("\band_click.txt", "Screen width: " & ScreenWidth() & "^NL^Screen height: " & ScreenHeight() & sMSGOutput1 & sMSGOutput2 & sMSGOutput3 & sMSGOutput4 & sMSGOutput5)
Message("Please send me these data. They are saved in root directory \band_click.txt^NL^")
Remove the .txt from the end of the script files.
Switch Sound Profile
These scripts call the main script with the argument for the profile you want.
Code:
# Sound_Automatic.mscr
CallScript("\Windows\Sound_Profile.mscr", "Automatic")
Code:
# Sound_Normal.mscr
CallScript("\Windows\Sound_Profile.mscr", "Normal")
Code:
# Sound_Silent.mscr
CallScript("\Windows\Sound_Profile.mscr", "Silent")
Code:
# Sound_Vibrate.mscr
CallScript("\Windows\Sound_Profile.mscr", "Vibrate")
This is the main script:
Code:
# Sound_Profile.mscr
# Change Sound Profile based on argument used to call this script from
# a short script in the form:
# CallScript("\Windows\Sound_Profile.mscr", "Automatic")
mode=argv[1]
If(mode EQ "Automatic")
RegWriteString("HKCU", "ControlPanel\Profiles", "ActiveProfile", "Automatic")
SendMessage("", 1156, 0, 0)
ElseIf(mode EQ "Normal")
RegWriteString("HKCU", "ControlPanel\Profiles", "ActiveProfile", "Normal")
SendMessage("", 1156, 0, 0)
ElseIf(mode EQ "Silent")
SendMessage("", 1156, 3, 0)
ElseIf(mode EQ "Vibrate")
SendMessage("", 1156, 2, 0)
Else
EndIf
In CHTS profile switching I use the Execute/Kill App(s) section with the executable as \windows\mortscript.exe and the argument one of these four:
\Windows\Sound_Profile.mscr Automatic
\Windows\Sound_Profile.mscr Normal
\Windows\Sound_Profile.mscr Silent
\Windows\Sound_Profile.mscr Vibrate
Remove the .txt from the end of the script files.
This isn't written as a toggle, but these scripts will turn off or on the auto-time zone sync option in phone settings. Turning it off helps to keep active sync from running all the time.
Code:
#Auto time zone off
RegWriteDWord("HKLM","\Drivers\BuiltIn\RIL","NITZEnable",0)
Code:
#Auto time zone on
RegWriteDWord("HKLM","\Drivers\BuiltIn\RIL","NITZEnable",1)
Auto time zone toggle
Thanks Farmer Ted
It is easy enough to create a toggle.
Code:
If(RegRead("HKLM","\Drivers\BuiltIn\RIL","NITZEnable"))
RegWriteDWord("HKLM","\Drivers\BuiltIn\RIL","NITZEnable",0) #Auto time zone off
Else
RegWriteDWord("HKLM","\Drivers\BuiltIn\RIL","NITZEnable",1) #Auto time zone on
EndIf
Thx RoryB... toggle features are good... if you can store all here.. it must be a good base to share with communauty !
great job my friend! especially after the long test time in beta group to fulfill different device's needs.
this is the perfect extension for the post-run-scripts while profile switching.
I'm looking forward to much more of this scripts, which can be used.
Thanx also in name of all CHTS-users
Micha
RoryB said:
Thanks Farmer Ted
It is easy enough to create a toggle.
Click to expand...
Click to collapse
Cool, that was a lot simpler than if I'd done it, lol. Here's the same script, with message boxes to let you know what the setting is.
Code:
If(RegRead("HKLM","\Drivers\BuiltIn\RIL","NITZEnable"))
RegWriteDWord("HKLM","\Drivers\BuiltIn\RIL","NITZEnable",0) #Auto time zone off
Message("Active Sync under control")
Else
RegWriteDWord("HKLM","\Drivers\BuiltIn\RIL","NITZEnable",1) #Auto time zone on
Message("Active Sync running wild")
EndIf
LOL I love a sense of humor.
I updated post #2 for the Band Changer because I have been getting failed to connect or dialed modem not answering error messages.
RoryB said:
I updated post #2 for the Band Changer because I have been getting failed to connect or dialed modem not answering error messages.
Click to expand...
Click to collapse
Made another tweak to stop data connection first.
Updated Post #2 for Band_Changer.mscr. It seems to run a little faster.
On Band_Changer I realized that
Code:
Y1 = 150 # 1st button which is Auto on HD2 150
Y2 = 215 # 2nd button which is GSM on HD2 200
Y3 = 300 # 3rd button which is WCDMA on HD2 305
works in my phone too. So I would not need to check the screen size, but I am running Energy ROM that is a WVGA with tweaks to work on my VGA. I need to get some pick point data from anyone who uses a true VGA ROM in their phone to confirm the points for it. Also, a screen shot of CMBandSwitcher.exe would help a lot.
If CMBandSwitcher.exe has the same screen size for WVGA and VGA phones I will be able to reduce the code some more.
Toggle Backlight
From http://forum.xda-developers.com/showpost.php?p=2018165&postcount=239
Code:
#toggle backlight between max and one-from-minimum (on trinity at least)
CurrentBright = RegRead( "HKCU", "ControlPanel\Backlight", "Brightness" )
If (CurrentBright = 1)
SetBacklight (100, 5)
Else
SetBacklight (1, 1)
EndIf
Toggle Screen Rotation
From http://forum.xda-developers.com/showpost.php?p=2832605&postcount=929
Code:
If (regread("HKLM", "System\GDI\ROTATION", "ANGLE") eq 0)
Rotate (90)
Else
Rotate (0)
Endif
Toggle between Active Sync and Mass Storage
From http://forum.xda-developers.com/showpost.php?p=5078802&postcount=2552
Code:
usb = RegRead ( "HKLM", "Drivers\USB\FunctionDrivers", "DefaultClientDriver" )
If ( usb eq "RNDIS" )
Run ( "\Windows\USBSetting.exe" )
Sleep ( 200 )
SendSpecial ( "Down" )
Sleep ( 50 )
SendSpecial ( "CR" )
Sleep ( 50 )
SendOK
ElseIf ( usb eq "Mass_Storage_Class" )
Run ( "\Windows\USBSetting.exe" )
Sleep ( 200 )
SendSpecial ( "Up" )
Sleep ( 50 )
SendSpecial ( "CR" )
Sleep ( 50 )
SendOK
EndIf
Toggle Voice Command
I only use Voice Command when I am driving so I toggle it off when I am not driving to save battery drain.
Code:
ShowWaitCursor
If( ProcExists( "VoiceCmd.exe" ) )
Kill( "VoiceCmd.exe" )
PlaySound( "Stopping" )
HideWaitCursor
SleepMessage( 2, "Voice Command^NL^^NL^Stopped", "Voice Command Toggle" )
Delete( "\Windows\Startup\Voice Command.lnk" ) # so it will not restart after a soft reset
else
Run( "\Program Files\Voice Command\VoiceCmd.exe" )
PlaySound( "Starting" )
HideWaitCursor
SleepMessage( 2, "Voice Command^NL^^NL^Started", "Voice Command Toggle" )
Endif
Sad to go
My Fuze no longer works. I currently have a loner Infuse 4G, but do not know what I will end up with.
I will not be able to continue development of Mortscripts, etc.
Sorry to go, but it has been fun.
I'll keep watching to see if anything comes up I need to respond to.

[Q] Search Google Now?

This may or may not be a feature request but does anyone know an OnTap action that can search Google Now for specific text. For example, when I tap some text I'd like it to search Google Now for 'weather' which brings up the current conditions with the slider. Thanks in advance!
I did accomplish this with Tasker Intent;
Send Intent [
Action: android.intent.action.WEB_SEARCH
Cat:None
Mime Type:
Data:
Extra: query:weather
Extra:
Package: com.google.android.googlequicksearchbox
Class: com.google.android.googlequicksearchbox.SearchActivity
Target:Activity ]
...
? :good:
You are trying to do the exact same thing I am with the weather search string. Has anyone made any progress in seeing if this is possible from within Zooper? Guess I'll give it a try with Tasker. Not exactly what I was looking for, but at least its a temporary fix. Thanks for sharing.

[Q]Refreshing Zooper from SL4A

I've got a Zooper module that I'm using to control the lights in my apartment. I'm calling SL4A scripts from Zooper that call an API running on a webserver to toggle the lights. I'm using wget with #SEX# in zooper to query the status of the lights off my server.
The problem I'm having is that I can't update the widget after the lights toggle. I did just start playing with it today, but I'm not seeing any means to do this from SL4A.
I'm using Python in SL4A.
Edit: I tried sending an intent to Zooper to set an unused variable from SL4A, though I don't think it's sending right.
Code:
activity = 'org.zooper.zw.action.TASKERVAR'
extras = {}
extras['org.zooper.zw.tasker.var.extra.STRING_VAR'] = '#Ta#'
extras['org.zooper.zw.tasker.var.extra.STRING_TEXT'] = 'a'
extras['org.zooper.zw.tasker.var.extra.INT_VERSION_CODE'] = '1'
packagename = 'org.zooper.zw'
classname = 'org.zooper.zw.tasker.var.extra.BUNDLE'
intent = droid.makeIntent(activity, None, None, extras, None, packagename, classname).result
droid.sendBroadcastIntent(intent)

[Q] Is there a way i can do this with the zooper widget?

Hello :3 I have a question and i was wondering if anyone could help me. My question is after searching through different themer themes, I came across a cool feature the Zooper widget allows. It was a bitmap of my music covers that would appeare when song was playing. It was this code: [ b ] #TMU_COVERART# [ / b ] [ox]$#TMU_ISPLAYING#!=1?1000$[/ox] (sorry about the spaces) I was wondering if instead of my album or song cover, could I use a random picture to display only when my music is playing?
babiiangelc said:
Hello :3 I have a question and i was wondering if anyone could help me. My question is after searching through different themer themes, I came across a cool feature the Zooper widget allows. It was a bitmap of my music covers that would appeare when song was playing. It was this code: [ b ] #TMU_COVERART# [ / b ] [ox]$#TMU_ISPLAYING#!=1?1000$[/ox] (sorry about the spaces) I was wondering if instead of my album or song cover, could I use a random picture to display only when my music is playing?
Click to expand...
Click to collapse
Depends on what you mean by "random". The image is accessed through its file path, which isn't really something you can randomize. You can certainly pick a specific image to display only when music is playing.
What you could do is place all the images you want in the same folder and name them with numbers, then use something like Tasker to pick a random number wwithin the range of your image names when music starts playing. You can then use that variable and point to that numbered image within that folder.
OP - Can absolutely do what you want!
Yes it requires Tasker, but you don't have to pre-name any images. Just create a folder on your phone that contains all the images you'd like to use.
Then you can automate the whole thing in Tasker including automatically reading all the filenames in the folder, then push the full path and filename to Zooper.
So in Tasker, just create a Task with these 4 Actions:
1. List Files - (choose your directory/folder and place the result in a variable lets call %file_list)
2. Variable Set - (set a variable we'll call %num_files to value %file_list(#) - this gives you the total number of filenames in the file list)
3. Variable Randomize - (set a variable we'll call %random_num to min/max values of 1 and %num_files created in the previous step)
4. Zooper Widget Variable - Set a Zooper Variable we'll call #TRANDOM_FILE# to value of %file_list(%random_num) which basically pulls the FULL THE PATH to your randomly selected file and pushes it to Zooper, for you to do what you'd like with!
The only part to figure out or decide is when to update the image. To update it everytime a new track starts per say - setup a profile in Tasker using the Media Utilities state of State New Track and link it to trigger the Task you created above.
Possibilities are pretty much endless here. Enjoy!

Some useful settings

https://play.google.com/store/apps/details?id=by4a.setedit22
By using this app you can change settings, which can not be changed normally. A few I would like to explain here. I am not responsible for anything! Use at your own risk!
If you know more settings, you can share it with the other users here.
You can only change settings in the tab "System", as long as the app doesn't have the permission for this. Without root you need to use adb to grant this permission.
I recommend that the phone should be restarted when changes have been made since not all changes are updated directly.
If you don't have the setting you can add it by pressing "+ Add new setting".
Setting: hide_virtual_key
Value: 1 enables it, 0 disables it
What does this setting do: This setting adds a button to the navigation bar, which hides it. You can then make it visible again by moving your finger upwards from the bottom of the screen.
Setting: multiwindow_mode_settings
Value: 1 enables it, 0 disables it
What does this setting do: It toggles the MultiWindow function on/off.
Setting: hw_not_display_week
Value: false enables it, true disables it
What does this setting do: Toggles visibility of week day on the icon of the calender app.
Setting: app_name_two_lines
Value: true enables it, false disables it
What does this setting do: Toggles whether app names should be truncated in the launcher or if they can take two lines.
If you can't enable network speed informations in status bar this might help:
Setting: show_network_speed_enabled
Value: -1 hides it in settings, 0 disables it, 1 enables it
Information: Seems to be completly broken/disabled/removed in B420/B421.

Categories

Resources