Page 1 of 2
Cosmetics -- status bar code request
Posted: 14 Nov 2011 23:40
by tiago
It seems to be simple but it isn't at all. Not for me so far...
Is there anyone kind enough to please provide me a script which pops a message on status bar with a sliding effect from right to left composing letter after letter the final message?
frame 1: " T"
frame 15: " T "
frame 34: "T "
frame 35: "T h"
frame 49: "T h "
frame 68: "Th "
frame 69: "Th i"
...
frame X: "This is plain sample message"
Re: Cosmetics -- status bar code request
Posted: 15 Nov 2011 05:45
by serendipity
tiago wrote:It seems to be simple but it isn't at all. Not for me so far...
Is there anyone kind enough to please provide me a script which pops a message on status bar with a sliding effect from right to left composing letter after letter the final message?
frame 1: " T"
frame 15: " T "
frame 34: "T "
frame 35: "T h"
frame 49: "T h "
frame 68: "Th "
frame 69: "Th i"
...
frame X: "This is plain sample message"
Adjust $ms to your liking.
Code: Select all
$ms= 200;
$str=1;
$text= "This is plain sample message";
$len= strlen ($text);
while ($len>0){
$newtext = substr ($text, 0,$str);
status $newtext;
wait ($ms);
$str++;
$len--;
}
Re: Cosmetics -- status bar code request
Posted: 15 Nov 2011 08:10
by Stefan
Cool serendipity
I adjusted your code to be more like tiagos example:
T
T h
Th i
Thi s
Code: Select all
setting "AutoRefresh", 0; //don't disturb my status message during this script run
$ms= 400;
$str=1;
$text= "This is plain sample message";
$len= strlen ($text);
while ($len>0){
$newtext = substr ($text, 0,$str) . ' ' . substr ($text, $str, 1);
status $newtext;
wait ($ms);
$str++;
$len--;
}
wait 2000; //show it a little bit longer
Re: Cosmetics -- status bar code request
Posted: 15 Nov 2011 11:07
by PeterH
I couldn't resist - had to make a change:
Code: Select all
$ms= 400; // config time delay
$text= "This is plain sample message. Can it be longer? How much? Oh - quite a bit!";
$str=1;
$len= strlen ($text);
while ($str < $len){
$newtext = substr($text,0,$str).' '.substr($text,$str,1).' '.substr($text,$str+1,1)
.' '.substr($text,$str+2,1).' '.substr($text,$str+3,1).' '.substr($text,$str+4,1);
status $newtext;
wait ($ms);
$str++;
}
wait 2000; //show it a little bit longer
I think it's not too bad,
but:
there's something I don't understand! The number of blanc characters between the appended letters should become greater and greater - but it doesn't! And I can't imagine why!
Any idea?
Re: Cosmetics -- status bar code request
Posted: 15 Nov 2011 12:38
by tiago
I can't believe it, the forum removed all my formating and I haven't it saved anywhere!
Let's try again...
Code: Select all
frame 1: " T"
frame 15: " T "
frame 34: "T "
frame 35: "T h"
frame 49: "T h "
frame 68: "Th "
frame 69: "Th i"
The first time I counted each blank

, so pardon me if anything is wrong on the counting. But you got the idea. I originally posted as "quote" and "preview" removed the blanks so I removed the [/quote], now I guess I've done it right as preview shows it as intended.
append: ah much better! Thanks for the messages and hope you guys understand...

Re: Cosmetics -- status bar code request
Posted: 16 Nov 2011 21:20
by aurumdigitus
serendipity's opuscule in eleven lines is very handy to have in the "code armamentarium". Have always been a fan of audio feedback on task completion now the Status Bar can easily serve as a visual cue also.

