Lastly, though it didn't work for me, is there syntax to cycle through ICL icon libraries? The above didn't work on the 2 ICL files I tested it on, so wondering if there was another way for AI to display in systray.

Share this post

Link to post

Share on other sites

Diana (Cda) 1

Diana (Cda) 1

If your calling Random(0, 100, 1), what happens if your file has less then 100 icons?

Random returns for example 99 and you file only has 98 icons then no icon is going to display.

<sigh> Didn't know that. My test one has only 15 icons. Actually, by accident I left one of the test script instances running and I did see an icon flash at one point then waited. 3 icons passed in total during that 45 seconds or so. In between just saw the AutoIt default systray icon. That's why it didn't seem to work.

I've come across more in the archives about those negative index numbers. The situation isn't as complicated as all the above would seem to indicate, thankfully <g>. This will work, if I could understand how to apply to the syntax the term "negative number". I understand the concept, but as always, the practical application eludes me. What I've tried I'll list below. I don't usually because I've always felt a little uncomfortable showing the total degree that my ineptitude in scripting can sometimes reach <g>. But a recent meanie showed me that it probably would be better to show it now than face how awful it feels to be slapped down <g>. Can't win either way, anyway, it seems <g>. Don't laugh, though, guys! You all know the terminology and stuff. I never had any of this growing up and I'm learning but only now am I seeing any sort of real impact on what I'm doing and I'm starting to go a little faster. I think I've finally reached that sort of "critical mass" type of point I've been waiting for but never seemed to get any closer to all these months! <lol>.

Firstly, however, this works:

TraySetIcon(@ScriptDir & "\Test.dll",6)

So I ascertained for sure that the procedure to create the DLL (that is, renaming the ICL icon library I created this morning to DLL) is a way to create what seem to be valid icon DLLs and that AutoIt will be able to read them. Okay. That hurdle crossed.

I tried modifying this,

TraySetIcon("Shell32.dll",Random(0,100,1))

to these, but didn't get results as with your checker script:

TraySetIcon("Shell32.dll",Random(-0,100,1)) -- though this one didn't make sense, what the heck, tried it anyway

TraySetIcon("Shell32.dll",Random(0,-100,1))

TraySetIcon("Shell32.dll",Random(0,100,-1))

Plus I stuck a negative or < in other places, which I won't show. You guys are probably laughing yourselves silly as it is . Anyway, no go.

I mean, as is typical for us newbies with the help file and interpreting, just where in he--, I mean heck, is this "negative index number" supposed to go?

I understand about the icon names vs. the index names. Makes sense. There are no examples for using a "negative index number", though. Not that I've been able to find through very extensive searching, at any rate. If the negative number could be clarified in terms of that line of syntax above, that would in all likelihood then show the DLL being cycled through correctly with no breaks.

-----------------------------------------------

On an aside, now that I know how to create icon DLLs and that they work with Windows and AutoIt, that's going to simplify matters tremendously. I have an AutoIt icon folder that currently houses 483 icons (I use this folder and subfolders as source icons for the entire hdd, not just AI). The subfolders, in particular, could be made into individual icon DLL files by catgory. I'm guessing that I could still add on to those icon DLL files as long as I keep the naming of the icons inside sequential so that even if a sort is done on the packed icons, that the previous icons will retain their position always. Important once scripts are all done and icon positions referenced.