• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Tasker help

Liam2349

Lurker
I've made a profile that opens up my images on my phone and adjusts the screen timeout to one hour when I shake my phone side to side. The problem is, the screen timeout stays at one hour, and I want it to revert back to what it was when I exit my images. Can anyone help?
 
OK I just had a play with this, Using BBC iPlayer as my Example. I used Variables (Under Tasker > variable)

Edit - Note, this is what happens when the app is open. You still need to open teh app using an existing profile. You should remove the screen time out from that profile though, as it is handled below.

Code:
Profile 1:BBC iPlayer
Context > App > BBC iPLayer
Task > Variable Set > %Iplayer to "on"
Exit Task > Variable Set > %Iplayer to "off"

Code:
Profile 2:
Context > Event > Variable Set %Iplayer "on"
Task > Display Timeout > 10 minutes

Code:
Profile 3:
Context > Event > Variable Set %Iplayer "off"
Task > Display Timeout > 30 seconds

It works nicely.

One thing, if you're unfamiliar with variables, name them with the first letter capital.

Imagine variables as a text file. When you open iplayer, the iplayer text file says "on" in it. When you close it (actually when its not on screen) the text file says "off" in it.

Then you have profiles that wait for the text file to have "on" written in it and then change the timeout. Etc etc. I've just got into variables these last couple of wqeeks and it massively increases the potential of tasker.

Hope this helps.
 
That's handy. I have a variable that should be local. I'll change that in my Meditate project.

* Tasker says that for non-local variables at least one letter must be upper case. Sounds like it doesn't have to be the first one.

I haven't done any programming for 30 years. This is fun. Thanks for your help.
 
Doesn't have to be the first one no, but it makes more sense from a touch screen keyboard though ;)
 
OK I just had a play with this, Using BBC iPlayer as my Example. I used Variables (Under Tasker > variable)

Edit - Note, this is what happens when the app is open. You still need to open teh app using an existing profile. You should remove the screen time out from that profile though, as it is handled below.

Code:
Profile 1:BBC iPlayer
Context > App > BBC iPLayer
Task > Variable Set > %Iplayer to "on"
Exit Task > Variable Set > %Iplayer to "off"

Code:
Profile 2:
Context > Event > Variable Set %Iplayer "on"
Task > Display Timeout > 10 minutes

Code:
Profile 3:
Context > Event > Variable Set %Iplayer "off"
Task > Display Timeout > 30 seconds

It works nicely.

One thing, if you're unfamiliar with variables, name them with the first letter capital.

Imagine variables as a text file. When you open iplayer, the iplayer text file says "on" in it. When you close it (actually when its not on screen) the text file says "off" in it.

Then you have profiles that wait for the text file to have "on" written in it and then change the timeout. Etc etc. I've just got into variables these last couple of wqeeks and it massively increases the potential of tasker.

Hope this helps.

Thanks for the response. I'm having trouble actually entering this though. For the first profile, i've got my context as App > File magic

For the task, I went to variable set, and wrote "File magic" in the Name field, and "On" in the To field.

It then says "Error: % File magic: must be a variable or array name". Know what i'm doing wrong?

I'm very new to this so forgive me if it's a simple error.
 
Looks like you're using the space bar. Try making it one string

eg %FileMagic


You can name it whatever you want.
 
Looks like you're using the space bar. Try making it one string

eg %FileMagic


You can name it whatever you want.

Thank you very much for the help, I've learnt about variables now and have cracked it!

When file magic is open, screen timeout adjusts to 30 minutes. When not open, screen timeout goes to 30 seconds. When file magic is open, I can also shake the phone to shortcut to a specified folder that I use regularly.

Thanks again!
 
I've just been playing around with scenes and I can see how they might be useful. It looks like they are a screen which you could place buttons on to run tasks, like opening folders, changing settings e.t.c.

I've made a basic one to test some stuff out, know how I can open it?
 
Just in case you're waiting for me to respond... I don't know the answer. Never looked at this feature
 
Back
Top Bottom