Re: Cosmetics -- status bar code request
Posted: 18 Nov 2011 14:48
by tiago
not doable?
Re: Cosmetics -- status bar code request
Posted: 11 Feb 2012 06:33
by Muroph
this was fun to make:
Code: Select all
setting "AutoRefresh", 0;
$text="This is a test message";
$delay=5; // milisecs
$step=1; // >=1
$fall=-1; // type of "fall"
$spcmult=1; // >=1
$icon="";
$color="000000";
$done=0;
$len=strlen($text);
if($fall>=0){
$miss=$fall;}
elseif($fall==-1){
$miss=$len*$spcmult;}
while($done<$len){
$left=substr($text,0,$done);
$mid=substr($text,$done,1);
if("$mid"!=" "){
if($fall==-2){
$miss=round(($len-$done)*$spcmult);}
$count=0;
while($count<=$miss){
$spc=strrepeat(" ",$miss-$count);
$string=$left.$spc.$mid;
status $string,$color,$icon;
$count=$count+$step;
wait $delay;}}
$done++;}
status $text,$color,$icon;
options:
$text and
$delay are easy to understand.
$step is the number of spaces to move in each frame.
should be an
integer >=1.
$color and
$icon are arguments for the status command.
$spcmult adjusts the text padding by varying the number of spaces used (e.g. to compensate for non monospaced fonts).
value should be a
float point >=1.
$fall defines how the text moves (
use integers >=-2):
-2 --> keeps the total message lenght consntant, so the "fall" reduces in each cycle.
-1 --> the fall is constant and matches the text lenght
0 or greater --> absolute fall lenght. ignores $spcmult
Re: Cosmetics -- status bar code request
Posted: 20 Apr 2012 07:43
by ventulla
What cosmetics doesn't do animal testing in their products? I recently figure out in my cosmetics that Clinique, although it's dermatologically tested, doesn't put the saying "against animal testing" or so on its products. Besides Bodyshop, what else the cosmetic producers we consider concern to the animal life and thus deserved to be supported by animal lovers?
___________________________________
yahoo keyword tool ~
overture ~
traffic estimator ~
adwords traffic estimator
Re: Cosmetics -- status bar code request
Posted: 20 Apr 2012 09:11
by admin
ventulla wrote:What cosmetics doesn't do animal testing in their products? I recently figure out in my cosmetics that Clinique, although it's dermatologically tested, doesn't put the saying "against animal testing" or so on its products. Besides Bodyshop, what else the cosmetic producers we consider concern to the animal life and thus deserved to be supported by animal lovers?
An interesting question but only superficially related to XY's status bar.
Re: Cosmetics -- status bar code request
Posted: 20 Apr 2012 10:02
by Twisten
Interesting, that post is so far of topic that your Indian name could probably be 'talking to bots'

Re: Cosmetics -- status bar code request
Posted: 20 Apr 2012 10:03
by admin
LOL

Re: Cosmetics -- status bar code request
Posted: 20 Apr 2012 10:05
by admin
Twisten wrote:Interesting, that post is so far of topic that your Indian name could probably be 'talking to bots'

What I'd like to know: How could that bot (any we had many in the past months) pass my anti-robot test?

Re: Cosmetics -- status bar code request
Posted: 20 Apr 2012 10:45
by Borut
admin wrote:What I'd like to know: How could that bot (any we had many in the past months) pass my anti-robot test?

Most probably because your anti-robot is a robot too: it likely makes a word occurrence statistics and it concludes that it is "on topic", but it would need lots of AI backstage to compare
meanings of the same words in different contexts.

Re: Cosmetics -- status bar code request
Posted: 20 Apr 2012 11:12
by admin
Borut wrote:admin wrote:What I'd like to know: How could that bot (any we had many in the past months) pass my anti-robot test?

Most probably because your anti-robot is a robot too: it likely makes a word occurrence statistics and it concludes that it is "on topic", but it would need lots of AI backstage to compare
meanings of the same words in different contexts.

No, I mean to
register in the forum it has to pass a test ("Write this word backwards: OLLEH"). Easy for humans but not for robots.