I want to use Tasker to turn WiFi OFF IF it is not connected to my home network. How can I do that with a variable? Thanks.
Is there any particular reason you need to use variable for that? This can be easily achieved without variables.
step 1
set a profile with a State -> Net -> Wifi connected
in a task add action set variable name it wifiConnected and set it to "yes" or "true" or whatever you want, but keep in mind that variable name must contain at least one capital letter, to be public (be visible in all tasks)
step 2
set a second profile with a State -> Net -> Wifi connected but this time select option invert (so the profile will become active, when wifi disconnected)
in a task use set variable and set it's value to "no" or "false" or whatever you want
step 3
create profile with a state -> variables -> variable value
in the left field type in variable name wifiConnected
in the right one type "no" or "false" or whatever you set it to on disconnecting
as a task for this profile use net -> WiFi -> Off
that's about it.
I'd really suggest you on reading some more about Tasker and how it works, as such things are the very basics
//edit
to do the same without setting variable, just do a profile from step 2, but instead of setting variable, use task from step 3, to disable wifi
Sorry, but I think what you wrote above does what it's supposed to do only the first time, then it needs something to trigger it automatically like a builtin variable or so...in my opinion that doesn't work as intended...no offence :)
Well, you will need something that will trigger the task for the first time, it's about the task that verifies what's the wificonnected's value. If it is "no", that means you don't have any SSIDs to connect to.You will add a wait task, let's say 2 minutes and net-wifi-off, because you will want to disable wifi if, after a specific period of time when your phone wasn't able to connect to any network.
But, you will want something continuous, in loop so you will have to add a task/goto action, like this!
Let's say you have this action:
A1: task/wait-2 minutes
A2: if %wifiConnected ~no then set WIFI off
goto A2
This way you'll phone will scan for %wifiConnected's value, continuously. As an alternative, you may cancel that loop once your wifi has already set to off because you don't need that value anymore.
I mean, your screen on-> task activated->elapsed 2 minutes-> no ssids to connect to-> wifi off
Then, you manually or not necessarly turn your wifi back on, but the task won't be triggered anymore because the screen is already on, this is why you will have to use that goto action :)
Or, you could go and disable/enable tasker such that your task( that checks for wifiConnected's value) being triggered again :)...hope that helped...my profile works like smooth :)
Related
I've a doubt... i'm starting with assistant SDK, and I dont know how make a differece between several actuators.
I've seen in google's guide how it works, but there I only can see the code for one actuator.
print('Do command', command, 'with params', str(params)) # Add the following:
if command == "action.devices.commands.OnOff":
if params['on']:
print('Turning the LED on.')
else:
print('Turning the LED off.')
My problem is that dont undertand how works the "if command" ... because here its only cheking if arrives from recognition "On" or "Off" but not define the destiny.
Supose that we have 2 independent lights... this code will turn on and off both at the same time. Although then in GPIO configuration I'll put 2 differents outputs the condition will be the same.
I should declare my actuators before and then change "action.devices.commands.OnOff" by "action.actuator1.commands.OnOff" and "action.actuator2.commands.OnOff" ?
Thanks a lot for any help... sorry if I did not explain myself well
If you want to control two separate subcomponents, you will want to create custom device actions with a pattern that includes a parameter for which item you want to turn on/off.
I have a requirement that states to have a Menu Screen containing 10 options and user can select a option and jump to appropriate screen.I have created a Trans-ID for Menu Screen.Do i need to create Trans-ID for all the 10 options?.I have searched for this type of Requirement and all of them involves creating the Trans-ID for each sub screen so that the screen can be refreshed and return to same screen until user selects to go back to main-screen.
I am new to CICS-COBOL Programming and not sure why we need to create Trans-ID for each screen.Is this the global format or is there any other approach available?
No, you don't need to use a tranid per screen/function in this scenario. You could actually use one transid and even one program in a pseudoconversational style.
You would use a commarea to hold the state of the interaction with the user at the terminal, so when the user picks an option and the next 'leg' of the pseudoconversation invokes the transaction and program again, you can determine in that program what has just been received from the terminal, what to do with it and what response to send back to the terminal. This process simply repeats until the business function completes and you can end with the default menu again.
I want to get value of time sets by user or automatically , is there any way to do it in ios ?
Value that i want for :
Settings > General > Date&Time > Set Automatically
or
I'm looking get correct time while there is no internet connection.When i'm set the automatically in settings,the time sets correctly by phone so is it a way that same value.
Thanks
No, you cannot access that setting value. You need to rely upon a network based time to be sure of actual time.
I need a command which calls a screen in a specific priority.
In detail:
I'd like to offer a menu entry to our users were they can simple change the work day calendar in employee data sets and nothing else. I know the correct way would be creating a lower prio screen and grand the user such prio for accessing employees. But these users are allowed to change more than the work day calendar! I just like to reduce the fields in screen for a more simple recording and maintaining of absence from work.
So they should be able to view and change the normal employee screen but with a special command (from command view) the should open the same employee but with reduced number of field. Simple: separated screens for different use cases.
I believe I have to solve it by providing a service program in infosystem or similar but I'd like to ask you for a better way of solution before.
In this case you can work with different screen context modes.
Please keep in mind, that screen modes works just within new screen descriptions.
(almost) Every element in the screen editor has an option called visibility scope (Sichbarkeit -> Geltungsbereich)
For example you could define a scope called EXTENDEDPERMISSION.
Then the element would be only visible, when you set the screencontext in FO to "EXTENDEDPERMISION"
..: set one screen context
.formula P|maskkontextfop = "EXTENDEDPERMISION"
..
..: set some screen contexts
.formula P|maskkontextfop = "VIEW1 VIEW2 LIGHTVIEW"
You can set the screen context in every event you'd like to.
For more infos you can search for "maskkontextfop" in the online help.
But keep in mind, that the user still can access all variables over the dynamic selection as long as you grant them the permission to these fields!
So if you really want, that a user (under no circumstances) gains access to some fields, you'll have to configure the right permissions.
Is it possible to see the list of watches with the realtime value when I am not at a breakpoint?
I have defined an integer Mycounter in the public section of a TDatamodule.
I add it to the Watch list.
I can see its value being updated in the watch list only as I am debugging line by line or I am at a rbeakpoint.
Is there a way to keep seeing its value in the watch list even when the control goes back to the VCL thread (=when I press F9)?
As David said, a watch is not possible but you could get close by adding a data breakpoint to your variable and have it dump it's value to the Event Log each time it changes.
Steps
Get the address of the variable you like to track.
Add a databreakpoint
Open the Event Log debugging window
Get the address of a variable
I have used the variable I in my example. As per your example, this should be #Mycounter
Adding the Data Breakpoint
Use the address of the variable
Uncheck the Break checkbox
Evaluate the expression PInteger($45622C)^
Log the result
Viewing the results
There is no way to do this from the IDE. Watch evaluation requires all the threads in the process to be suspended so that the debugger can read the memory and perform the evaluation.
If you want to see values being refreshed without the debugger breaking, you would most likely have to add code to your application to instrument the values of interest. For example, add code to your application output debug messages (e.g. OutputDebugString(), CodeSite etc.) whenever the value changed. You would of course need to view the information in a separate viewer.