why doesn't my scripts gets refreshed??
from
Stardock Forums
Hi,
i have a main page on my desktop which sets the path of en axternal reference in the comments of my object "EFB clock"
-> If i check that in properties it really get changed...
-> but the other objects using this pat as a ref doesn't handle this unless i manually disable/enable the script...
What can i do about this? can I restart an objects script from another object's script?
my code of the button which doesn't update
Note: I allready checked if it got the (efb clock) comment correctly by writing that to ("Submenu Title Text").text which works and makes it completly understandable for me...
i have a main page on my desktop which sets the path of en axternal reference in the comments of my object "EFB clock"
-> If i check that in properties it really get changed...
-> but the other objects using this pat as a ref doesn't handle this unless i manually disable/enable the script...
What can i do about this? can I restart an objects script from another object's script?
my code of the button which doesn't update
Code: vbscript
- ' VBScript "Include" routine
- Sub Include(sInstFile)
- On Error Resume Next
- Dim oFSO, f, s
- Set oFSO = CreateObject("Scripting.FileSystemObject")
- If oFSO.FileExists(sInstFile) Then
- Set f = oFSO.OpenTextFile(sInstFile)
- s = f.ReadAll
- f.Close
- ExecuteGlobal s
- End If
- Set oFSO = Nothing
- Set f = Nothing
- End Sub
- Sub writetosubmenu()
- desktopx.object("Submenu Title Text").text = desktopx.object("Text Main Button2").text
- For i=1 To 32
- If i<=nrsubbutton2 Then
- desktopx.object("SubButton"&i).visible = True
- desktopx.object("Text SubButton"&i).text = subbutton2(i-1,0)
- desktopx.object("SubButton"&i).command = subbutton2(i-1,1)
- Else
- desktopx.object("SubButton"&i).visible = False
- End If
- Next
- End Sub
- Sub Object_OnLButtonDown(x, y)
- desktopx.object("Submenu").visible = False
- Include(desktopx.object("EFB Clock").comments)
- writetosubmenu()
- End Sub
Note: I allready checked if it got the (efb clock) comment correctly by writing that to ("Submenu Title Text").text which works and makes it completly understandable for me...