zivallh wrote: ↑November 15th, 2020, 6:22 am
Just check if my code is right,
There is a small inadvertance: when you are executing an ActionList of an ActionTimer plugin measure, is a good idea to stop the previously ran list, otherwise you get error messages in log. For instance you have the following MouseOverAction and MouseLeaveAction options on the [Background] meter:
Code: Select all
[Background]
...
MouseOverAction=[!CommandMeasure "MeasureFade" "Execute 1"][!CommandMeasure "MeasureFade2" "Execute 1"]
MouseLeaveAction=[!CommandMeasure "MeasureFade" "Execute 2"][!CommandMeasure "MeasureFade2" "Execute 2"]
If you check the log, you'll see that with these option, if you're hovering and leaving quickly more times one after the other the [Background] meter with the mouse, you get error messages in log. To avoid this, you have to add options to stop the measure(s) if you're for example leaving the meter before the execution of a list is finished. You can do this extremely simply, for instance this way:
Code: Select all
[Background]
...
MouseOverAction=[!CommandMeasure "MeasureFade" "Execute 1"][!CommandMeasure "MeasureFade" "Stop 2"][!CommandMeasure "MeasureFade2" "Execute 1"][!CommandMeasure "MeasureFade2" "Stop 2"]
MouseLeaveAction=[!CommandMeasure "MeasureFade" "Stop 1"][!CommandMeasure "MeasureFade" "Execute 2"][!CommandMeasure "MeasureFade2" "Stop 1"][!CommandMeasure "MeasureFade2" "Execute 2"]
See the newly added !CommandMeasure bangs, with the
Stop X parameters. If you're appling the above options, you get no errors in the log, no matter how quickly are you hovering the mouse over / leaving the meter.
zivallh wrote: ↑November 15th, 2020, 6:22 am
and if you can make it not load the picture after refresh
Yep, replace the FinishAction option of the [Webparser] measure with the following one:
FinishAction=[!UpdateMeasure "MeasureCount"][!Delay "2000"][!SetOption Webparser FinishAction """[!UpdateMeasure "MeasureCount"][!SetWallpaper "DownloadFile\Unsplash.jpg"]"""]
With this option, the first time after you refresh / load of the skin, the FinishAction doesn't have a !SetWallpaper bang, which could set the wallpaper, but 2 seconds (due to the
[!Delay "2000"] bang of the above option) after you get executed the measure, the FinishAction option is replaced by another which has the !SetWallpaper bang as well. After this moment (so from the second update of the measure), everytime the measure is updated you get set a new wallpaper.
Not too advantageus, because you never know what wallpaper will you set when you click the "button". I'd modify the code in a way to display the last downloaded image in a way, then apply it only if you like the image.