It is currently May 7th, 2024, 5:33 pm

vb6 to rainmeter

Get help with creating, editing & fixing problems with skins
newuserguy1
Posts: 7
Joined: January 22nd, 2013, 9:35 pm

vb6 to rainmeter

Post by newuserguy1 »

I know how to code (breifly) in vb6, and would like to apply the same coding into a .ini file and have it do the same. Any ideas? coding below, picture attatched of what I would like it to look like. Thank you in advance!

Private Sub Command1_Click()
If Len(Text1.Text) < 1 Then
Shape1.FillColor = &HFF00&
Exit Sub
End If
End Sub

Private Sub Form_Load()
Dim homework As String
Dim homework1 As String
Open "C:\Users\Sam\SkyDrive\test.txt" For Input As #1
Do While Not EOF(1)
Input #1, homework1
dText = dText & homework1 & ", "
Loop
Text1.Text = dText
End Sub
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: vb6 to rainmeter

Post by eclectic-tech »

Some of what you want to do can be done in native rainmeter, but determining the length of text is not a native ability.
Not to worry, Rainmeter uses the Lua scripting language to perform processes not native to Rainmeter.

Take a look at this for starters and references.
newuserguy1
Posts: 7
Joined: January 22nd, 2013, 9:35 pm

Re: vb6 to rainmeter

Post by newuserguy1 »

Thank you for your quick reply, I found the desired lua script, however I have had some trouble implimenting it, please can you help?

[h/w-check]
Measure=Script
ScriptFile=wc.lua
function wc(C:\Users\Sam\Documents\Rainmeter\Skins\Mine

\Blank2\homework.txt)
if words= >1 then
Excecute [!ShowMeter Checkn] [!HideMeter Checkp] [!Redraw]
else
Excecute [!ShowMeter Checkp] [!HideMeter Checkn] [!Redraw]
return
end

Also, how can you open up a text file through a action? thanks again!
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5407
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: vb6 to rainmeter

Post by eclectic-tech »

I see Smurfier was able to help you in the Lua forum...
For those interested in the answer, look here...
newuserguy1
Posts: 7
Joined: January 22nd, 2013, 9:35 pm

Re: vb6 to rainmeter

Post by newuserguy1 »

Thank you for your help!
newuserguy1
Posts: 7
Joined: January 22nd, 2013, 9:35 pm

Re: vb6 to rainmeter

Post by newuserguy1 »

Here is the finished rainmeter package, incase anybody wants it.
You do not have the required permissions to view the files attached to this post.
newuserguy1
Posts: 7
Joined: January 22nd, 2013, 9:35 pm

Re: vb6 to rainmeter

Post by newuserguy1 »