Pseudo Icon states

Discuss and share scripts and script files...
admin
Site Admin
Posts: 66296
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Pseudo Icon states

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

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

Re: Pseudo Icon states

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

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

Re: Pseudo Icon states

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

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

Re: Pseudo Icon states

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

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

Re: Pseudo Icon states

Post by serendipity »

Updated earlier posts to reflect new SC ctbicon.

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

Re: Pseudo Icon states

Post 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")

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

Re: Pseudo Icon states

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

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

Re: Pseudo Icon states

Post by admin »

With rand()? Cool.

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

Re: Pseudo Icon states

Post 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
To see the attached files, you need to log into the forum.

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

Re: Pseudo Icon states

Post by admin »

LOL, great! :appl:

klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

Re: Pseudo Icon states

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

FluxTorpedoe
Posts: 906
Joined: 05 Oct 2011 13:15

Re: Pseudo Icon states

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

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

Re: Pseudo Icon states

Post by admin »

Not totally understood. What are the steps to get a non-refresh?

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

Re: Pseudo Icon states

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

FluxTorpedoe
Posts: 906
Joined: 05 Oct 2011 13:15

Re: Pseudo Icon states

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

Post Reply