aboutsummaryrefslogtreecommitdiffstats
path: root/doc/scriptexamples
diff options
context:
space:
mode:
Diffstat (limited to 'doc/scriptexamples')
-rw-r--r--doc/scriptexamples/class1.kvs2
-rw-r--r--doc/scriptexamples/exprtest.kvs2
-rw-r--r--doc/scriptexamples/mail.kvs4
-rw-r--r--doc/scriptexamples/minesweeper.kvs4
-rw-r--r--doc/scriptexamples/mp3_kdemediaplayers.kvs78
-rw-r--r--doc/scriptexamples/mp3info.kvs32
-rw-r--r--doc/scriptexamples/objectsdumptree.kvs20
7 files changed, 71 insertions, 71 deletions
diff --git a/doc/scriptexamples/class1.kvs b/doc/scriptexamples/class1.kvs
index 6098000dd..0d4e8fc08 100644
--- a/doc/scriptexamples/class1.kvs
+++ b/doc/scriptexamples/class1.kvs
@@ -32,7 +32,7 @@ class (B,A)
class (C,B)
{
- # Derived from B : inherits $B::virtual and
+ # Derived from B : inherits $B::virtual and
# overrides $B::function (that is $A::function)
function
{
diff --git a/doc/scriptexamples/exprtest.kvs b/doc/scriptexamples/exprtest.kvs
index c07d199d5..893631f59 100644
--- a/doc/scriptexamples/exprtest.kvs
+++ b/doc/scriptexamples/exprtest.kvs
@@ -2,7 +2,7 @@
alias(exprtest)
{
- %txt = "Testing expression:" $0;
+ %txt = "Testing expression:" $0;
%ret = ${ eval "return \$(" $0 ")"; }
if(%ret != $1)
diff --git a/doc/scriptexamples/mail.kvs b/doc/scriptexamples/mail.kvs
index 94fb70e23..13ab836a6 100644
--- a/doc/scriptexamples/mail.kvs
+++ b/doc/scriptexamples/mail.kvs
@@ -33,14 +33,14 @@ exec -x -k=60000 -t -e ("telnet my.mail.server.com 25")
# Returning an empty string does not write to stdin
return
}
-
+
if($0 == "stderr")
{
# This is our stderr handler.. just in case something goes wrong
echo "[stderr] $1"
return
}
-
+
if($0 == "terminated")
{
echo "[process terminated]"
diff --git a/doc/scriptexamples/minesweeper.kvs b/doc/scriptexamples/minesweeper.kvs
index 24f3b0cb0..467bda862 100644
--- a/doc/scriptexamples/minesweeper.kvs
+++ b/doc/scriptexamples/minesweeper.kvs
@@ -61,7 +61,7 @@ class(minesweeper,widget)
{
%row = $rand($($$->%rows - 1))
%col = $rand($($$->%cols - 1))
- }
+ }
$$->%label{%row,%col}->%bIsMine = 1
# increase the mine count for the adiacent cells
if(%row > 0)
@@ -127,5 +127,5 @@ alias(mines)
{
%m = $new(minesweeper)
%m->$show()
-
+
}
diff --git a/doc/scriptexamples/mp3_kdemediaplayers.kvs b/doc/scriptexamples/mp3_kdemediaplayers.kvs
index 98be29e93..c46a08ade 100644
--- a/doc/scriptexamples/mp3_kdemediaplayers.kvs
+++ b/doc/scriptexamples/mp3_kdemediaplayers.kvs
@@ -18,7 +18,7 @@
%Mtime++
%Stime-=60
}
-
+
%Htime=0
while(%Mtime > 59) {
@@ -36,32 +36,32 @@
}
-
+
if (%Htime > 0)
- %Ctime = $str.append %Htime:%Mtime:%Stime
-
-
+ %Ctime = $str.append %Htime:%Mtime:%Stime
+
+
- if (%Mtime > 0 && %Htime < 1)
+ if (%Mtime > 0 && %Htime < 1)
%Ctime = $str.append %Mtime:%Stime
-
-
-
- if (%Mtime < 1 && %Htime < 1)
+
+
+
+ if (%Mtime < 1 && %Htime < 1)
%Ctime = %Stime
-
+
me muckelt grad [$mp3player.gettitle @ %Xmms_play - $($mp3player.getrate/1000) kbps - $($mp3player.getfreq/1000) kHz - seit: %Ctime (h:m:s)]
- }
+ }
else if(%Postfix == %Cda_postfix) {
me muckelt grad [$mp3player.gettitle - Audio CD]
- }
+ }
+
-
else {
-
+
if ($mp3player.getchannels == 2)
%Channels = Stereo
else
@@ -82,9 +82,9 @@
%size = $file.size("$mp3player.getfilename")
%msize = $(%size / (1024*1024))
%ksize = $((%size - ((%size / (1024*1024)) * 1024 * 1024) - (%size % 1024)) / 1024)
-
+
%bsize = $(%size % 1024)
-
+
if(%msize > 0)
{
%size = "%msize MByte %ksize KByte"
@@ -97,7 +97,7 @@
}
}
if ($mp3player.isplaying){
-
+
if($mp3player.getmp3tag_artist != ""){
%outartist= $mp3player.getmp3tag_artist
}
@@ -116,41 +116,41 @@
else {
if (%outtitle == ""){
%outartisttitle="["%outartist"]"
- }
+ }
else {
%outartisttitle="["%outtitle"]"
}
}
-
- if (mp3player.getmp3tag_album !=""){
+
+ if (mp3player.getmp3tag_album !=""){
%outalbum =" - [Album: "$mp3player.getmp3tag_album"]"
- }
+ }
else {
%outalbum =""
- }
-
- if (mp3player.getmp3tag_genre !=""){
+ }
+
+ if (mp3player.getmp3tag_genre !=""){
%outgenre =" - [Genre: "$mp3player.getmp3tag_genre"]"
- }
+ }
else {
%outgenre =""
- }
-
+ }
+
- if ($mp3player.getmp3tag_comment !=""){
+ if ($mp3player.getmp3tag_comment !=""){
%outcomment =" - [Comment: "$mp3player.getmp3tag_comment"]"
}
else {
%outcomment=""
}
- if ($mp3player.getmp3tag_version != ""){
+ if ($mp3player.getmp3tag_version != ""){
%outmp3tagversion = "MPEG"$mp3player.getmp3tag_version
}
else {
%outmp3tagversion=""
}
- if ($mp3player.getmp3tag_layer != ""){
+ if ($mp3player.getmp3tag_layer != ""){
%outmp3taglayer = "Layer"$mp3player.getmp3tag_layer
}
else {
@@ -169,35 +169,35 @@
}
}
-
-
+
+
%rate = $($mp3player.getrate/1000)
- if (%rate != 0){
+ if (%rate != 0){
%outrate=" - ["%rate KBps"]"
}
else {
%outrate=""
}
- if (%Frequ2 != 0){
+ if (%Frequ2 != 0){
%outfrequ2=" - ["%Frequ2 KHz"]"
- }
+ }
else {
%outfrequ2=""
}
- if (%Channels != 0){
+ if (%Channels != 0){
%outchannels = " - ["%Channels"]"
}
else {
%outchannels=""
}
- if (%size != 0){
+ if (%size != 0){
%outsize = " - ["%size"]"
}
else {
%outsize=""
}
- me muckelt grad %outartisttitle %outalbum %outgenre %outcomment %outmp3tagversionlayer %outrate %outfrequ2 - [%mins:%secs1%secs2 min of %tmins:%tsecs1%tsecs2 min] - [Player: $mp3player.getplayer ]
+ me muckelt grad %outartisttitle %outalbum %outgenre %outcomment %outmp3tagversionlayer %outrate %outfrequ2 - [%mins:%secs1%secs2 min of %tmins:%tsecs1%tsecs2 min] - [Player: $mp3player.getplayer ]
}
}
if (!$mp3player.isplaying){
diff --git a/doc/scriptexamples/mp3info.kvs b/doc/scriptexamples/mp3info.kvs
index b53241456..d32dcbf38 100644
--- a/doc/scriptexamples/mp3info.kvs
+++ b/doc/scriptexamples/mp3info.kvs
@@ -16,7 +16,7 @@
%Mtime++
%Stime-=60
}
-
+
%Htime=0
while(%Mtime > 59) {
@@ -34,20 +34,20 @@
}
-
+
if (%Htime > 0)
- %Ctime = $str.append %Htime:%Mtime:%Stime
-
-
+ %Ctime = $str.append %Htime:%Mtime:%Stime
+
- if (%Mtime > 0 && %Htime < 1)
+
+ if (%Mtime > 0 && %Htime < 1)
%Ctime = $str.append %Mtime:%Stime
-
-
-
- if (%Mtime < 1 && %Htime < 1)
+
+
+
+ if (%Mtime < 1 && %Htime < 1)
%Ctime = %Stime
-
+
me has currently [$mp3player.gettitle @ %Xmms_play - $($mp3player.getrate/1000) kbps - $($mp3player.getfreq/1000) kHz - seit: %Ctime (h:m:s)]
@@ -55,13 +55,13 @@
else if(%Postfix == %Cda_postfix) {
- %Xmms_play=$mp3player.getfilename;
+ %Xmms_play=$mp3player.getfilename;
}
-
+
else {
-
+
if ($mp3player.getchannels == 2) {
%Channels = Stereo
}
@@ -84,9 +84,9 @@
%size = $file.size("$mp3player.getfilename")
%msize = $(%size / (1024*1024))
%ksize = $((%size - ((%size / (1024*1024)) * 1024 * 1024) - (%size % 1024)) / 1024)
-
+
%bsize = $(%size % 1024)
-
+
if(%msize > 0){
%size = "%msize MByte %ksize KByte"
diff --git a/doc/scriptexamples/objectsdumptree.kvs b/doc/scriptexamples/objectsdumptree.kvs
index 336bfdf12..a74cad825 100644
--- a/doc/scriptexamples/objectsdumptree.kvs
+++ b/doc/scriptexamples/objectsdumptree.kvs
@@ -3,8 +3,8 @@ alias(dump)
# Objects Tree Dump script
# Written by Noldor & Grifisx (2005)
# This script allow you to see all kvirc's interface objects in a listview.
- # It's just an alias, install it and "/dump" =) EnjoY!
-
+ # It's just an alias, install it and "/dump" =) EnjoY!
+
class (mylistview,listview)
{
constructor
@@ -32,7 +32,7 @@ alias(dump)
%tmp_property=$new(listviewitem,$$->$parent->%property)
$$->$parent->%property->$setTooltip(%gerarchia)
%ger=$str.replace(%gerarchia,",","->")
- eval \%Wrapper\=\$new\(wrapper,0,test,%ger\)
+ eval \%Wrapper\=\$new\(wrapper,0,test,%ger\)
$$->$parent->%line_ger->$setText(%ger)
if (!%Wrapper)
{
@@ -64,7 +64,7 @@ alias(dump)
@%list_name[%i]->$setRenameEnabled(2)
%i++;
}
-
+
}
killPropertyChildren()
{
@@ -82,21 +82,21 @@ alias(dump)
%value=$2
eval \%Wrapper\-\>\$setProperty\(%property\,%value\)
}
-
+
}
class (dump,widget)
{
constructor
- {
+ {
%Flag=0
@$resize(800,600)
@%tree[]=$str.split("\|",$objects.dump(0))
- @$setCaption("Kvir Objects Dump")
+ @$setCaption("Kvir Objects Dump")
@%lay=$new(layout,$$)
@%dump=$new(mylistview,$$)
- @%tree=$new(object)
+ @%tree=$new(object)
@%property=$new(listview,$$)
-
+
privateimpl(@%property,itemRenamedEvent)
{
$$->$parent->%dump->$itemRenamed($0,$1,$2)
@@ -107,7 +107,7 @@ alias(dump)
@%dump->$addcolumn("Kvirc Widget Objects Tree",300)
@%dump->$setRootIsDecorated(1)
@%lay->$addwidget(@%dump,0,0)
- @%lay->$addwidget(@%property,0,1)
+ @%lay->$addwidget(@%property,0,1)
@%line_find=$new(lineedit,$$)
@%line_ger=$new(lineedit,$$)
@%lay->$addwidget(@%line_find,1,0)