It is currently April 19th, 2024, 7:28 am

outlook widgfet-- VBs creste ini

Get help with creating, editing & fixing problems with skins
scooterfrog
Posts: 22
Joined: September 26th, 2013, 6:59 pm

outlook widgfet-- VBs creste ini

Post by scooterfrog »

I have created a decent outlook schedule skin I will share the whole thnig later on.

ok I have created some vbs that opens outlook and created an skin ini file dynamically
then i want the skin to execute the script to alter (recreate the file) and refreshe it.
summary . the vbs opens a connection to outlook and loops through the calendar.
tests decide what will be written to an ini file.

the skin itself works perfectly (except running the vbs)
(displays correctly and the clock changes)

and the script itself works to create a good skin file.
if i double click on the script it create a valid skin file.

so if i double click on the vbs and then right click on the skin it updates
this should run the vbs script it is in the same directory as the ini file.

Code: Select all

[Measuretime]
Measure=Calc
Formula=(Measuretime %600) + 1
IfEqualValue=1
IfEqualAction=["Update Cal Dynamic Outlook.vbs]"
IfEqualAction=!Rainmeterrefresh
this is where i create the file it DOES create in the same directory as the vbs

Code: Select all

strCalFile  = "Outlook Dynamic Cal.ini"  ' Set Path to offline Calendar cache 
Set wshFSO  = CreateObject("Scripting.FileSystemObject")
strCalFile = wshFSO.GetAbsolutePathName("") & "\" & strCalFile
User avatar
LGP123
Posts: 60
Joined: November 5th, 2016, 12:15 pm

Re: outlook widgfet-- VBs creste ini

Post by LGP123 »

scooterfrog wrote: IfEqualAction=["Update Cal Dynamic Outlook.vbs]"
IfEqualAction=!Rainmeterrefresh

Well first, right here you have defined IfEqualAction twice so that the last one overwrite the first one.
Just fix this by doing it in a single line like this : IfEqualAction=["Update Cal Dynamic Outlook.vbs"][IfEqualAction=!Rainmeterrefresh]. (and you made a mistake with ["Update Cal Dynamic Outlook.vbs]", the quote should be inside :) )

Also I would suggest to replace the !Rainmeterrefresh bang by a !Refresh wich should do what you want while not updating all your skins.

Also If It doesn't work, try ["#CURRENTPATH#Update Cal Dynamic Outlook.vbs"].
scooterfrog
Posts: 22
Joined: September 26th, 2013, 6:59 pm

Re: outlook widget-- VBs creates ini

Post by scooterfrog »

LGP123 wrote:Well first, right here you have defined IfEqualAction twice so that the last one overwrite the first one.
Just fix this by doing it in a single line like this : IfEqualAction=["Update Cal Dynamic Outlook.vbs"][IfEqualAction=!Rainmeterrefresh]. (and you made a mistake with ["Update Cal Dynamic Outlook.vbs]", the quote should be inside :) )

Also I would suggest to replace the !Rainmeterrefresh bang by a !Refresh wich should do what you want while not updating all your skins.

Also If It doesn't work, try ["#CURRENTPATH#Update Cal Dynamic Outlook.vbs"].

wow thanks for the quick response.
the combination of both made the difference
i changed the vb to create the ini file like this.

Code: Select all

[Measuretime]
Measure=Calc
Formula=(Measuretime %600) + 1
IfEqualValue=1
IfEqualAction=["#CURRENTPATH#Update Cal Dynamic Outlook.vbs"][IfEqualAction=!refresh]
scooterfrog
Posts: 22
Joined: September 26th, 2013, 6:59 pm

Re: outlook widgfet-- VBs creste ini

Post by scooterfrog »

spoke too soon
the path part fixed.
refreshing the skin by right clicking does rebuild the ini file.
this part might not work.
IfEqualAction=["Update Cal Dynamic Outlook.vbs"][IfEqualAction=!Rainmeterrefresh]. (a
User avatar
balala
Rainmeter Sage
Posts: 16144
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: outlook widgfet-- VBs creste ini

Post by balala »

LGP123 wrote:Well first, right here you have defined IfEqualAction twice so that the last one overwrite the first one.
Just to be a bit more precise, in such cases the first occurrence of the option is executed, not the second one (so the second doesn't overwrite the first). In this case the IfEqualAction=["Update Cal Dynamic Outlook.vbs]" option would be executed (if there wouldn't be mistake), while IfEqualAction=!Rainmeterrefresh wouldn't be.
But as you said well, there are a few mistakes:
  • The quote indeed should have to be placed inside the brackets (I think already fixed).
  • Using the !Rainmeterrefresh bang isn't finally a big mistakes, because although this form of the bang is deprecated, it still work (for backward compatibility). But yes, in fact it should have to be modified to !Refresh.
  • scooterfrog wrote:this part might not work.
    IfEqualAction=["Update Cal Dynamic Outlook.vbs"][IfEqualAction=!Rainmeterrefresh]. (a
    Obviously, because in such cases the IfEqualAction= should have to be removed and just the !Rainmeterrefresh (or even better !Refresh) bang should have to be kept: IfEqualAction=["#CURRENTPATH#Update Cal Dynamic Outlook.vbs"][!Refresh] (or IfEqualAction=["Update Cal Dynamic Outlook.vbs"][!Refresh]).