hi, could someone please tell me how to change the following vbs (i created
1) so that the widget/text1 updates every second and
2) that there is no need to use a temporary text file to store the data?
atm my widget uses the vbs at 'onload'.
thanks for any help in advance...
cheers joe
Code:
dim obj_shell, var_line, obj_cmdexec, my_string, tmpfile
Sub subfn()
set obj_shell = createobject("WScript.Shell")
tmpfile = ""+WidgetPath+"/tmp.txt"
return = obj_shell.Run("%comspec% /C netsh wlan show interfaces | FIND ""Signal"" > "+tmpfile,0 ,true)
Set fso = CreateObject("Scripting.FileSystemObject")
set file = fso.getFile(tmpfile)
if file.size > 0 then
Set file = fso.OpenTextFile(tmpfile, 1)
my_string = file.readall()
my_string = Mid(my_string,InStr(my_string,":")+2,Len(my_string)-InStr(my_string,":")+2)
text1.Text = my_string
file.Close: set fso = nothing
else
text1.Text = "File was empty"
end if
set my_string = nothing
set file = nothing
End Sub