Go Back   Android Forums > Android Discussion > Android Applications > Tasker

test: Reply
 
LinkBack Thread Tools
Old April 18th, 2013, 10:21 PM   #1 (permalink)
Senior Member
Thread Author (OP)
 
Join Date: Jun 2012
Location: Third rock from the Sun
Posts: 612
 
Device(s): Samsung Galaxy Note 3 (current phone) Motorola RAZR HD MAXX (last phone, backup)
Carrier: Verizon

Thanks: 40
Thanked 123 Times in 88 Posts
Default Noob variable question

I've had Tasker for a couple months but have only done the most basic programming. I just rooted my phone and installed the Secure Settings app so I could right profiles and tasks that could reboot my phone automatically.

So I have a Task that just reboot's the phone but I would like to put in some sort of variable query before the reboot command that prompts the user before the reboot occurs with the option to cancel the reboot by pressing a button. If no button is pressed within like 5 or 10 seconds then the reboot occurs.

Any direction on to achieve this would be very helpful!

Advertisements
Methos1979 is offline  
Reply With Quote
sponsored links
Old April 18th, 2013, 11:29 PM   #2 (permalink)
Senior Member
 
Join Date: Jan 2012
Posts: 940
 
Device(s): rooted AT&T GS4 w/ Android 4.3
Carrier: Not Provided

Thanks: 283
Thanked 202 Times in 158 Posts
Default

Here's my profile to do similar.
My logic, if no button pressed, reboot does not occur
Profile: RebootProfile (9)
Time: 10:50
Enter: Anon (12)
A1: Notify Sound [ Title:Getting Ready To Reboot Text: Icon:<icon> Number:0 Sound File: Priority:3 ]
<Should not be needed, but is needed. Menu doesn't execute default when times out>
A2: Variable Set [ Name:%RebootProceed To:N Do Maths:Off Append:Off ]
A3: Menu [ Title:Reboot? Background Image: Layout:IconAndTextMenu Timeout (Seconds):25 Show Over Keyguard:On ]
A4: If [ %RebootProceed ~ Y ]
<Set off due to leak in droidwall>
A5: WiFi [ Set:Off ]
A6: Reboot [ Type:Normal ]
A7: End If
electricpete is offline  
Last edited by electricpete; April 18th, 2013 at 11:33 PM.
Reply With Quote
Old April 19th, 2013, 05:17 AM   #3 (permalink)
Senior Member
Thread Author (OP)
 
Join Date: Jun 2012
Location: Third rock from the Sun
Posts: 612
 
Device(s): Samsung Galaxy Note 3 (current phone) Motorola RAZR HD MAXX (last phone, backup)
Carrier: Verizon

Thanks: 40
Thanked 123 Times in 88 Posts
Default

Thanks for the example. A couple questions: Do I type it in exactly like that? Do I have to exit Beginner Mode to type in this type of thing? Are the comments inside the < > brackets just information for me and not required in the program?

The Time: 10:50 - does that mean this occurs at 10:50 daily for you? You logic is opposite mine in that I want the reboot to cancel if I press the button, correct?

Thanks for the info - it's starting to make a little sense.
Methos1979 is offline  
Reply With Quote
Old April 19th, 2013, 12:41 PM   #4 (permalink)
Senior Member
 
Join Date: Jan 2012
Posts: 940
 
Device(s): rooted AT&T GS4 w/ Android 4.3
Carrier: Not Provided

Thanks: 283
Thanked 202 Times in 158 Posts
Default

Quote:
Do I type it in exactly like that?
No, this is what Tasker produces when you export a profile.
A1 through A7 are labels added in the process to identify the 7 lines or actions in my task.
The commands are inserted within Tasker action menu. That brings up a dialogue box. Some action dialogue boxes have arguments / options. The arguments/options are listed in square brackets in this exported version. Most of those arguments are the default, things I didn’t even change in the dialogue box.

Quote:
Do I have to exit Beginner Mode to type in this type of thing?
I don’t think it’s required but certainly you’ll want to exit Beginniner mode eventually to get full capabilities.
You don’t type it in, you select the actions from menus.

Quote:
Are the comments inside the < > brackets just information for me and not required in the program?
Yes. These actually things I have typed into the “label” field for certain commands, used here similar to comments in other programming language.
Each label/comment appears prior to the action that it describes.

Quote:
The Time: 10:50 - does that mean this occurs at 10:50 daily for you?
Yes

Quote:
You logic is opposite mine in that I want the reboot to cancel if I press the button, correct?
Yes. I used to have it the opposite way (the way you described). But I changed it based on a bad experience: I was on the phone in a business conference call at 10:50 and didn’t notice the reboot prompt and therefore didn't respond. My *&*^% phone rebooted in the middle of the phone conversation, kicking me off the phone call... not a good thing. That’s why this logic makes more sense to me to only reboot if explicit permission is given.

The options in the “menu” command gives ability to identify which menu action will occur by default if user doesn’t select any. I had found it didn’t always work correctly (at least in previous versions of Tasker), so I took charge of the default behavior myself with this structure (the menu doesn’t directly execute the desired action... it just sets a variable RebootProceed that is subsequently checked in the if/then statement).

I think maybe having problems with the basics of creating profile and creating actions? I'm using Tasker version 1.3.3u2m which has a different user interface than later versions, so it wouldn't make sense for me to try to describe step-by-step interaction with the UI unless you are using the same version.
electricpete is offline  
Last edited by electricpete; April 19th, 2013 at 12:44 PM.
Reply With Quote
Reply


Go Back   Android Forums > Android Discussion > Android Applications > Tasker
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 01:46 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.