XWidgetSoft Forum
https://www.bbs.xwidget.com/

show/hide widget in Xwidget cmd line
https://www.bbs.xwidget.com/viewtopic.php?f=7&t=5077
Page 1 of 1

Author:  hamid [ September 30th, 2014, 5:05 pm ]
Post subject:  show/hide widget in Xwidget cmd line

Quote:
[Update log]
v1.92 2014-9-2
Add: XWidget.exe support cmd line to Show/Hide widget by widget's FolderName: showWidget:folderName, hideWidget:foderName, showHideWidget:folderName. etc: "d:\soft\xwidget\xwidget.exe hidewidget:htchome"

1. is it support show/hide of multiple widgets in one command?
if so then how?

2. is there any command available that can be used in code to do show/hide on other widgets (like msg() but without adding [OnMsg] event on other widget)

> i mean a command that execute inside Xwidget, without need of start another process


-------
currently:
i'm using a loop to show/hide each widget by cmd line,
but this way there will be some problems:

1. it will start too many processes,

2. sometimes one of the processes get high on cpu Usage and hangs, and Xwidget will be hanged until i [EndTask] that process, then all the others will do correctly and Xwidget get back working,

Author:  Tony [ October 1st, 2014, 3:42 am ]
Post subject:  Re: show/hide widget in Xwidget cmd line

Hi Hamid,
You can uses cmd line "msg" to batch show/hide multiple widgets in one command, for excample will send msg to all widget with "aaabbb":
d:\soft\xwidget\xwidget.exe msg:|aaabbb

if you need send msg to some widget with a folderName excample "eker_note", then uses:
d:\soft\xwidget\xwidget.exe msg:eker_note|aaabbb


Tony


hamid wrote:
Quote:
[Update log]
v1.92 2014-9-2
Add: XWidget.exe support cmd line to Show/Hide widget by widget's FolderName: showWidget:folderName, hideWidget:foderName, showHideWidget:folderName. etc: "d:\soft\xwidget\xwidget.exe hidewidget:htchome"

1. is it support show/hide of multiple widgets in one command?
if so then how?

2. is there any command available that can be used in code to do show/hide on other widgets (like msg() but without adding [OnMsg] event on other widget)

> i mean a command that execute inside Xwidget, without need of start another process


-------
currently:
i'm using a loop to show/hide each widget by cmd line,
but this way there will be some problems:

1. it will start too many processes,

2. sometimes one of the processes get high on cpu Usage and hangs, and Xwidget will be hanged until i [EndTask] that process, then all the others will do correctly and Xwidget get back working,

Author:  hamid [ October 1st, 2014, 9:40 am ]
Post subject:  Re: show/hide widget in Xwidget cmd line

thanks for the info Tony,
but still i didn't find the answer,

i mean to have 2 or more folder name in one command,
is there anyway to separate folder names in one command?

for example:
Code:
"d:\soft\xwidget\xwidget.exe hidewidget:netmeter,clock,calendar,sysinfo"

Author:  meme [ October 4th, 2014, 8:50 pm ]
Post subject:  Re: show/hide widget in Xwidget cmd line

Hi hamid
I can not try it because I am not using the latest version but did you try, in a function
run("c:\pathto\xwidget\xwidget.exe hideWidget:folder1name|widget1name");
run("c:\pathto\xwidget\xwidget.exe hideWidget:folder2name|widget2name");
run("c:\pathto\xwidget\xwidget.exe hideWidget:folder3name|widget3name");
etc.

Or is this what you mean by
Quote:
i'm using a loop to show/hide each widget by cmd line,

Author:  hamid [ October 5th, 2014, 7:54 am ]
Post subject:  Re: show/hide widget in Xwidget cmd line

meme wrote:
Or is this what you mean by
Quote:
i'm using a loop to show/hide each widget by cmd line,

yes, i'm using same way but with Open2("","") function,
and it will have these problems:
Quote:
but this way there will be some problems:

1. it will start too many processes,

2. sometimes one of the processes get high on cpu Usage and hangs, and Xwidget will be hanged until i [EndTask] that process, then all the others will do correctly and Xwidget get back working


also there is another problem:
3. on [showwidget] command, the opacity of widgets will be 100%, until i mouse over widget

Author:  Tony [ October 10th, 2014, 1:40 am ]
Post subject:  Re: show/hide widget in Xwidget cmd line

Hi Hamid,
You can uses cmd line "msg" to show/hide 2 or more widgets in one command, for excample will send msg to all widget with "hamidmsg_aaabbb":
d:\soft\xwidget\xwidget.exe msg:|hamidmsg_aaabbb

and then you can write script in your 2 or more widgets to get the msg text and check wether contain perfix "hamidmsg_" , if yes then do action.

etc pseudo-code:

function widgetOnMsg(msg){
if msg begin with "hamidmsg_" then {
do some action
}
}



hamid wrote:
thanks for the info Tony,
but still i didn't find the answer,

i mean to have 2 or more folder name in one command,
is there anyway to separate folder names in one command?

for example:
Code:
"d:\soft\xwidget\xwidget.exe hidewidget:netmeter,clock,calendar,sysinfo"

Author:  digigamer [ January 16th, 2015, 8:47 am ]
Post subject:  Re: show/hide widget in Xwidget cmd line

This pipe character '|' causes issues. It is used as a shell piping separator and thus is a reserved symbol.
This doesn't work. You MUST change that '|' to someting else

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/