Hello again little helpers.
I have another question for which I could not found any answer so far.
maybe it is just not a problem at all but as a beginner I am at my limits. :)
Have an UI with UI-Editor with buttons in it. Want to change background color of the tapped button.
Python script within button action (button1->tapped). Now I just cannot figure out (and have not found any help in net or this forum - maybe I searched wrong) how to address that button1 attribute 'background_color'.
I know that when I build he whole view by script I could 'instanciate' the buttons and have a handler there but how to do it when using UI editor?
How to pick a certain button and change attributes?
Tried it with 'sender.background_color = 'green' or 'UI.button1.background_color = 'green'
all not working.
therefore I have two questions:
how to address an UI element from within scripts on views which were created with UIEditor?
how to change the background color of a button by script?
as always when I ask beginner questions: Thanks everyone for trying to help and spent your time on my problems! :)
Me again .... just got another idea :)
after I got so much help to solve my other mental problem with adding something to a taskpaper document, I now have another question.
is it possible to 'hijack' the 'done' function to do more then only rule out a task, adding '@done' with a date?
would like to add some more when I check out a task in taskpaper like get the content of that line and do a search with it in Amazon or google.
would that be doable and if yes - how?
again, thanks very much for any input on this :)
Need to pick your brains again.
Trying to make a workflow for searching for a project name in a taskpaper document.
if project name already exists - add a new task under it (THAT part I have covered...)
if project name does not exist, move to end of document, add empty line, add project, empty line, add task (that is the 'driving me nuts' part :( ).
here my workflow so far:
the part after the 'end if' is actually just testing garbage.
tried 'move caret' to end of document + 'replace selected text' with the two variables as input.
tried 'select range' then 'move caret'+ 1, then 'replace selected text'.
now I tried that script which is currently in the workflow.
result of all my attempts: the new project name is never inserted and the new task is always inserted at the 2nd character in the existing document.
if 'project' name exists, then everything is fine. new task is added right after the existing project name.
final target is to have a WorkflowIOS workflow trigger this editorial workflow with handing over a section name (=project) and a book title (=task) to this editorial workflow.
if section (i.e. scifi) exists, then add the new book there, if section not exist, then add new section at end of document and add book under it.
THANKS a lot for any help! :)
after trying a lot on myself in addition with the fact that I am a total beginner to editorial and Python I am asking for your brains here.
thanks a lot in advance for wasting your time on my problems :)
want to start a workflow in which opens a CustomUI ('starting level') offering me several buttons for different functions. depending on which button I tap a CustomUI from the '2nd level' should be opened with functions.
'starting UI' should be close/in background and another UI displayed in the same workflow since I use global variables for storing information out of those UIs.
what I have so far
I can start the workflow and it displays the 'starting' UI.
After pressing a button for one of the 2nd level UIs nothing happened.
Tried to use 'DismissUI' command after pressing the button in 'starting' UI but then the complete workflow stops.
Guess I am just starting this whole issue the wrong way. Not sure.
So far I used workflow commands together with CustomUI and some small Python scripts in those UIs.
Any help highly appreciated! :)
Thanks a lot.
so far I tried to have one workflow for all. I am going to try to put the 2nd level UIs into sub-workflows.
How does the UIs interact?
I guess my biggest problem at the moment is to understand the dependencies within one workflow when CustomUIs are used.
Is the first CustomUI created/used the parent view for all other UIs used later in this same workflow? or are they all independent views with no overall parent view?
does the workflow itself create a parent view for all CustomUIs used in this workflow? if yes - how to access it to be able to browse the child views to be able to close one particular?
Questions over questions... :)
Hope I am not stressing your patience too much.
Again thanks for trying to help me and spending your time!
Thanks a lot!
Seems I have to spend some time on that :)
What I saw at a first glance is that you have a main function as one workflow step which then starts the examples.
Maybe you could point me to a scenario where you have that first workflow (WF) step opening an UI (UI 1). then press a button there which leads to an output of that first WF step. based on this output there is an IF... THEN next WF step from where I can start a 2nd UI (UI 2.x). my idea was to have 2 or 3 of those '2nd level' UIs (2.1, 2.2, 2.3 etc) in the overall WF which I want to run. depending on the button pressed from that first step (in UI 1) I either open UI 2.1 or 2.3 or .... I like to have UI 1 disappear and e.g. UI 2.2 appear.
that is my actual problem. I can start with UI 1 and then press a button there and the output on WF level is according to the pressed button. so the IF...THEN part works as well. but where to put the 'dismiss UI' command? after UI 1 finished? guess then the output would never reach the rest of my WF.
will scrutinize your example and I get better understanding. maybe my whole approach should be different.
I wanted to use as much of the pre-configured 'WF pieces' and as less Python code as possible to build the small 'app'. but maybe I have to build my 'app' from Python only which would be hard for me since I am a real novice there.
again thanks for your time on this.