Yad: capture output of yad 2 columns fields

For discussions about programming, and for programming questions and advice


Moderator: Forum moderators

Post Reply
arivas_2005
Posts: 37
Joined: Mon Oct 05, 2020 3:48 am

Yad: capture output of yad 2 columns fields

Post by arivas_2005 »

my regards
missing using code.
I need to capture the output of the following line

Code: Select all

capture=`yad --columns=2 --no-buttons \
  --form --field="obs:TXT" "Abce and more" --field="obs2:TXT" "Mn and more" \
  --field="pass 1:CHK" '' --field="pass 2:CHK" ''  \
  --field=Buton1:FBTN '' --field=boton2:FBTN '' \
  --field=boton3:FBTN '' --field=boton4:FBTN ''`&  

I found her in
http://li969-200.members.linode.com/pup ... 6dfe3935a9
and I modified it a little

I experimented with
capture = `yad ..`
capture = $(yad ..)
but nothing
I experimented with
variable = `yad ..`
variable = $ (yad ..)
but nothing
I need to make a small data capture form with 2 txt and 2 chk and 4 buttons
process
fill the two txt
check 1 or 2 CHK
click on one of the 4 buttons and exit
(capture the form data)
my thanks for the collaboration you can give me

step
Posts: 516
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 50 times
Been thanked: 184 times
Contact:

Re: capture output of yad 2 columns fields

Post by step »

It needs an OK button.
CHK is of type boolean: TRUE or FALSE.
The command must not end with &.

Code: Select all

bash-4.4# capture="`yad --columns=2 \
  --form --field="obs:TXT" "Abce and more" --field="obs2:TXT" "Mn and more" \
  --field="pass 1:CHK" FALSE --field="pass 2:CHK" FALSE \
  --field=Buton1:FBTN '' --field=boton2:FBTN '' \
  --field=boton3:FBTN '' --field=boton4:FBTN ''`"
bash-4.4# echo "$capture"
Abce and more|Mn and more|FALSE|FALSE|||||
arivas_2005
Posts: 37
Joined: Mon Oct 05, 2020 3:48 am

Re: capture output of yad 2 columns fields

Post by arivas_2005 »

Thanks for the support User
by affinity with the code (the question)
Hopefully you can tell me something about the cases in which I should use.

Code: Select all

capture= "`  code `"
capture=` code `
capture=$(code)
capture=($(code)) 
and some other mode of capture
(for educational purposes)
(sorry for English, I use google translator)
Post Reply

Return to “Programming”