About ||||| (pipe or vertical bars) In yad --form --button
During Working with yad --form displayed some |||(vertical bars) after clicked a button, what are this bars indicating & how I can STOP them to display?
Providing sample code, You can experience
yad --width=400 --height=200 --button="gtk-ok" --form --field="Click Down":LBL "echo Clicked" --field="Click HERE":BTN
Result output will be "
Clicked then
||
yad
add a comment |
During Working with yad --form displayed some |||(vertical bars) after clicked a button, what are this bars indicating & how I can STOP them to display?
Providing sample code, You can experience
yad --width=400 --height=200 --button="gtk-ok" --form --field="Click Down":LBL "echo Clicked" --field="Click HERE":BTN
Result output will be "
Clicked then
||
yad
add a comment |
During Working with yad --form displayed some |||(vertical bars) after clicked a button, what are this bars indicating & how I can STOP them to display?
Providing sample code, You can experience
yad --width=400 --height=200 --button="gtk-ok" --form --field="Click Down":LBL "echo Clicked" --field="Click HERE":BTN
Result output will be "
Clicked then
||
yad
During Working with yad --form displayed some |||(vertical bars) after clicked a button, what are this bars indicating & how I can STOP them to display?
Providing sample code, You can experience
yad --width=400 --height=200 --button="gtk-ok" --form --field="Click Down":LBL "echo Clicked" --field="Click HERE":BTN
Result output will be "
Clicked then
||
yad
yad
edited yesterday
Jeff Schaller
39k1053125
39k1053125
asked 2 days ago
AlphaCoder
543
543
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I cannot reproduce the situation you describe entirely, but I think you need to ask yourself what you want yad to do when a button is pressed, or, more specifically, how yad should communicate any user choice back to you, i.e. via an exit code or via information on standard output.
The option --button="gtk-ok" creates a button that is not tied to an exit code with which yad can exit and silently let you know that this particular button was pressed. Consequently, it seems, it will try to inform you via output on stdout (printing two default output separator characters). To prevent this, you could rephrase the option, e.g. like so:
--button="gtk-ok":1
which ties an exit code of 1 to pressing the OK button, and prevents further output. At the command prompt (or in a script), you can test this exit code, which is available as $?.
Importantly: note that the yad manpage indicates that the proper syntax for the `--button'-option is:
--button=BUTTON:ID
Add the dialog button. May be used multiply times. ID is an exit code or a command. (...)
So the option `--button="gtk-ok" seems to be syntactically incorrect.
To get the behaviour your describe, I had to change --field="Click Down":LBL "echo Clicked" into --field="Click Down":BTN "echo Clicked".
All in all, the following command works as expected on my system:
yad --width=400 --height=200 --button="gtk-ok":1 --form --field="Click Down":BTN "echo Clicked" --field="Click HERE":BTN
ozzy, as you said by set gtk-ok":1 ,I skipped ||||||(vertical bars), but when I set gtk-ok:2 again I got vertical bars, In my bash script yad comes 3 times continuously and interesting point is whenever gtk-ok:EVEN NUMBER then I got vertical bars. Is there any special relation with even number ?
– AlphaCoder
yesterday
I Just skipped All vertical bars by setting ODD NUMBERS, So Why EVEN?
– AlphaCoder
yesterday
@AlpaCoder In the yad manpage, under EXIT CODES, it says “Even exit code mean to print result, odd just return result”. So this behaviour is apparently by design.
– ozzy
yesterday
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492627%2fabout-pipe-or-vertical-bars-in-yad-form-button%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I cannot reproduce the situation you describe entirely, but I think you need to ask yourself what you want yad to do when a button is pressed, or, more specifically, how yad should communicate any user choice back to you, i.e. via an exit code or via information on standard output.
The option --button="gtk-ok" creates a button that is not tied to an exit code with which yad can exit and silently let you know that this particular button was pressed. Consequently, it seems, it will try to inform you via output on stdout (printing two default output separator characters). To prevent this, you could rephrase the option, e.g. like so:
--button="gtk-ok":1
which ties an exit code of 1 to pressing the OK button, and prevents further output. At the command prompt (or in a script), you can test this exit code, which is available as $?.
Importantly: note that the yad manpage indicates that the proper syntax for the `--button'-option is:
--button=BUTTON:ID
Add the dialog button. May be used multiply times. ID is an exit code or a command. (...)
So the option `--button="gtk-ok" seems to be syntactically incorrect.
To get the behaviour your describe, I had to change --field="Click Down":LBL "echo Clicked" into --field="Click Down":BTN "echo Clicked".
All in all, the following command works as expected on my system:
yad --width=400 --height=200 --button="gtk-ok":1 --form --field="Click Down":BTN "echo Clicked" --field="Click HERE":BTN
ozzy, as you said by set gtk-ok":1 ,I skipped ||||||(vertical bars), but when I set gtk-ok:2 again I got vertical bars, In my bash script yad comes 3 times continuously and interesting point is whenever gtk-ok:EVEN NUMBER then I got vertical bars. Is there any special relation with even number ?
– AlphaCoder
yesterday
I Just skipped All vertical bars by setting ODD NUMBERS, So Why EVEN?
– AlphaCoder
yesterday
@AlpaCoder In the yad manpage, under EXIT CODES, it says “Even exit code mean to print result, odd just return result”. So this behaviour is apparently by design.
– ozzy
yesterday
add a comment |
I cannot reproduce the situation you describe entirely, but I think you need to ask yourself what you want yad to do when a button is pressed, or, more specifically, how yad should communicate any user choice back to you, i.e. via an exit code or via information on standard output.
The option --button="gtk-ok" creates a button that is not tied to an exit code with which yad can exit and silently let you know that this particular button was pressed. Consequently, it seems, it will try to inform you via output on stdout (printing two default output separator characters). To prevent this, you could rephrase the option, e.g. like so:
--button="gtk-ok":1
which ties an exit code of 1 to pressing the OK button, and prevents further output. At the command prompt (or in a script), you can test this exit code, which is available as $?.
Importantly: note that the yad manpage indicates that the proper syntax for the `--button'-option is:
--button=BUTTON:ID
Add the dialog button. May be used multiply times. ID is an exit code or a command. (...)
So the option `--button="gtk-ok" seems to be syntactically incorrect.
To get the behaviour your describe, I had to change --field="Click Down":LBL "echo Clicked" into --field="Click Down":BTN "echo Clicked".
All in all, the following command works as expected on my system:
yad --width=400 --height=200 --button="gtk-ok":1 --form --field="Click Down":BTN "echo Clicked" --field="Click HERE":BTN
ozzy, as you said by set gtk-ok":1 ,I skipped ||||||(vertical bars), but when I set gtk-ok:2 again I got vertical bars, In my bash script yad comes 3 times continuously and interesting point is whenever gtk-ok:EVEN NUMBER then I got vertical bars. Is there any special relation with even number ?
– AlphaCoder
yesterday
I Just skipped All vertical bars by setting ODD NUMBERS, So Why EVEN?
– AlphaCoder
yesterday
@AlpaCoder In the yad manpage, under EXIT CODES, it says “Even exit code mean to print result, odd just return result”. So this behaviour is apparently by design.
– ozzy
yesterday
add a comment |
I cannot reproduce the situation you describe entirely, but I think you need to ask yourself what you want yad to do when a button is pressed, or, more specifically, how yad should communicate any user choice back to you, i.e. via an exit code or via information on standard output.
The option --button="gtk-ok" creates a button that is not tied to an exit code with which yad can exit and silently let you know that this particular button was pressed. Consequently, it seems, it will try to inform you via output on stdout (printing two default output separator characters). To prevent this, you could rephrase the option, e.g. like so:
--button="gtk-ok":1
which ties an exit code of 1 to pressing the OK button, and prevents further output. At the command prompt (or in a script), you can test this exit code, which is available as $?.
Importantly: note that the yad manpage indicates that the proper syntax for the `--button'-option is:
--button=BUTTON:ID
Add the dialog button. May be used multiply times. ID is an exit code or a command. (...)
So the option `--button="gtk-ok" seems to be syntactically incorrect.
To get the behaviour your describe, I had to change --field="Click Down":LBL "echo Clicked" into --field="Click Down":BTN "echo Clicked".
All in all, the following command works as expected on my system:
yad --width=400 --height=200 --button="gtk-ok":1 --form --field="Click Down":BTN "echo Clicked" --field="Click HERE":BTN
I cannot reproduce the situation you describe entirely, but I think you need to ask yourself what you want yad to do when a button is pressed, or, more specifically, how yad should communicate any user choice back to you, i.e. via an exit code or via information on standard output.
The option --button="gtk-ok" creates a button that is not tied to an exit code with which yad can exit and silently let you know that this particular button was pressed. Consequently, it seems, it will try to inform you via output on stdout (printing two default output separator characters). To prevent this, you could rephrase the option, e.g. like so:
--button="gtk-ok":1
which ties an exit code of 1 to pressing the OK button, and prevents further output. At the command prompt (or in a script), you can test this exit code, which is available as $?.
Importantly: note that the yad manpage indicates that the proper syntax for the `--button'-option is:
--button=BUTTON:ID
Add the dialog button. May be used multiply times. ID is an exit code or a command. (...)
So the option `--button="gtk-ok" seems to be syntactically incorrect.
To get the behaviour your describe, I had to change --field="Click Down":LBL "echo Clicked" into --field="Click Down":BTN "echo Clicked".
All in all, the following command works as expected on my system:
yad --width=400 --height=200 --button="gtk-ok":1 --form --field="Click Down":BTN "echo Clicked" --field="Click HERE":BTN
edited yesterday
answered yesterday
ozzy
3544
3544
ozzy, as you said by set gtk-ok":1 ,I skipped ||||||(vertical bars), but when I set gtk-ok:2 again I got vertical bars, In my bash script yad comes 3 times continuously and interesting point is whenever gtk-ok:EVEN NUMBER then I got vertical bars. Is there any special relation with even number ?
– AlphaCoder
yesterday
I Just skipped All vertical bars by setting ODD NUMBERS, So Why EVEN?
– AlphaCoder
yesterday
@AlpaCoder In the yad manpage, under EXIT CODES, it says “Even exit code mean to print result, odd just return result”. So this behaviour is apparently by design.
– ozzy
yesterday
add a comment |
ozzy, as you said by set gtk-ok":1 ,I skipped ||||||(vertical bars), but when I set gtk-ok:2 again I got vertical bars, In my bash script yad comes 3 times continuously and interesting point is whenever gtk-ok:EVEN NUMBER then I got vertical bars. Is there any special relation with even number ?
– AlphaCoder
yesterday
I Just skipped All vertical bars by setting ODD NUMBERS, So Why EVEN?
– AlphaCoder
yesterday
@AlpaCoder In the yad manpage, under EXIT CODES, it says “Even exit code mean to print result, odd just return result”. So this behaviour is apparently by design.
– ozzy
yesterday
ozzy, as you said by set gtk-ok":1 ,I skipped ||||||(vertical bars), but when I set gtk-ok:2 again I got vertical bars, In my bash script yad comes 3 times continuously and interesting point is whenever gtk-ok:EVEN NUMBER then I got vertical bars. Is there any special relation with even number ?
– AlphaCoder
yesterday
ozzy, as you said by set gtk-ok":1 ,I skipped ||||||(vertical bars), but when I set gtk-ok:2 again I got vertical bars, In my bash script yad comes 3 times continuously and interesting point is whenever gtk-ok:EVEN NUMBER then I got vertical bars. Is there any special relation with even number ?
– AlphaCoder
yesterday
I Just skipped All vertical bars by setting ODD NUMBERS, So Why EVEN?
– AlphaCoder
yesterday
I Just skipped All vertical bars by setting ODD NUMBERS, So Why EVEN?
– AlphaCoder
yesterday
@AlpaCoder In the yad manpage, under EXIT CODES, it says “Even exit code mean to print result, odd just return result”. So this behaviour is apparently by design.
– ozzy
yesterday
@AlpaCoder In the yad manpage, under EXIT CODES, it says “Even exit code mean to print result, odd just return result”. So this behaviour is apparently by design.
– ozzy
yesterday
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f492627%2fabout-pipe-or-vertical-bars-in-yad-form-button%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown