Page 2 of 3

Re: Pseudo Icon states

Posted: 19 May 2013 20:08
by admin
Yes, slow. (I had forgotten the other meaning of lame :)) But right now it seems to be fast as ever again. So all cool. :biggrin:

Re: Pseudo Icon states

Posted: 19 May 2013 20:13
by serendipity
admin wrote:Yes, slow. (I had forgotten the other meaning of lame :)) But right now it seems to be fast as ever again. So all cool. :biggrin:
Yes, it was really crawling for some 30 minutes. But its back on track!
Thanks again for new SC, so much easier now.
Alas, my dirty trick did not last long. :lol:

Re: Pseudo Icon states

Posted: 19 May 2013 20:16
by admin
But damnit, your dirty trick lead to a cool new functionality. I find myself clicking on the cloud button like a madman while drooling onto the keyboard.

Re: Pseudo Icon states

Posted: 19 May 2013 20:22
by serendipity
admin wrote:But damnit, your dirty trick lead to a cool new functionality. I find myself clicking on the cloud button like a madman while drooling onto the keyboard.
:lol:, what are Weekends for? Playing with XY. :mrgreen:

Re: Pseudo Icon states

Posted: 19 May 2013 20:52
by serendipity
Updated earlier posts to reflect new SC ctbicon.

Re: Pseudo Icon states

Posted: 19 May 2013 21:30
by admin
If you like counting things (e.g. the numbers of coffees you had while writing this script), here's two scripts (left click and right click of a CTB):

Code: Select all

// increment
  $n = substr(ctbicon(), 6);
  $n = trim(gettoken($n, 1, ">"));
  $n++;
  ctbicon("label: $n >554433,ffffee");

Code: Select all

"Reset Counter" ctbicon("label: 0 >554433,ffffee")

Re: Pseudo Icon states

Posted: 19 May 2013 21:42
by serendipity
admin wrote:If you like counting things (e.g. the numbers of coffees you had while writing this script), here's two scripts (left click and right click of a CTB):

Code: Select all

// increment
  $n = substr(ctbicon(), 6);
  $n = trim(gettoken($n, 1, ">"));
  $n++;
  ctbicon("label: $n >554433,ffffee");

Code: Select all

"Reset Counter" ctbicon("label: 0 >554433,ffffee")
Nice! :biggrin:

I just made myself a dilemma icon. Basically a thumbs up or down to help me decide something.

Re: Pseudo Icon states

Posted: 19 May 2013 21:47
by admin
With rand()? Cool.

Re: Pseudo Icon states

Posted: 19 May 2013 22:13
by serendipity
admin wrote:With rand()? Cool.
Yes, this:

Code: Select all

  $now=now("msecs");
  $rand=rand(0, 100); 
  $total=5000;//Shuffle up down for 5 seconds (aka suspense)
  
  WHILE($now+$total > now("msecs")){
    ctbicon("t-up.ico");
    wait(200);
    ctbicon("t-dn.ico");
    wait(200);
  }

   IF($rand < 50){
   ctbicon("t-up.ico");
   }
   ELSE{
   ctbicon("t-dn.ico");
  }
Again, Fatcow.
Thumbs.png
thumbs.zip

Re: Pseudo Icon states

Posted: 19 May 2013 22:57
by admin
LOL, great! :appl:

Re: Pseudo Icon states

Posted: 20 May 2013 02:03
by klownboy
When you asked about the forum being "lame" earlier, I too thought you were referring to it being full of fluff or maybe lacking substance. Some fluff now and then is nice though. The visual part of the experience is important too. Look at the all the chatter that CFI created.

And by the way, this ctbicon stuff is great. :appl:

Re: Pseudo Icon states

Posted: 20 May 2013 08:43
by FluxTorpedoe
Nice tool this ctbicon(), much easier than managing several ctb via toolbar()! :)

Now that we can see states on toolbar icons, I'm hijacking this thread a bit to ask how we could change/see states on menu icons? (apart from creating dynamic menus)
Because renaming or copying an icon to a previously existing one doesn't refresh its display, even after a "Refresh icons" (#502) (at least under WinXP).

e.g. Overwriting "ShowHiddenItems.ico" with "ShowHiddenItems_OFF.ico", whatever the method, keeps showing the old "ShowHiddenItems.ico" until XY is restarted.

Is there already a way to force a refresh on cached menu icons - or a workaround?

Thanks

PS: Cool ideas about the new buttons!
Wondering about making a dice CTB now... 8)
Soon we'll play poker on our XY toolbar!

Re: Pseudo Icon states

Posted: 20 May 2013 08:48
by admin
Not totally understood. What are the steps to get a non-refresh?

Re: Pseudo Icon states

Posted: 20 May 2013 09:22
by admin
Sorry, but could not resist to make a simpler version of the thumbs toggler... :whistle:

Code: Select all

//thumbs
  $i = 0;
  $rounds = rand(24, 25);
  while ($i < $rounds) {
    $icon = ($icon == "t-up.ico")? "t-dn.ico":"t-up.ico";
    ctbicon($icon);
    wait 200;
    $i++;
  }

Re: Pseudo Icon states

Posted: 20 May 2013 09:39
by FluxTorpedoe
admin wrote:Not totally understood. What are the steps to get a non-refresh?

Code: Select all

delete 0, 0, "<xyicons>\Test.ico";
copyitem "<xyicons>\Test_ON.ico", "<xyicons>\Test.ico";
:arrow: "Test.ico" is displayed in its original (previous) state, whereas it should look like "Test_ON.ico". Refreshing list or icons doesn't refresh it, only a restart of XY does.

Alternately, open any icon in an editor, update it and save it: it won't be refreshed in XY (at least here under WinXP - but I may be missing a tweak or setting).
Quite noticeable when updating icons used by CFI, cause it's responsible for a lot of XY restarts... ;)