What should I program this in?

Gibson486

Lifer
Aug 9, 2000
18,378
1
0
Well, my car was towed the other day b/c I forgot about street cleaning. What i wanna do is make a reminder for me to move my car to a street that is not having streey cleanign done. I have a sense of how I wann do this, but I want to know what i should code this in. The first thing that has to be done is that I have to check the day of the week, so I guess that means I have to piggy pack off the windows calender? What scripting or coding language would you recommend? I would also like this to run in the background while my computer is on also.
 

Evadman

Administrator Emeritus<br>Elite Member
Feb 18, 2001
30,990
5
81
'wrote this int he reply box, probably screwed up syntax somewhere.
'There are many many other ways to do this. modify to your hearts content.

Sub TellMeTomoveMyCar()
Dim LastReminder
Dim HCCULastTime
Dim WshShell

Set WshShell = WScript.CreateObject("WScript.Shell")

LastReminder= WshShell.RegRead("HKCU\Software\Evad\TellMeTomoveMyCar\")

if isdate(LastReminder) then
if not cdate(LastReminder) = date() THEN
'check to see if the car should be moved today
IF datepart("ww",date()) = 3 then 'sun =1, mon =2, tues=3, 4=wed, etc
'omg toesday! move the car!
msgbox "move the car. it is sweeping day"
WshShell. RegWrite "HKCU\Software\Evad\TellMeTomoveMyCar", date(), "REG_SZ"
end if
end if
end if
set WshShell = nothing
exit sub
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Put a text file somewhere that says, "Move your car". Create a new task that opens the text file and schedule it to open on whatever day you need.
 

Gibson486

Lifer
Aug 9, 2000
18,378
1
0
Originally posted by: Evadman
'wrote this int he reply box, probably screwed up syntax somewhere.
'There are many many other ways to do this. modify to your hearts content.

Sub TellMeTomoveMyCar()
Dim LastReminder
Dim HCCULastTime
Dim WshShell

Set WshShell = WScript.CreateObject("WScript.Shell")

LastReminder= WshShell.RegRead("HKCU\Software\Evad\TellMeTomoveMyCar\")

if isdate(LastReminder) then
if not cdate(LastReminder) = date() THEN
'check to see if the car should be moved today
IF datepart("ww",date()) = 3 then 'sun =1, mon =2, tues=3, 4=wed, etc
'omg toesday! move the car!
msgbox "move the car. it is sweeping day"
WshShell. RegWrite "HKCU\Software\Evad\TellMeTomoveMyCar", date(), "REG_SZ"
end if
end if
end if
set WshShell = nothing
exit sub

thanks,

but I already have an algorthm for it. I just want to know what I should code it in.

 

aCynic2

Senior member
Apr 28, 2007
710
0
0
Why do you feel a need to program it? If you have Outlook, use the calendar. If you don't have outlook, use some other calendar program.

It'll take all of about 5-10 minutes (not including download time) and it should work fine.
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
but I already have an algorthm for it. I just want to know what I should code it in.

Why would you code up your own program, which could have bugs costing you a towed car, when Windows has the ability to do things at specified times hourly/daily/weekly/etc?
 

aCynic2

Senior member
Apr 28, 2007
710
0
0
Originally posted by: lousydood
That's pretty severe. Here it's just a $15 ticket. If they remember to clean the streets.

Here they tow. They'll tow in a heartbeat. They use flatbeds with tow hooks, so they get one on the bed and another in tow and one truck can take out two cars.

I watched 3-4 trucks work one street. When they left, more came in and to collect the other cars.

They're ruthless here. I will NOT rent an apartment that does not have off-street parking.
 

pcnerd37

Senior member
Sep 20, 2004
944
0
71
Wow, I have never heard of getting towed for street cleaning. Around here they never say when your street will be cleaned so they just clean around your car. Anyway, I would recommend a .NET language like C# because of the date/time capabilities. Although I would personally go with others recommendations of setting a task and let windows handle it.