• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

What should I program this in?

Gibson486

Lifer
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.
 
'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
 
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.
 
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.

 
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.
 
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?
 
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.
 
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.
 
Back
Top