1. 2015 is going to be a great year for Android! Why wait??
    Samsung Galaxy Note 5 | Samsung Galaxy S6 | HTC One M9
  2. New Forum Created: Samsung Gear VR!

Using Tasker with OfficeSuite


  1. bruce73

    bruce73 Well-Known Member

    Interesting situation here. I've created a simple profile that extends the screen timeout to 3 minutes for certain apps, Office Suite being one of them. When I open OS, the profile kicks in, but was soon as I open a file to edit, I lose it. I'm guessing this is because the edit window is a sort of overlay, so Tasker doesn't see OS running in the background. Is there any way around this?

    Advertisement
    :
  2. CodeMonkey

    CodeMonkey Well-Known Member

    You may be able to switch on the accessibility service for Tasker and monitor %WIN values to handle the edit window.
    bruce73 likes this.
  3. bruce73

    bruce73 Well-Known Member

    Thanks. Can you go into a little more detail or do you have a link that could help me understand this?
  4. CodeMonkey

    CodeMonkey Well-Known Member

  5. bruce73

    bruce73 Well-Known Member

    Perfect. Thanks a lot.
  6. CodeMonkey

    CodeMonkey Well-Known Member

  7. bruce73

    bruce73 Well-Known Member

    Turns out if I use %WIN I can get the profile to run, but if I pull up a context menu it won't be landscaped, since its title (whatever that is) takes the focus and doesn't fit the profile.

    This is if I use the %WIN variable as the context for the profile. Would it make more sense to do an application (OfficeSuite) context and then set the variable within the task by using a wildcard to cover the context menus?

    If I sound confused, I am. :D
  8. CodeMonkey

    CodeMonkey Well-Known Member

    I believe %WIN is a system variable so it probably shouldn't be set by the user. I'd probably figure out the required %WIN values using a simple alert flash on value change first, then set a global user variable when %WIN matches any of the found values or the office app is running. Then I'd use that global user variable to trigger the required profile.
    bruce73 likes this.
  9. bruce73

    bruce73 Well-Known Member

    I have no idea what that means, but thank you. ;-)
  10. CodeMonkey

    CodeMonkey Well-Known Member

    Sorry - had my day job (software developer) head on when I typed that..

    You shouldn't try and set %WIN just read the values because it's values are set by Tasker based on its integration with the phone (that's what I meant by system variable).

    Under the Alert actions you can do a Flash which briefly displays a message containing the information that you set in the action.
    If you setup a quick profile using a context of %WIN set to display a Flash containing the %WIN value, you should be able to enable the profile and then run Office Suite etc to see the values of %WIN that you need to check for with your finished profile. Make a note of those values (a, b, c, etc) - this gives you the information to actually make your desired profile(s).

    Then you can setup a series of Profiles based on %WIN value being a, b, c, etc. and use them to set your own global user variable e.g. %OFFICE to 1, clearing the value of %OFFICE on exit. Then use a profile triggered when %OFFICE = 1 to run a task with the desired behaviour.
    bruce73 likes this.
  11. bruce73

    bruce73 Well-Known Member

    Brilliant, that totally makes sense. I kinda knew the theory behind what you said, but was lost in how to implement it. Thanks for taking the time to walk me through it.

    So is it pretty much a rule of thumb not to mess with the value of a system variable?
  12. CodeMonkey

    CodeMonkey Well-Known Member

    Np.

    I'd avoid messing with them yes - probably an easy way to do bad things :D
    bruce73 likes this.
  13. bruce73

    bruce73 Well-Known Member

    Got it.

    So I created a profile to read the WIN values, which works great, but there's no name associated with the popup context menus. If I make a selection from the menu, like "Find & Replace," then that window does have a title. Apparently Android doesn't consider popups "windows." (??)

    So I'm up against the same problem: if I create a profile to turn auto rotation on, the files will be landscaped, but not the popups. Hopefully that makes some sort of sense.
  14. CodeMonkey

    CodeMonkey Well-Known Member

    I'm at a loss then I'm afraid. The only thing I can suggest is that you generate a notification when the profile starts and use it to manually exit the profile.
    bruce73 likes this.
Loading...

Share This Page