Cosmetics -- status bar code request

Discuss and share scripts and script files...
tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Cosmetics -- status bar code request

Post 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"
Power-hungry user!!!

serendipity
Posts: 3358
Joined: 07 May 2007 18:14
Location: NJ/NY

Re: Cosmetics -- status bar code request

Post 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--;
  }

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Cosmetics -- status bar code request

Post by Stefan »

Cool serendipity 8)

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

PeterH
Posts: 2776
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Cosmetics -- status bar code request

Post 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?
W7(x64) SP1 German
( +WXP SP3 )

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Cosmetics -- status bar code request

Post 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 :shock: , 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... :roll:
Power-hungry user!!!

aurumdigitus
Posts: 1075
Joined: 30 May 2008 21:02
Location: Lake Erie

Re: Cosmetics -- status bar code request

Post 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. 8)

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: Cosmetics -- status bar code request

Post by tiago »

not doable?
Power-hungry user!!!

Muroph
Posts: 561
Joined: 21 Aug 2007 16:13

Re: Cosmetics -- status bar code request

Post by Muroph »

this was fun to make: :mrgreen:

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
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...

ventulla
Posts: 1
Joined: 18 Apr 2012 12:20

Re: Cosmetics -- status bar code request

Post 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
Last edited by ventulla on 21 Apr 2012 11:37, edited 1 time in total.

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Cosmetics -- status bar code request

Post 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.

Twisten
Posts: 204
Joined: 27 Apr 2008 10:30

Re: Cosmetics -- status bar code request

Post by Twisten »

Interesting, that post is so far of topic that your Indian name could probably be 'talking to bots' :mrgreen:

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Cosmetics -- status bar code request

Post by admin »

LOL :lol:

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Cosmetics -- status bar code request

Post by admin »

Twisten wrote:Interesting, that post is so far of topic that your Indian name could probably be 'talking to bots' :mrgreen:
What I'd like to know: How could that bot (any we had many in the past months) pass my anti-robot test? :?

Borut
Posts: 1412
Joined: 19 Oct 2010 19:29

Re: Cosmetics -- status bar code request

Post 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. :P
Win 10 Pro 64bit

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Cosmetics -- status bar code request

Post 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. :P
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.

Post Reply